/* ==========================================================================
   히누의 판단 리그 (/play/) — 밤 경기장 게임 화면
   배경·배지·속도선 그림은 사이트에 있는 GPT 그림을 그대로 쓴다
   ========================================================================== */
.game-page {
  --g-ink: #F4F1EA; --g-muted: #AEB5CF; --g-glass: rgb(13 19 46 / .82); --g-glass-2: rgb(25 33 70 / .9);
  --g-line: rgb(255 255 255 / .12); --g-gold: #F2CB86; --g-gold-2: #E9BE78; --g-good: #5FD394; --g-ok: #F0B44C; --g-out: #FF6B6B;
  min-height: 100svh; color: var(--g-ink);
  background: #070B1C url("../img/ui/hero-bg.webp") center top / cover fixed no-repeat;
}
.game-page::before { content: ""; position: fixed; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(7 11 28 / .3), rgb(7 11 28 / .78) 60%, #070B1C); pointer-events: none; }
.game-page[data-screen="play"]::before { background: linear-gradient(180deg, rgb(7 11 28 / .78), rgb(7 11 28 / .92)); }
.game-page kbd { display: inline-grid; place-items: center; min-width: 1.7em; height: 1.6em; padding: 0 .35em; margin-left: .5em; border-radius: 6px; border: 1px solid currentColor; font: 800 .72em var(--font-sans); opacity: .75; }
.game-page :focus-visible { outline: 3px solid var(--g-gold); outline-offset: 3px; }

/* 상단 바 */
.g-bar { display: flex; align-items: center; gap: 14px; max-width: 1280px; margin-inline: auto; padding: 12px 16px; }
.g-bar__brand img { width: 74px; height: auto; }
.g-bar__link { color: var(--g-muted); font-weight: 700; font-size: .92rem; text-decoration: none; }
.g-bar__link:hover { color: var(--g-ink); }
.g-bar__tools { display: flex; gap: 6px; margin-left: auto; }
.g-tool { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--g-line); background: rgb(255 255 255 / .06); color: var(--g-ink); font-size: .85rem; font-weight: 700; }
.g-tool[aria-pressed="false"] { color: var(--g-muted); }
.g-tool__ic { font-size: 1rem; line-height: 1; }
@media (max-width: 520px) { .g-tool__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .g-bar__link { font-size: .82rem; } }

.g-main { max-width: 1280px; margin-inline: auto; padding: 8px 16px 48px; }
.g-main:focus { outline: none; }
.g-screen:focus { outline: none; }

/* 공통 버튼 */
.g-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 52px; padding: 0 22px; border-radius: 14px;
  border: 1.5px solid rgb(255 255 255 / .22); background: rgb(255 255 255 / .07); color: var(--g-ink);
  font: 800 1.02rem var(--font-sans); letter-spacing: -0.01em; transition: transform .12s, background-color .12s, border-color .12s, filter .12s;
}
.g-btn:hover { background: rgb(255 255 255 / .13); border-color: rgb(255 255 255 / .4); }
.g-btn:active { transform: translateY(1px) scale(.99); }
.g-btn--main { border-color: transparent; color: #1A1305; background: linear-gradient(105deg, #C99D41, #E1BF86 60%, #F3D9A6); box-shadow: 0 8px 24px rgb(201 157 65 / .3), inset 0 1px 0 rgb(255 255 255 / .4); }
.g-btn--main:hover { filter: brightness(1.06); background: linear-gradient(105deg, #C99D41, #E1BF86 60%, #F3D9A6); }
.g-btn--sm { min-height: 40px; padding: 0 14px; font-size: .9rem; }
.g-link { padding: 0; border: 0; background: none; color: var(--g-muted); font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.g-kicker { font: 800 .8rem var(--font-sans); letter-spacing: .14em; color: var(--g-gold); }

/* ---------- 타이틀 ---------- */
.g-title { display: grid; align-items: center; min-height: calc(100svh - 140px); }
.g-title__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.g-title__name { margin: 10px 0 14px; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.8rem, 7vw, 5.2rem); line-height: 1.02; letter-spacing: -0.03em; text-shadow: 0 6px 30px rgb(0 0 0 / .5); }
.g-title__name em { display: block; font-style: normal; color: var(--g-gold); }
.g-title__lead { max-width: 34ch; color: #D9DDEB; font-size: 1.08rem; line-height: 1.7; }
.g-menu { display: grid; gap: 10px; max-width: 360px; margin-top: 26px; }
.g-menu .g-btn { justify-content: space-between; min-height: 58px; font-size: 1.12rem; }
.g-check { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; color: var(--g-muted); font-weight: 700; font-size: .92rem; cursor: pointer; }
.g-check input { width: 20px; height: 20px; accent-color: var(--g-gold); }
.g-keys { margin-top: 14px; font-size: .82rem; color: var(--g-muted); line-height: 2; }
.g-keys kbd { margin: 0 2px; }

/* 선수 카드 */
.g-card { justify-self: center; width: min(360px, 100%); border-radius: 22px; padding: 10px; background: linear-gradient(160deg, #F3D9A6, #C99D41 45%, #8A5A0B); box-shadow: 0 30px 60px rgb(0 0 0 / .5); transform: rotate(2.5deg); }
.g-card__photo { overflow: hidden; border-radius: 14px; aspect-ratio: 4 / 3.4; background: #FFF8EC; }
.g-card__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 30%; }
.g-card__body { position: relative; display: grid; gap: 4px; padding: 14px 12px 6px; color: #1A1305; }
.g-card__no { position: absolute; top: -34px; right: 10px; padding: 2px 12px; border-radius: 12px; background: #1B2556; color: #fff; font: 800 1.4rem var(--font-display); box-shadow: 0 4px 12px rgb(0 0 0 / .3); }
.g-card__name { font: 800 1.7rem var(--font-display); line-height: 1.1; }
.g-card__name span { margin-left: 6px; font-size: .9rem; letter-spacing: .1em; opacity: .65; }
.g-card__rank { font-weight: 700; }
.g-card__rank b { padding: 1px 8px; border-radius: 6px; background: #1B2556; color: var(--g-gold); }
.g-card__next { font-size: .8rem; font-weight: 700; opacity: .75; }
.g-card__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 0; }
.g-card__stats div { padding: 6px 4px; border-radius: 10px; background: rgb(255 255 255 / .45); text-align: center; }
.g-card__stats dt { font-size: .72rem; font-weight: 800; opacity: .7; }
.g-card__stats dd { margin: 0; font: 800 1.2rem var(--font-display); }
.g-card__stats small { font-size: .7rem; opacity: .6; }
.g-xpbar { height: 10px; border-radius: 99px; background: rgb(0 0 0 / .25); overflow: hidden; }
.g-xpbar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1B2556, #3B4C9B); }
@media (max-width: 860px) {
  .g-title { min-height: 0; padding-top: 12px; }
  .g-title__grid { grid-template-columns: minmax(0, 1fr); }
  .g-card { order: -1; width: min(300px, 86%); transform: rotate(1.5deg); }
  .g-menu { max-width: none; }
}

/* ---------- 머리 · 스테이지 ---------- */
.g-head { display: grid; gap: 6px; margin: 8px 0 20px; }
.g-back { justify-self: start; min-height: 36px; padding: 0 2px; border: 0; background: none; color: var(--g-muted); font-weight: 700; }
.g-back:hover { color: var(--g-ink); }
.g-head__title { font: 800 clamp(1.8rem, 4vw, 2.6rem) var(--font-display); }
.g-head__sub { color: var(--g-muted); }
.g-stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; counter-reset: none; }
.g-stage__btn {
  position: relative; display: grid; gap: 6px; align-content: start; width: 100%; height: 100%; padding: 12px 12px 16px; border-radius: 20px; text-align: left;
  border: 1.5px solid var(--g-line); background: var(--g-glass); color: var(--g-ink); box-shadow: 0 14px 30px rgb(0 0 0 / .3); transition: transform .15s, border-color .15s;
}
.g-stage__btn:hover:not(:disabled) { transform: translateY(-4px); border-color: var(--g-gold); }
.g-stage__no { font: 800 .74rem var(--font-sans); letter-spacing: .12em; color: var(--g-gold); }
.g-stage__pic { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; background: #FFF8EC; }
.g-stage__name { font: 800 1.3rem var(--font-display); }
.g-stage__sub { font-size: .86rem; color: #D9DDEB; }
.g-stage__meta { font-size: .76rem; font-weight: 700; color: var(--g-muted); }
.g-stage__best { font-size: .8rem; font-weight: 700; color: var(--g-muted); }
.g-stage.is-locked .g-stage__btn { cursor: not-allowed; opacity: .55; }
.g-stage.is-locked .g-stage__pic { filter: grayscale(1) brightness(.6); }
.g-stage.is-full .g-stage__btn { border-color: var(--g-gold); box-shadow: 0 0 0 1px var(--g-gold), 0 14px 30px rgb(201 157 65 / .25); }
.g-stars { display: inline-flex; gap: 2px; font-size: 1.25rem; line-height: 1; }
.g-stars i { font-style: normal; color: rgb(255 255 255 / .2); }
.g-stars i.on { color: var(--g-gold); text-shadow: 0 0 10px rgb(242 203 134 / .6); }
.g-stars--big { justify-content: center; font-size: 3rem; gap: 8px; }
.g-stars--big i.on { animation: starpop .5s cubic-bezier(.3, 1.6, .6, 1) both; }
.g-stars--big i.on:nth-child(2) { animation-delay: .18s; }
.g-stars--big i.on:nth-child(3) { animation-delay: .36s; }
@keyframes starpop { from { transform: scale(0) rotate(-40deg); opacity: 0; } }
@media (max-width: 1100px) { .g-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .g-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .g-stages { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 플레이 ---------- */
.g-hud { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 10px 16px; border-radius: 18px; background: var(--g-glass); border: 1px solid var(--g-line); }
.g-hud__stage { display: grid; line-height: 1.2; }
.g-hud__stage b { font: 800 1.1rem var(--font-display); }
.g-hud__stage span { font-size: .8rem; font-weight: 700; color: var(--g-muted); }
.g-hud__score { display: grid; line-height: 1.1; margin-left: auto; text-align: right; }
.g-hud__score span { font-size: .7rem; font-weight: 800; letter-spacing: .14em; color: var(--g-muted); }
.g-hud__score b { font: 800 1.7rem var(--font-display); font-variant-numeric: tabular-nums; color: var(--g-gold); }
.g-hud__score b.is-bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.18); } }
.g-hud__combo { min-width: 0; font: 800 .9rem var(--font-sans); color: var(--g-ink); }
.g-hud__combo:empty { display: none; }
.g-hud__combo b { font: 800 1.5rem var(--font-display); color: var(--g-gold); }
.g-hud__combo span { margin-left: 4px; padding: 1px 6px; border-radius: 6px; background: rgb(242 203 134 / .18); color: var(--g-gold); }
.g-hud__combo.is-hot b { color: #FF9F43; text-shadow: 0 0 14px rgb(255 159 67 / .8); }
.g-hud__outs { display: inline-flex; align-items: center; gap: 5px; }
.g-hud__outs i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--g-out); }
.g-hud__outs i.on { background: var(--g-out); box-shadow: 0 0 12px rgb(255 107 107 / .7); }
.g-hud__outs b { margin-left: 2px; font: 800 .8rem var(--font-display); color: var(--g-muted); }
.g-icon { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--g-line); background: rgb(255 255 255 / .06); color: var(--g-ink); font-weight: 800; }

.g-arena { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 14px; align-items: start; }
.g-field-wrap { position: relative; overflow: hidden; border-radius: 22px; }
.g-field { overflow: hidden; border-radius: 22px; border: 1px solid var(--g-line); background: color-mix(in srgb, var(--grass) 55%, #0B1026); box-shadow: 0 20px 50px rgb(0 0 0 / .45); }
.g-panel { display: grid; gap: 12px; padding: clamp(14px, 2.4vw, 22px); border-radius: 22px; background: var(--g-glass); border: 1px solid var(--g-line); }
.g-timer { height: 10px; border-radius: 99px; background: rgb(255 255 255 / .1); overflow: hidden; }
.g-timer i { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--g-good), var(--g-gold)); transform-origin: left; }
.g-timer.is-low i { background: linear-gradient(90deg, var(--g-out), #FF9F43); }
.g-timer.is-stopped i { opacity: .5; }
.g-sit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.g-sit__chip { padding: 4px 12px; border-radius: 10px; background: #fff; color: #111735; font: 800 1.1rem var(--font-display); }
.g-sit__outs { font: 800 .82rem var(--font-display); color: var(--g-out); }
.g-sit__role { padding: 3px 10px; border-radius: 10px; background: rgb(242 203 134 / .16); color: var(--g-gold); font-weight: 800; font-size: .9rem; }
.g-event { color: #D9DDEB; line-height: 1.7; }
.g-q { font-size: clamp(1.2rem, 2.4vw, 1.5rem); font-weight: 800; line-height: 1.4; }
.g-choices { display: grid; gap: 8px; }
.g-choice {
  position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; min-height: 56px; padding: 10px 70px 10px 12px; border-radius: 14px;
  border: 1.5px solid rgb(255 255 255 / .18); background: rgb(255 255 255 / .05); color: var(--g-ink); text-align: left; font: 700 1rem/1.45 var(--font-sans);
  transition: transform .12s, background-color .12s, border-color .12s;
}
.g-choice kbd { margin: 0; width: 30px; height: 30px; border-radius: 9px; border: 0; background: rgb(255 255 255 / .12); opacity: 1; font-size: .9rem; }
.g-choice:hover:not(:disabled) { border-color: var(--g-gold); background: rgb(242 203 134 / .1); transform: translateX(3px); }
.g-choice:disabled { cursor: default; }
.g-choice:disabled:not(.is-answer):not(.is-wrong):not(.is-okay) { opacity: .55; }
.g-choice.is-answer { border-color: var(--g-good); background: rgb(95 211 148 / .14); }
.g-choice.is-answer kbd { background: var(--g-good); color: #0B1026; }
.g-choice.is-okay { border-color: var(--g-ok); background: rgb(240 180 76 / .14); }
.g-choice.is-wrong { border-color: var(--g-out); background: rgb(255 107 107 / .14); animation: shake .36s ease; }
.g-choice.is-answer::after, .g-choice.is-okay::after, .g-choice.is-wrong::after { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: .76rem; font-weight: 800; }
.g-choice.is-answer::after { content: "정답"; color: var(--g-good); }
.g-choice.is-answer.is-picked::after { content: "정답 · 내 답"; }
.g-choice.is-okay::after { content: "괜찮음"; color: var(--g-ok); }
.g-choice.is-wrong::after { content: "내 답"; color: var(--g-out); }

.g-after { display: grid; gap: 10px; padding-top: 4px; border-top: 1px dashed var(--g-line); animation: rise .25s ease both; }
.g-after:focus { outline: none; }
.g-after__head { font: 800 1.25rem var(--font-display); }
.g-after__head span { margin-left: 6px; color: var(--g-gold); }
.g-after__head--perfect, .g-after__head--good { color: var(--g-good); }
.g-after__head--ok { color: var(--g-ok); }
.g-after__head--out { color: var(--g-out); }
.g-after__note { font-weight: 700; color: #E7EAF3; }
.g-after__best b, .g-after__rule b { display: inline-block; margin-right: 8px; padding: 1px 7px; border-radius: 6px; font-size: .74rem; font-weight: 800; vertical-align: 1px; }
.g-after__best { font-weight: 800; }
.g-after__best b { background: var(--g-good); color: #0B1026; }
.g-after__why { color: #C9CEE0; line-height: 1.7; }
.g-after__more summary { cursor: pointer; color: var(--g-muted); font-weight: 700; font-size: .9rem; }
.g-after__more .g-after__why { margin-top: 6px; }
.g-after__rule { display: flex; align-items: baseline; padding: 10px 12px; border-radius: 12px; background: rgb(242 203 134 / .1); border: 1px solid rgb(242 203 134 / .25); font-weight: 700; line-height: 1.6; }
.g-after__rule b { flex: none; background: var(--g-gold); color: #1A1305; }
.g-next { justify-self: end; min-width: 180px; }

/* 판정 도장 */
.g-stamp { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; pointer-events: none; opacity: 0; }
.g-stamp.is-on { animation: stamp 1.25s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.g-stamp__burst { position: absolute; inset: -12%; background: url("../img/ui/speedlines.webp") center / contain no-repeat; opacity: .55; }
.g-stamp b { position: relative; font: 800 clamp(2.6rem, 6vw, 4.4rem) var(--font-display); letter-spacing: -0.02em; transform: rotate(-6deg); -webkit-text-stroke: 2px #0B1026; paint-order: stroke fill; text-shadow: 0 6px 0 rgb(11 16 38 / .65), 0 0 30px rgb(0 0 0 / .4); }
.g-stamp small { position: relative; margin-top: 4px; padding: 3px 10px; border-radius: 10px; background: #0B1026; color: var(--g-gold); font: 800 1rem var(--font-display); }
.g-stamp--perfect b { color: var(--g-gold); }
.g-stamp--good b { color: var(--g-good); }
.g-stamp--ok b { color: var(--g-ok); }
.g-stamp--out b { color: var(--g-out); }
@keyframes stamp { 0% { opacity: 0; transform: scale(2.2); } 14% { opacity: 1; transform: scale(.94); } 22% { transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: scale(1.04); } }

@media (max-width: 900px) {
  .g-arena { grid-template-columns: minmax(0, 1fr); }
  .g-field-wrap { max-width: min(460px, 48svh * 200 / 182); width: 100%; margin-inline: auto; }
  .g-hud { gap: 8px 14px; padding: 8px 12px; }
  .g-hud__score b { font-size: 1.4rem; }
  .g-next { justify-self: stretch; }
}

/* ---------- 결과 ---------- */
.g-result__box { display: grid; justify-items: center; gap: 12px; max-width: 760px; margin: 10px auto 0; padding: clamp(20px, 4vw, 36px); border-radius: 26px; background: var(--g-glass); border: 1px solid var(--g-line); text-align: center; }
.g-result__stamp { position: relative; display: grid; place-items: center; width: 100%; min-height: 120px; }
.g-result__stamp b { position: relative; font: 800 clamp(2.4rem, 7vw, 4rem) var(--font-display); transform: rotate(-4deg); -webkit-text-stroke: 2px #0B1026; paint-order: stroke fill; text-shadow: 0 6px 0 rgb(11 16 38 / .6); animation: stampin .6s cubic-bezier(.2, 1.5, .4, 1) both; }
.g-result__stamp .g-stamp__burst { inset: -40% 10%; opacity: .4; }
.g-result__stamp--clear b { color: var(--g-gold); }
.g-result__stamp--fail b { color: var(--g-out); }
@keyframes stampin { from { opacity: 0; transform: scale(2) rotate(-4deg); } }
.g-result__title { font: 800 1.4rem var(--font-display); }
.g-goals { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.g-goals li { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--g-line); color: var(--g-muted); font-weight: 700; font-size: .88rem; }
.g-goals li span { margin-right: 6px; }
.g-goals li.is-ok { border-color: var(--g-gold); color: var(--g-gold); }
.g-result__score { font: 800 1rem var(--font-sans); letter-spacing: .12em; color: var(--g-muted); }
.g-result__score b { display: block; font: 800 3.2rem var(--font-display); letter-spacing: -0.02em; color: var(--g-ink); font-variant-numeric: tabular-nums; }
.g-new { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 8px; background: #FF6B6B; color: #fff; font-size: .8rem; letter-spacing: .1em; animation: pop .5s .6s both; }
.g-result__stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.g-result__stats li { padding: 6px 14px; border-radius: 12px; background: rgb(255 255 255 / .07); color: var(--g-muted); font-weight: 700; }
.g-result__stats b { margin-left: 4px; color: var(--g-ink); font-family: var(--font-display); font-size: 1.15rem; }
.g-rankup { padding: 8px 16px; border-radius: 12px; background: rgb(242 203 134 / .15); color: var(--g-gold); font-weight: 800; animation: pop .5s .4s both; }
.g-earned p { font-weight: 800; color: var(--g-gold); }
.g-earned ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.g-earned li { display: grid; justify-items: center; gap: 2px; width: 130px; animation: starpop .6s .5s cubic-bezier(.3, 1.6, .6, 1) both; }
.g-earned img { width: 76px; height: 76px; object-fit: contain; filter: drop-shadow(0 6px 14px rgb(0 0 0 / .4)); }
.g-earned small { color: var(--g-muted); font-size: .76rem; }
.g-result__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
@media (max-width: 520px) { .g-result__actions .g-btn { flex: 1 1 100%; } }
.g-review { width: 100%; text-align: left; margin-top: 6px; }
.g-review h3 { margin-bottom: 8px; font-size: 1.05rem; font-weight: 800; }
.g-review ol { display: grid; gap: 8px; }
.g-review li { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; background: rgb(255 255 255 / .05); border-left: 4px solid var(--g-out); line-height: 1.6; font-size: .92rem; }
.g-review li.is-ok { border-left-color: var(--g-ok); }
.g-review__head { font-weight: 800; }
.g-review__head span { margin-left: 4px; color: var(--g-muted); font-weight: 700; }
.g-review__q { color: #C9CEE0; }
.g-review b { color: var(--g-good); }
.g-review__rule { font-size: .84rem; color: var(--g-gold); }
.g-allgood { font-weight: 700; color: var(--g-good); }
@keyframes gblink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }

/* ---------- 기록 · 배지 ---------- */
.g-rec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.g-rec > div { display: grid; gap: 8px; align-content: start; padding: 16px; border-radius: 20px; background: var(--g-glass); border: 1px solid var(--g-line); }
.g-rec__label { font-size: .8rem; font-weight: 800; letter-spacing: .08em; color: var(--g-muted); }
.g-rec__big { font: 800 2.4rem var(--font-display); color: var(--g-gold); line-height: 1.1; }
.g-rec__rank .g-xpbar { background: rgb(255 255 255 / .1); }
.g-rec__rank .g-xpbar i { background: linear-gradient(90deg, #C99D41, #F3D9A6); }
.g-rec__small { font-size: .82rem; color: var(--g-muted); }
.g-rec__small a { color: var(--g-gold); }
.g-rec__acc ul, .g-rec__stages ul { display: grid; gap: 8px; }
.g-rec__acc li { display: grid; grid-template-columns: 40px 1fr 44px; gap: 8px; align-items: center; font-weight: 700; }
.g-rec__acc li small { grid-column: 1 / -1; margin-top: -4px; color: var(--g-ok); font-size: .78rem; }
.g-rec__acc b { text-align: right; font-family: var(--font-display); }
.g-bar2 { height: 10px; border-radius: 99px; background: rgb(255 255 255 / .1); overflow: hidden; }
.g-bar2 i { display: block; height: 100%; background: linear-gradient(90deg, var(--g-good), var(--g-gold)); }
.g-rec__stages li { display: grid; grid-template-columns: 1fr auto 64px; gap: 8px; align-items: center; font-weight: 700; font-size: .92rem; }
.g-rec__stages b { text-align: right; font-family: var(--font-display); color: var(--g-gold); }
.g-rec__stages .g-stars { font-size: 1rem; }
.g-rec__title { margin: 22px 0 10px; font: 800 1.3rem var(--font-display); }
.g-badges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.g-badges li { display: grid; justify-items: center; gap: 4px; padding: 16px 10px; border-radius: 18px; background: var(--g-glass); border: 1px solid var(--g-line); text-align: center; }
.g-badges img { width: 80px; height: 80px; object-fit: contain; filter: grayscale(1) brightness(.5); opacity: .55; }
.g-badges li.is-on img { filter: drop-shadow(0 6px 14px rgb(0 0 0 / .45)); opacity: 1; }
.g-badges li.is-on { border-color: rgb(242 203 134 / .45); }
.g-badges b { font-size: .95rem; }
.g-badges small { color: var(--g-muted); font-size: .78rem; line-height: 1.4; }
.g-rec__note { margin-top: 14px; }
@media (max-width: 900px) { .g-rec { grid-template-columns: minmax(0, 1fr); } .g-badges { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 일시정지 ---------- */
.g-pause { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgb(5 8 20 / .78); backdrop-filter: blur(6px); }
.g-pause__box { display: grid; gap: 10px; width: min(340px, 100%); padding: 26px; border-radius: 22px; background: var(--g-glass-2); border: 1px solid var(--g-line); text-align: center; }
.g-pause__box h2 { margin-bottom: 6px; font: 800 1.8rem var(--font-display); }
.g-noscript { max-width: 600px; margin: 40px auto; padding: 16px; text-align: center; }

.game-page.fx-off *, .game-page.fx-off *::before, .game-page.fx-off *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
.game-page.fx-off .g-stamp.is-on { animation: none; opacity: 1; }
.g-opts { display: grid; gap: 4px; margin-top: 16px; }
.g-opts .g-check { margin-top: 0; }
.g-opts__note { font-size: .8rem; color: var(--g-ok); }

/* ==========================================================================
   3D 1인칭 시점
   ========================================================================== */
.g-play.is-3d .g-arena { grid-template-columns: minmax(0, 1fr); }
.g-play.is-3d .g-field-wrap, .g-play.is-3d .g-panel { display: none; }
.g-3d { display: grid; gap: 10px; }
.g-3d__stage { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100svh - 230px); min-height: 320px; overflow: hidden; border-radius: 22px; background: #070b1c; border: 1px solid var(--g-line); box-shadow: 0 24px 60px rgb(0 0 0 / .5); }
.g-3d__view { position: absolute; inset: 0; }
.g-3d__view canvas { display: block; width: 100% !important; height: 100% !important; }
.g-3d__info { position: absolute; left: 12px; top: 12px; display: grid; gap: 6px; width: min(440px, calc(100% - 24px)); padding: 10px 12px; border-radius: 16px; background: rgb(8 12 32 / .72); border: 1px solid var(--g-line); backdrop-filter: blur(6px); }
.g-3d__event { font-size: .9rem; line-height: 1.55; color: #D9DDEB; }
.g-3d__slow { position: absolute; top: 14px; right: 14px; padding: 4px 12px; border-radius: 10px; background: rgb(255 107 107 / .9); color: #fff; font: 800 .8rem var(--font-sans); letter-spacing: .08em; animation: gblink 1s infinite both; }
.g-3d__controls { display: grid; gap: 8px; justify-items: center; }
.g-3d__q { font-size: clamp(1.1rem, 2.2vw, 1.4rem); font-weight: 800; text-align: center; line-height: 1.35; }
.g-3d__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; }
.g3-act {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 58px; padding: 8px 14px 8px 12px; border-radius: 16px;
  border: 1.5px solid rgb(255 255 255 / .22); background: rgb(13 19 46 / .88); color: var(--g-ink); font: 800 1.02rem var(--font-sans);
  box-shadow: 0 8px 22px rgb(0 0 0 / .35); transition: transform .12s, border-color .12s, background-color .12s;
}
.g3-act svg { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--g-gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.g3-act kbd { margin-left: 4px; }
.g3-act:hover:not(:disabled), .g3-act:focus-visible { transform: translateY(-3px); border-color: var(--g-gold); background: rgb(40 34 20 / .92); }
.g3-act:disabled { cursor: default; opacity: .5; }
.g3-act.is-answer { opacity: 1; border-color: var(--g-good); background: rgb(20 60 40 / .92); }
.g3-act.is-answer svg { stroke: var(--g-good); }
.g3-act.is-okay { opacity: 1; border-color: var(--g-ok); }
.g3-act.is-wrong { opacity: 1; border-color: var(--g-out); background: rgb(70 20 26 / .92); animation: shake .36s ease; }
.g-3d__hint { min-height: 1.4em; font-size: .86rem; color: var(--g-muted); text-align: center; }

/* 땅 위 표시: 누를 수 있는 이름표 */
.g3-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.g3-label { position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform; }
.g3-label--pick {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 999px;
  border: 2px solid var(--g-gold); background: rgb(14 18 40 / .9); color: #fff; font: 800 .95rem var(--font-sans); cursor: pointer;
  box-shadow: 0 6px 18px rgb(0 0 0 / .45), 0 0 18px rgb(242 203 134 / .35);
}
.g3-label--pick kbd { margin: 0; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--g-gold); color: #1A1305; opacity: 1; }
.g3-label--pick:hover { background: rgb(60 46 18 / .95); }
.g3-label--me { padding: 2px 10px; border-radius: 999px; background: var(--g-gold); color: #1A1305; font: 800 .85rem var(--font-sans); }

/* 판단 뒤: 데스크톱은 오른쪽에 결과, 아래 버튼은 숨김 */
.g-after--3d { position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(380px, 44%); overflow-y: auto; padding: 14px 16px; border-radius: 18px; border-top: 0; background: rgb(8 12 32 / .86); border: 1px solid var(--g-line); backdrop-filter: blur(8px); }
.g-after--3d { align-content: start; }
.g-after--3d .g-next { justify-self: stretch; }
.g-3d.is-after .g-3d__info { width: min(440px, calc(56% - 36px)); }
.g-3d.is-after .g-3d__controls { opacity: .55; }
@media (max-width: 900px) {
  .g-3d__stage { aspect-ratio: 4 / 3.4; max-height: 62svh; min-height: 260px; }
  .g-3d__info { padding: 8px 10px; }
  .g-3d__event { display: none; }
  .g3-act { min-height: 52px; font-size: .95rem; flex: 1 1 calc(50% - 8px); justify-content: flex-start; }
  .g-after--3d { position: static; width: auto; max-height: none; overflow: visible; margin-top: 10px; }
  .g-3d__stage:has(.g-after--3d:not([hidden])) { overflow: visible; aspect-ratio: auto; max-height: none; }
  .g-3d.is-after .g-3d__info { width: min(440px, calc(100% - 24px)); }
}
/* 화면 밖 판단 지점: 가장자리 화살표 */
.g3-label--pick.is-edge { opacity: .95; border-style: dashed; }
.g3-label--pick.is-edge::before { content: ""; order: 3; width: 0; height: 0; margin-left: 2px; border-left: 10px solid var(--g-gold); border-top: 6px solid transparent; border-bottom: 6px solid transparent; transform: rotate(var(--a, 0rad)); }

/* 판단 포인트 칩: 고르기 전엔 읽을 것, 고른 뒤엔 결정적인 것이 빛난다 */
.g-cues { display: flex; flex-wrap: wrap; gap: 5px; }
.g-cues:empty { display: none; }
.g-cue { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 9px; border-radius: 8px; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .14); font-size: .8rem; line-height: 1.5; }
.g-cue span { color: var(--g-muted); font-weight: 700; }
.g-cue b { color: #F4F1EA; font-weight: 800; }
.g-cues.is-reveal .g-cue { opacity: .45; }
.g-cues.is-reveal .g-cue.is-key { opacity: 1; border-color: var(--g-gold); background: rgb(242 203 134 / .18); box-shadow: 0 0 12px rgb(242 203 134 / .35); }
.g-cues.is-reveal .g-cue.is-key b { color: var(--g-gold); }
.g-after__key { padding: 8px 12px; border-radius: 12px; background: rgb(242 203 134 / .12); border: 1px dashed rgb(242 203 134 / .45); font-weight: 700; font-size: .92rem; line-height: 1.6; }
.g-after__key b { display: inline-block; margin-right: 8px; padding: 1px 7px; border-radius: 6px; background: #F4F1EA; color: #1A1305; font-size: .74rem; font-weight: 800; }
.g3-label--cue { padding: 2px 9px; border-radius: 999px; background: rgb(255 107 107 / .92); color: #fff; font: 800 .78rem var(--font-sans); box-shadow: 0 4px 12px rgb(0 0 0 / .4); }

/* 시야 조작 안내 · 드래그 중 커서 */
.g-3d__view canvas { cursor: default; }
.g-3d__view.is-looking canvas { cursor: grabbing; }
.g-3d__look { position: absolute; left: 12px; bottom: 10px; padding: 3px 10px; border-radius: 8px; background: rgb(8 12 32 / .6); color: var(--g-muted); font-size: .74rem; font-weight: 700; pointer-events: none; }
.g-3d__look-touch { display: none; }
@media (hover: none) { .g-3d__look-mouse { display: none; } .g-3d__look-touch { display: inline; } }
.g-3d.is-after .g-3d__look { display: none; }

/* ==========================================================================
   3D 화면 v2 — 더 크게, 중계 화면처럼
   ========================================================================== */
body[data-screen="play"] .g-main { max-width: 1720px; padding-bottom: 16px; }
body[data-screen="play"] .g-bar { padding-top: 8px; padding-bottom: 6px; }
.g-play.is-3d .g-hud { padding: 6px 14px; }
.g-play.is-3d .g-arena { margin-top: 8px; }
.g-3d__stage { aspect-ratio: auto; height: calc(100svh - 132px); min-height: 520px; max-height: none; }

/* 왼쪽 위: 중계 상황판 */
.g-bug { position: absolute; left: 14px; top: 14px; display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 12px; border-radius: 16px; background: rgb(6 9 26 / .86); border: 1px solid rgb(255 255 255 / .16); box-shadow: 0 10px 30px rgb(0 0 0 / .45); }
.g-bug__diamond { width: 64px; height: 46px; flex: none; }
.g-bug__base { fill: rgb(255 255 255 / .12); stroke: rgb(255 255 255 / .55); stroke-width: 1.5; }
.g-bug__base.on { fill: #FFD27A; stroke: #FFD27A; }
.g-bug__base.me { fill: #F4A7B1; stroke: #fff; stroke-width: 2.5; }
.g-bug__text { display: grid; gap: 4px; }
.g-bug__sit { display: flex; align-items: center; gap: 10px; }
.g-bug__sit b { font: 800 1.75rem/1 var(--font-display); letter-spacing: -0.02em; color: #fff; }
.g-bug__outs { display: inline-flex; gap: 5px; }
.g-bug__outs i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--g-out); }
.g-bug__outs i.on { background: var(--g-out); box-shadow: 0 0 10px rgb(255 107 107 / .7); }
.g-bug__count { font: 800 1rem var(--font-display); color: #FFD27A; }
.g-bug__count:empty { display: none; }
.g-bug__me { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 1.05rem; color: #F4F1EA; }
.g-bug__me span { padding: 1px 8px; border-radius: 7px; background: #F4A7B1; color: #3a1220; font-size: .82rem; }

/* 가운데 위: 큰 자막 */
.g-3d__caption { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); max-width: min(720px, calc(100% - 420px)); padding: 10px 22px; border-radius: 14px; background: rgb(6 9 26 / .82); border: 1px solid rgb(255 255 255 / .14); color: #F4F1EA; font: 800 1.35rem/1.3 var(--font-display); text-align: center; text-shadow: 0 2px 10px rgb(0 0 0 / .5); }
.g-3d__caption:empty { display: none; }
.g-3d__caption.is-hit { background: linear-gradient(105deg, #C99D41, #E1BF86 60%, #F3D9A6); color: #1A1305; text-shadow: none; font-size: 1.7rem; border-color: transparent; box-shadow: 0 10px 30px rgb(201 157 65 / .35); }
.fx-on .g-3d__caption.is-pop { animation: cappop .4s cubic-bezier(.3, 1.6, .6, 1); }
@keyframes cappop { from { transform: translateX(-50%) scale(.7); opacity: 0; } }
.g-3d__cam { position: absolute; right: 14px; top: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 10px; background: rgb(6 9 26 / .82); color: #fff; font: 800 .82rem var(--font-sans); cursor: pointer; pointer-events: auto; }
.g-3d__cam::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #FF3B30; }
.g-3d__cam kbd { margin-left: 2px; }
.g-3d__slow { top: 14px; right: 14px; font-size: .95rem; padding: 6px 14px; }

/* 아래: 질문·판단 포인트·고르기를 화면 위에 겹친다 */
.g-3d__stage .g-3d__controls { position: absolute; left: 0; right: 0; bottom: 0; display: grid; justify-items: center; gap: 8px; padding: 46px 18px 16px; background: linear-gradient(180deg, transparent, rgb(5 8 22 / .78) 36%, rgb(5 8 22 / .92)); }
.g-3d__stage .g-3d__controls .g-timer { width: min(720px, 100%); height: 8px; }
.g-3d__stage .g-3d__event { max-width: 780px; text-align: center; color: #D9DDEB; font-size: .95rem; line-height: 1.5; }
.g-3d__stage .g-3d__q { font-size: clamp(1.25rem, 2.4vw, 1.65rem); text-shadow: 0 2px 10px rgb(0 0 0 / .6); }
.g-3d__stage .g-cues { justify-content: center; }
.g-3d__stage .g-cue { font-size: .88rem; padding: 4px 11px; }
.g-3d__stage .g3-act { min-height: 62px; font-size: 1.08rem; }
.g-3d__look { bottom: auto; left: auto; top: 54px; right: 14px; }
.g-3d.is-after .g-3d__controls { right: min(404px, 46%); opacity: 1; }
.g-3d.is-after .g-3d__controls .g-3d__event, .g-3d.is-after .g-3d__controls .g-timer { display: none; }
.g-3d .g-after--3d { top: 14px; bottom: 14px; right: 14px; width: min(380px, 44%); z-index: 2; }
@media (max-width: 1100px) { .g-3d__caption { max-width: calc(100% - 28px); top: 92px; font-size: 1.1rem; } .g-3d__caption.is-hit { font-size: 1.3rem; } .g-3d__look { display: none; } }
@media (max-width: 900px) {
  .g-3d__stage { height: auto; min-height: 0; overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .g-3d__view { position: relative; height: 58svh; min-height: 300px; border-radius: 18px; overflow: hidden; border: 1px solid var(--g-line); }
  .g-3d__stage .g-3d__controls { position: static; padding: 12px 0 0; background: none; }
  .g-3d.is-after .g-3d__controls { right: auto; }
  .g-bug { left: 8px; top: 8px; padding: 6px 10px 6px 8px; gap: 8px; }
  .g-bug__diamond { width: 46px; height: 33px; }
  .g-bug__sit b { font-size: 1.25rem; }
  .g-bug__me { font-size: .9rem; }
  .g-3d__caption { top: max(230px, calc(58svh - 62px)); max-width: calc(100% - 16px); font-size: 1rem; padding: 6px 12px; } .g-3d__caption.is-hit { font-size: 1.15rem; }
  .g-3d__cam, .g-3d__slow { top: 76px; right: 8px; font-size: .74rem; }
  .g-3d__cam kbd { display: none; }
}

/* ==========================================================================
   3D v3 — 끌어서 던지기·달리기, 정답 보기
   ========================================================================== */
/* 끌어서 고르는 판단: 아래 버튼은 작은 보조 칩으로 */
.g-3d.is-aimmode .g3-act { min-height: 40px; padding: 4px 12px 4px 8px; border-radius: 12px; font-size: .9rem; background: rgb(13 19 46 / .7); box-shadow: none; }
.g-3d.is-aimmode .g3-act svg { width: 18px; height: 18px; }
.g-3d.is-aimmode .g-3d__hint { color: #FFE3A3; font-weight: 800; font-size: .95rem; }
.g-3d.is-aimmode .g-3d__hint::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; border-radius: 50%; border: 2px dashed #FFE3A3; }
.g3-act.is-aim { border-color: #fff; background: rgb(60 46 18 / .95); transform: translateY(-2px); }
.g-3d.is-aimmode .g-3d__view canvas { cursor: crosshair; }
.g-3d__view.is-aiming canvas { cursor: grabbing; }
/* 조준 중인 이름표 */
.g3-label--pick.is-aim { background: #F2CB86; color: #1A1305; border-color: #fff; box-shadow: 0 0 0 4px rgb(255 255 255 / .35), 0 0 28px rgb(242 203 134 / .8); transform-origin: 50% 100%; }
.g3-label--pick.is-aim kbd { background: #1A1305; color: #F2CB86; }
.g3-or { font-style: normal; font-size: .72rem; font-weight: 700; opacity: .7; margin: 0 2px; }
/* 제자리 (내 발밑): 화면 아래 가운데 */
.g3-label--here { border-style: dashed; background: rgb(14 18 40 / .82); }
.g3-here-ico { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--g-gold); position: relative; flex: none; }
.g3-here-ico::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--g-gold); }
/* 같은 곳 보기 둘: 놓은 자리에서 고르기 */
.g3-menu { position: absolute; left: 0; top: 0; display: grid; gap: 6px; padding: 8px; border-radius: 16px; background: rgb(8 12 32 / .94); border: 1.5px solid var(--g-gold); box-shadow: 0 14px 40px rgb(0 0 0 / .55); pointer-events: auto; z-index: 3; }
.g3-menu button { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 8px; border-radius: 12px; border: 1px solid rgb(255 255 255 / .2); background: rgb(255 255 255 / .06); color: #fff; font: 800 1rem var(--font-sans); text-align: left; cursor: pointer; }
.g3-menu button:hover, .g3-menu button:focus-visible { background: rgb(60 46 18 / .95); border-color: var(--g-gold); }
.g3-menu kbd { margin: 0; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--g-gold); color: #1A1305; opacity: 1; display: inline-grid; place-items: center; }

/* 판단 뒤: 단계별 정리 */
.g-review { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: rv; }
.g-review li { counter-increment: rv; position: relative; display: grid; gap: 3px; padding: 9px 12px 10px 40px; border-radius: 14px; background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .1); transition: background-color .2s, border-color .2s, opacity .2s; }
.g-review li::before { content: counter(rv); position: absolute; left: 10px; top: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / .14); color: #fff; font: 800 .78rem var(--font-sans); }
.g-review__k { font-size: .76rem; font-weight: 800; letter-spacing: .04em; color: var(--g-muted); }
.g-review p { margin: 0; color: #C9CEE0; font-size: .9rem; line-height: 1.6; }
.g-review strong { display: block; color: #F4F1EA; font-size: 1rem; font-weight: 800; }
.g-review__cue { display: inline-block; margin: 2px 2px 0 0; padding: 0 7px; border-radius: 6px; background: rgb(242 203 134 / .18); border: 1px solid rgb(242 203 134 / .45); color: #FFE3A3; font-weight: 800; font-size: .82rem; }
.g-review__rule { display: block; margin-top: 6px; font-style: normal; font-weight: 700; color: #E7EAF3; }
.g-review__rule b { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 6px; background: var(--g-gold); color: #1A1305; font-size: .72rem; }
.g-review li.is-good { border-color: rgb(95 211 148 / .5); background: rgb(20 60 40 / .45); }
.g-review li.is-good::before { background: var(--g-good); color: #0B1026; }
.g-review li.is-good strong { color: #8FF0BA; }
.g-review li.is-bad { border-color: rgb(255 107 107 / .45); background: rgb(70 20 26 / .4); }
.g-review li.is-bad::before { background: var(--g-out); }
.g-review li.is-ok { border-color: rgb(255 210 122 / .45); }
.g-review li.is-now { border-color: #fff; box-shadow: 0 0 0 2px rgb(255 255 255 / .25), 0 0 22px rgb(242 203 134 / .35); }
.g-review li.is-now::before { background: #fff; color: #1A1305; }
.g-review li.is-done::before { content: "✓"; }
.g-after__btns { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.g-review-btn { gap: 6px; border-color: rgb(95 211 148 / .6); color: #8FF0BA; }
.g-review-btn svg { width: 14px; height: 14px; fill: currentColor; }
.g-review-btn kbd { margin-left: 4px; }
/* 정답 보기 중엔 아래 조작판을 치워 장면이 잘 보이게 */
.g-3d.is-review .g-3d__controls { display: none; }
@media (max-width: 900px) {
  .g-3d.is-aimmode .g3-act { flex: 1 1 calc(50% - 8px); }
  .g-after__btns { grid-template-columns: 1fr; }
}

/* ==========================================================================
   3D v4 — 글은 줄이고 몸으로: 직접 뛰기 패드, 짧은 결과
   ========================================================================== */
/* 경기 중엔 긴 설명·판단 포인트 칩을 숨긴다 (상황판·자막·장면이 대신 말해 준다) */
.g-3d.is-lean .g-3d__event, .g-3d.is-lean #g3-cues { display: none; }
.g-3d.is-act .g-3d__q, .g-3d.is-act .g-3d__actions, .g-3d.is-act #g3-timer { display: none; }
.g-3d.is-act.is-after .g-3d__controls { display: none; }
.g-3d.is-lean .g-3d__controls { padding-top: 30px; }
/* 직접 뛰기 패드 */
.g3-pad { display: flex; justify-content: center; align-items: stretch; gap: 10px; pointer-events: auto; }
.g3-pad[hidden] { display: none; }
.g3-pad__btn { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; min-width: 110px; min-height: 74px; padding: 8px 14px; border-radius: 18px; border: 1.5px solid rgb(255 255 255 / .25); background: rgb(13 19 46 / .8); color: #fff; font: 800 1rem var(--font-sans); touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
.g3-pad__btn kbd { margin: 0 0 2px; min-width: 30px; }
.g3-pad__btn small { font-size: .7rem; font-weight: 700; color: var(--g-muted); }
.g3-pad__btn--run { min-width: 200px; border-color: var(--g-gold); background: linear-gradient(180deg, rgb(60 46 18 / .9), rgb(30 24 10 / .9)); font-size: 1.15rem; }
.g3-pad__btn.is-down { transform: translateY(2px) scale(.98); border-color: #fff; background: rgb(90 68 24 / .95); }
.g3-pad__btn--run.is-fast { box-shadow: 0 0 0 3px rgb(255 255 255 / .3), 0 0 26px rgb(242 203 134 / .8); }
.g3-speed { position: absolute; left: 12px; right: 12px; bottom: 6px; height: 5px; border-radius: 3px; background: rgb(255 255 255 / .14); overflow: hidden; }
.g3-speed b { position: absolute; inset: 0; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, #5FD394, #F2CB86 70%, #FF8A65); }
.g-3d.is-act .g-3d__hint { color: #FFE3A3; font-weight: 800; font-size: 1rem; }
.g-3d__view.is-ctl canvas { cursor: pointer; }
/* 짧은 결과 */
.g-after__mine { font-weight: 700; color: #C9CEE0; }
.g-after__mine b { color: #fff; }
.g-after__more > summary { margin-top: 2px; }
.g-after__more .g-review { margin-top: 10px; }
@media (max-width: 900px) {
  .g3-pad { width: 100%; }
  .g3-pad__btn { flex: 1 1 0; min-width: 0; min-height: 84px; }
  .g3-pad__btn--run { flex: 2 1 0; }
}

/* 나 = 히누: 얼굴 아이콘 이름표 */
.g3-label--me { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px 2px 2px; border-radius: 999px; background: var(--g-gold); color: #1A1305; font: 800 .88rem var(--font-sans); box-shadow: 0 0 0 2px #fff, 0 6px 16px rgb(0 0 0 / .45); }
.g3-label--me img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; background: #fff; }
.g-bug__me { gap: 6px; }
.g-bug__face { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid #F4A7B1; flex: none; }
/* 던지기: 공(동그라미)을 잡고 끌기. 나머지 드래그는 둘러보기 */
.g3-grab { position: absolute; left: 0; top: 0; display: grid; justify-items: center; gap: 4px; pointer-events: none; }
.g3-grab[hidden] { display: none; }
.g3-grab i { width: 92px; height: 92px; border-radius: 50%; border: 3px dashed #FFE3A3; box-shadow: 0 0 22px rgb(242 203 134 / .55), inset 0 0 18px rgb(242 203 134 / .35); }
.fx-on .g3-grab i { animation: grabpulse 1.2s ease-in-out infinite; }
@keyframes grabpulse { 50% { transform: scale(1.08); } }
.g3-grab span { padding: 2px 10px; border-radius: 999px; background: rgb(8 12 32 / .85); color: #FFE3A3; font: 800 .8rem var(--font-sans); white-space: nowrap; }
.g3-grab.is-held i { border-style: solid; border-color: #fff; }
.g-3d__view canvas { cursor: grab; }
.g-3d__view.is-looking canvas { cursor: grabbing; }
.g-3d.is-aimmode .g-3d__view canvas { cursor: grab; }
.g-3d.is-aimmode .g-3d__view.is-grab canvas { cursor: pointer; }

/* 마우스: 기본은 잡는 손(드래그 = 둘러보기), 고를 곳 위에선 손가락 */
.g-3d__view canvas, .g-3d.is-aimmode .g-3d__view canvas { cursor: grab; }
.g-3d__view.is-looking canvas { cursor: grabbing; }
.g-3d__view.is-pick canvas { cursor: pointer; }
.g-3d__view.is-panning canvas { cursor: move; }

/* ==========================================================================
   v5 — 연습 고르기, 가운데 결과 카드, 속도선
   ========================================================================== */
.g-menu__label { margin: 4px 0 -2px; font-size: .82rem; font-weight: 800; letter-spacing: .06em; color: var(--g-muted); }
.g-menu__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.g-btn--mode { display: grid; justify-items: start; align-content: center; gap: 2px; min-height: 64px; padding: 8px 16px; text-align: left; }
.g-btn--mode b { font-size: 1.1rem; }
.g-btn--mode small { font-size: .78rem; font-weight: 700; color: var(--g-muted); }
.g-menu .g-btn--main small { margin-left: 8px; font-size: .78rem; font-weight: 700; opacity: .75; }
/* 판단이 끝나면 결과 카드는 화면 가운데 (정답 보기 중엔 오른쪽으로 비켜 장면을 보여 준다) */
@media (min-width: 901px) {
  .g-3d .g-after--3d { inset: 0; margin: auto; height: fit-content; width: min(460px, calc(100% - 40px)); max-height: calc(100% - 40px); box-shadow: 0 24px 70px rgb(0 0 0 / .6); }
  .g-3d.is-after:not(.is-review) .g-3d__controls { display: none; }
  .g-3d.is-review .g-after--3d { inset: 14px 14px 14px auto; margin: 0; height: auto; width: min(380px, 40%); max-height: none; }
}
/* 전력질주 속도선 */
.g3-speedlines { position: absolute; inset: -4%; pointer-events: none; background: url("../img/ui/speedlines.webp") center / cover no-repeat; opacity: calc(var(--spd, 0) * .35); mix-blend-mode: screen; transition: opacity .15s linear; }
.fx-on .g3-speedlines { animation: spdpulse .18s steps(2) infinite; }
@keyframes spdpulse { 50% { transform: scale(1.03); } }

/* 베이스 패드: 다이아몬드 모양 (게임패드 버튼 = 베이스) */
.g3-bpad { position: absolute; right: 18px; bottom: 18px; width: 210px; height: 170px; pointer-events: auto; z-index: 2; }
.g3-bpad[hidden] { display: none; }
.g3-bpad__b { position: absolute; display: grid; justify-items: center; gap: 1px; width: 70px; padding: 6px 0; border-radius: 14px; border: 1.5px solid rgb(255 255 255 / .28); background: rgb(13 19 46 / .88); color: #fff; font: 800 .88rem var(--font-sans); cursor: pointer; box-shadow: 0 6px 16px rgb(0 0 0 / .4); }
.g3-bpad__b kbd { margin: 0; }
.g3-bpad__b--2 { left: 70px; top: 0; }
.g3-bpad__b--3 { left: 0; top: 56px; }
.g3-bpad__b--1 { right: 0; top: 56px; }
.g3-bpad__b--h { left: 70px; bottom: 0; }
.g3-bpad__b--c { left: 78px; top: 64px; width: 54px; padding: 3px 0; font-size: .74rem; border-radius: 50%; aspect-ratio: 1; align-content: center; }
.g3-bpad__b:hover:not(:disabled), .g3-bpad__b:focus-visible, .g3-bpad__b.is-down { border-color: var(--g-gold); background: rgb(90 68 24 / .95); }
.g3-bpad__b:disabled { opacity: .28; cursor: default; }
.g-3d.is-bpad .g-3d__actions { display: none; }
@media (max-width: 900px) { .g3-bpad { position: relative; right: auto; bottom: auto; margin: 6px auto 0; } }

/* 주자 레이더 (왼쪽 아래 미니 다이아몬드) */
.g3-radar { position: absolute; left: 14px; bottom: 34px; width: 150px; height: 140px; padding: 8px; border-radius: 16px; background: rgb(6 9 26 / .78); border: 1px solid rgb(255 255 255 / .16); pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 1; }
.g3-radar.is-on { opacity: 1; }
.g3-radar__in { fill: rgb(196 150 104 / .35); stroke: rgb(255 255 255 / .55); stroke-width: .6; }
.g3-radar__line { stroke: rgb(255 255 255 / .35); stroke-width: .5; fill: none; }
.g3-radar__base { fill: #fff; }
.g3-radar__dot--mate { fill: #9DBDFF; stroke: #1B2556; stroke-width: .6; }
.g3-radar__dot--opp { fill: #FF8A80; stroke: #5a1010; stroke-width: .6; }
.g3-radar__dot--fld { fill: #FF8A80; opacity: .5; }
.g3-radar__dot--me { fill: #F4A7B1; stroke: #fff; stroke-width: 1; }
.g3-radar__dot--ball { fill: #fff; }
.g-3d.is-aimmode .g3-radar, .g-3d.is-act .g3-radar { bottom: 34px; }
@media (max-width: 900px) { .g3-radar { width: 104px; height: 98px; left: 8px; bottom: 8px; padding: 5px; } }
.g-after__time { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: rgb(95 211 148 / .16); border: 1px solid rgb(95 211 148 / .45); color: #8FF0BA; font-size: .8rem; font-weight: 800; }

/* 약점 연습 · 상황별 정답률 */
.g-3d.is-preplay .g-3d__controls { display: none; }
.g-btn--weak { grid-column: 1 / -1; border-color: rgb(255 138 128 / .5); }
.g-btn--weak b { color: #FFB4AC; }
.g-kindacc { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 6px; }
.g-kindacc li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 3.2em 3.4em; align-items: center; gap: 10px; font-size: .9rem; }
.g-kindacc li small { color: var(--g-muted); text-align: right; }
.g-kindacc li.is-weak span { color: #FFB4AC; font-weight: 800; }

/* 숫자로 보면 · 규칙 근거 */
.g-after__math { display: flex; align-items: baseline; gap: 8px; padding: 9px 12px; border-radius: 12px; background: rgb(157 189 255 / .1); border: 1px solid rgb(157 189 255 / .3); font-weight: 700; font-size: .9rem; line-height: 1.6; color: #E7EAF3; }
.g-after__math b { flex: none; padding: 1px 7px; border-radius: 6px; background: #9DBDFF; color: #0B1026; font-size: .74rem; font-weight: 800; }
.g-after__math small { display: block; margin-top: 2px; color: var(--g-muted); font-size: .72rem; font-weight: 600; }
.g-refs { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgb(255 255 255 / .04); border: 1px dashed rgb(255 255 255 / .2); }
.g-refs__h { margin: 0 0 6px; font-weight: 800; font-size: .85rem; }
.g-refs__h small { margin-left: 6px; color: var(--g-muted); font-weight: 600; font-size: .72rem; }
.g-refs ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.g-refs li { font-size: .84rem; line-height: 1.55; color: #C9CEE0; }
.g-refs li b { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 6px; background: rgb(255 255 255 / .12); color: #fff; font-size: .74rem; }

/* ==========================================================================
   상황 브리핑 — 플레이 전에 상황부터
   ========================================================================== */
.g-3d.is-brief .g-3d__controls, .g-3d.is-brief .g-3d__caption, .g-3d.is-brief .g3-radar { display: none; }
.g3-brief { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0 auto; width: min(600px, calc(100% - 28px)); display: grid; gap: 10px; padding: 16px 20px 18px; border-radius: 20px; background: rgb(6 9 26 / .9); border: 1px solid rgb(255 255 255 / .18); box-shadow: 0 20px 60px rgb(0 0 0 / .55); z-index: 3; }
.g3-brief[hidden] { display: none; }
.g3-brief__kicker { margin: 0; font: 800 .8rem var(--font-sans); letter-spacing: .06em; color: var(--g-gold); }
.g3-brief__top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.g3-brief__sit { margin: 0; font: 800 2.1rem/1.1 var(--font-display); letter-spacing: -0.02em; color: #fff; }
.g3-brief__outs { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.g3-brief__outs i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--g-out); }
.g3-brief__outs i.on { background: var(--g-out); box-shadow: 0 0 10px rgb(255 107 107 / .7); }
.g3-brief__outs b { margin-left: 4px; font-weight: 800; color: #FFB4AC; }
.g3-brief__me { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.12rem; color: #F4F1EA; }
.g3-brief__me img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #F4A7B1; object-fit: cover; }
.g3-brief__me b { color: #F4A7B1; }
.g3-brief__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.g3-brief__facts:empty { display: none; }
.g3-brief__facts li { display: inline-flex; gap: 6px; padding: 4px 10px; border-radius: 10px; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .16); font-size: .9rem; }
.g3-brief__facts span { color: var(--g-muted); font-weight: 700; }
.g3-brief__facts b { color: #fff; }
.g3-brief__check { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: .86rem; color: #D9DDEB; }
.g3-brief__check b { margin-right: 4px; padding: 1px 8px; border-radius: 6px; background: var(--g-gold); color: #1A1305; font-size: .74rem; }
.g3-brief__check i { font-style: normal; opacity: .55; }
.g3-brief__go { justify-self: stretch; min-height: 54px; font-size: 1.05rem; }
.g3-label--brief { padding: 2px 9px; border-radius: 999px; background: rgb(255 255 255 / .92); color: #1A1305; font: 800 .8rem var(--font-sans); box-shadow: 0 4px 12px rgb(0 0 0 / .4); }
.fx-on .g3-brief:not([hidden]) { animation: rise .3s ease both; }
@media (max-width: 900px) {
  .g3-brief { position: relative; bottom: auto; width: auto; margin: 10px 0 0; }
  .g3-brief__sit { font-size: 1.6rem; }
}

/* 일시정지: 지금 상황 다시 보기 */
.g-pause__sit:empty { display: none; }
.g-pause__sit { padding: 10px 12px; border-radius: 12px; background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .14); text-align: left; }
.g-pause__sit-k { margin: 0 0 2px; font-size: .74rem; font-weight: 800; letter-spacing: .06em; color: var(--g-gold); }
.g-pause__sit-h { margin: 0 0 6px; font-weight: 800; font-size: 1.05rem; }
.g-pause__sit ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: .88rem; }
.g-pause__sit span { color: var(--g-muted); font-weight: 700; }

/* SBO 달리는 모션: 왼팔·오른팔 번갈아 */
.g3-pump { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px 6px 18px; border-radius: 20px; border: 1.5px dashed rgb(242 203 134 / .55); background: rgb(60 46 18 / .35); }
.g3-pump[hidden] { display: none; }
.g3-pump.is-on { border-style: solid; border-color: #fff; box-shadow: 0 0 22px rgb(242 203 134 / .6); }
.g3-pad__btn--pump { min-width: 92px; min-height: 66px; border-color: var(--g-gold); }
.g3-pump__tip { position: absolute; left: 0; right: 0; bottom: 3px; text-align: center; font-size: .68rem; font-weight: 800; color: #FFE3A3; }
.g3-pad:not(.is-easy) .g3-pad__btn--run { min-width: 110px; font-size: 1rem; background: rgb(13 19 46 / .8); border-color: rgb(255 255 255 / .25); }
@media (max-width: 900px) { .g3-pad { flex-wrap: wrap; } .g3-pump { flex: 1 1 100%; order: -1; } .g3-pad__btn--pump { min-height: 76px; } }

/* 결과 판정 (베이스 위) */
.g3-call { display: grid; justify-items: center; gap: 2px; padding: 6px 16px 8px; border-radius: 14px; font: 900 1.9rem/1 var(--font-display); letter-spacing: .02em; box-shadow: 0 10px 30px rgb(0 0 0 / .5); border: 2px solid #fff; }
.g3-call small { font: 800 .8rem var(--font-sans); letter-spacing: 0; opacity: .9; }
.g3-call--out { background: #E5484D; color: #fff; }
.g3-call--safe { background: #2FB36B; color: #fff; }
.g3-call--run { background: #C8322F; color: #fff; }
.g3-call--hold, .g3-call--nice { background: #F2CB86; color: #1A1305; }
.g3-call--miss { background: #4A5170; color: #fff; }
.fx-on .g3-call { animation: callpop .35s cubic-bezier(.3, 1.6, .6, 1) both; }
@keyframes callpop { from { opacity: 0; scale: .5; } }
/* 같은 상황 다시 · 한 가지만 바꾸기 */
.g-after__again { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.g-after__again .g-btn { font-size: .86rem; }

/* 레슨 */
.g-btn--lesson { display: grid; justify-items: start; gap: 2px; min-height: 66px; padding: 8px 18px; text-align: left; }
.g-btn--lesson b { font-size: 1.2rem; }
.g-btn--lesson small { font-size: .78rem; font-weight: 700; opacity: .8; }
.g-lessons__map { display: grid; gap: 18px; }
.g-lgroup h3 { margin: 0 0 8px; font: 800 1.05rem var(--font-display); color: var(--g-gold); }
.g-lgroup ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.g-lesson { width: 100%; display: grid; justify-items: start; gap: 4px; padding: 12px 14px; border-radius: 16px; border: 1.5px solid rgb(255 255 255 / .18); background: rgb(13 19 46 / .7); color: var(--g-ink); font: inherit; text-align: left; cursor: pointer; }
.g-lesson:hover, .g-lesson:focus-visible { border-color: var(--g-gold); background: rgb(40 34 20 / .9); }
.g-lesson b { font-size: 1rem; }
.g-lesson small { color: var(--g-muted); font-size: .78rem; font-weight: 700; }
.g-lesson.is-done { border-color: rgb(95 211 148 / .6); }
.g3-brief__lesson { padding: 8px 12px; border-radius: 12px; background: rgb(242 203 134 / .1); border: 1px solid rgb(242 203 134 / .35); }
.g3-brief__lesson[hidden] { display: none; }
.g3-brief__lk { margin: 0 0 4px; font-weight: 800; color: #FFE3A3; font-size: .9rem; }
.g3-brief__rule { margin: 0; font-size: .92rem; line-height: 1.55; color: #F4F1EA; }
.g3-brief__rule b { margin-right: 6px; padding: 0 6px; border-radius: 6px; background: var(--g-gold); color: #1A1305; font-size: .74rem; }
/* 힌트 상자 (레슨 2단계) */
.g3-hintbox { position: absolute; left: 0; right: 0; top: 74px; margin: 0 auto; width: fit-content; max-width: min(640px, calc(100% - 28px)); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 14px; border-radius: 14px; background: rgb(6 9 26 / .88); border: 2px solid #FFE3A3; box-shadow: 0 0 24px rgb(242 203 134 / .45); z-index: 2; }
.g3-hintbox[hidden] { display: none; }
.g3-hintbox b { padding: 1px 8px; border-radius: 6px; background: #FFE3A3; color: #1A1305; font-size: .8rem; }
.g3-hintbox span { font-weight: 700; color: #D9DDEB; }
.g3-hintbox em { font-style: normal; font-weight: 800; color: #fff; }
.g3-hintbox small { flex-basis: 100%; color: #FFE3A3; font-size: .8rem; font-weight: 700; }
.g3-demo-next { position: absolute; left: 0; right: 0; bottom: 24px; margin: 0 auto; width: fit-content; min-height: 56px; padding: 0 28px; z-index: 3; }
.g3-demo-next[hidden] { display: none; }

/* 어려운 용어 각주 (sim-terms.js) */
.fn { position: relative; text-decoration: underline dotted rgb(242 203 134 / .7); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.fn__n { margin-left: 1px; font-size: .66em; font-weight: 800; color: var(--g-gold); line-height: 0; }
@media (hover: hover) {
  .fn:hover::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); z-index: 60; width: max-content; max-width: min(300px, 80vw); transform: translateX(-50%); padding: 8px 10px; border-radius: 10px; background: #f6f1e4; color: #10162e; font-size: .8rem; font-weight: 600; line-height: 1.5; white-space: normal; text-align: left; box-shadow: 0 8px 22px rgb(0 0 0 / .4); pointer-events: none; }
}
.fn-box { margin-top: 12px; padding-top: 8px; border-top: 1px dashed rgb(255 255 255 / .16); font-size: .8rem; line-height: 1.55; color: var(--g-muted); text-align: left; }
.fn-box__h { margin-bottom: 3px; font-size: .74rem; font-weight: 800; color: var(--g-gold); }
.fn-list { display: grid; gap: 2px; padding-left: 1.5em; list-style: decimal; }
.fn-list li::marker { font-weight: 800; color: var(--g-gold); }
.fn-list b { margin-right: 4px; color: #fff; }
/* 3D 조작판 아래: 한 줄로 짧게 */
.g3-fn:empty, .g-fnq:empty, .g3-brief__fn:empty { display: none; }
.fn-box--line { margin-top: 6px; padding-top: 0; border-top: 0; }
.fn-box--line .fn-box__h { display: none; }
.fn-box--line .fn-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; padding: 0; list-style: none; counter-reset: fnl; }
.fn-box--line .fn-list li { counter-increment: fnl; font-size: .76rem; }
.fn-box--line .fn-list li::before { content: counter(fnl) " "; font-weight: 800; color: var(--g-gold); }
.g3-brief .fn-box { margin-top: 8px; }
.g-after .fn-box { margin-top: 10px; }

/* ---------- 타이틀 (정리판: 시작 버튼 하나 · 연습 타일 · 설정은 창으로) ---------- */
.g-title__lead { max-width: 36ch; }
.g-start { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 14px; width: min(480px, 100%); margin-top: 22px; padding: 14px 16px 14px 14px; border: 0; border-radius: 18px; text-align: left; color: #1A1305; background: linear-gradient(105deg, #C99D41, #E1BF86 60%, #F3D9A6); box-shadow: 0 10px 30px rgb(201 157 65 / .35), inset 0 1px 0 rgb(255 255 255 / .45); cursor: pointer; transition: transform .12s, filter .12s; }
.g-start:hover { filter: brightness(1.06); }
.g-start:active { transform: translateY(1px) scale(.99); }
.g-start__ic { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 4px 8px rgb(0 0 0 / .25)); }
.g-start__text { display: grid; gap: 1px; min-width: 0; }
.g-start__text small { font-size: .78rem; font-weight: 800; letter-spacing: .04em; opacity: .75; }
.g-start__text b { font: 800 1.35rem var(--font-display); line-height: 1.2; }
.g-start__text span { font-size: .84rem; font-weight: 700; opacity: .8; }
.g-start__go { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #1A1305; color: #F3D9A6; font-size: 1rem; }
.g-load { display: flex; align-items: center; gap: 10px; width: min(480px, 100%); margin-top: 8px; font-size: .8rem; font-weight: 700; color: var(--g-muted); }
.g-load[hidden] { display: none; }
.g-load i { flex: 1; height: 6px; border-radius: 99px; background: rgb(255 255 255 / .1); overflow: hidden; }
.g-load b { display: block; height: 100%; background: var(--g-gold); transform-origin: left; transform: scaleX(0); transition: transform .2s; }
.g-title .g-menu { max-width: 560px; gap: 10px; margin-top: 22px; }
.g-menu__label small { margin-left: 6px; font-weight: 700; opacity: .7; letter-spacing: 0; }
.g-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.g-tile { display: grid; justify-items: center; align-content: start; gap: 2px; min-height: 150px; padding: 12px 8px 10px; border-radius: 16px; border: 1.5px solid rgb(255 255 255 / .16); background: rgb(255 255 255 / .06); color: var(--g-ink); text-align: center; cursor: pointer; transition: transform .12s, background-color .12s, border-color .12s; }
.g-tile:hover { background: rgb(255 255 255 / .12); border-color: var(--g-gold); transform: translateY(-2px); }
.g-tile img { width: 56px; height: 56px; object-fit: contain; margin-bottom: 4px; filter: drop-shadow(0 4px 8px rgb(0 0 0 / .35)); }
.g-tile b { font-size: 1.08rem; }
.g-tile small { font-size: .74rem; font-weight: 700; color: var(--g-muted); line-height: 1.35; }
.g-tile__stat { display: grid; margin-top: auto; padding-top: 6px; font-size: .72rem; font-weight: 700; color: var(--g-muted); }
.g-tile__stat b { font-size: .8rem; color: var(--g-gold); }
.g-tile__stat em { font-style: normal; color: var(--g-good); }
.g-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.g-chipbtn { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; border-radius: 14px; border: 1.5px solid rgb(255 255 255 / .14); background: rgb(255 255 255 / .05); color: var(--g-ink); text-align: left; cursor: pointer; }
.g-chipbtn:hover { background: rgb(255 255 255 / .11); border-color: rgb(255 255 255 / .35); }
.g-chipbtn img { flex: none; width: 32px; height: 32px; object-fit: contain; }
.g-chipbtn span { display: grid; min-width: 0; }
.g-chipbtn b { font-size: .98rem; }
.g-chipbtn small { font-size: .74rem; font-weight: 700; color: var(--g-muted); }
.g-chipbtn--weak { border-color: rgb(255 138 128 / .45); }
.g-chipbtn--weak b { color: #FFB4AC; }
.g-title__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.g-tool--wide small { margin-left: 4px; font-size: .74rem; font-weight: 700; color: var(--g-muted); }
.g-title__tools .g-menu__study { margin-left: 4px; font-size: .86rem; }
@media (max-width: 860px) { .g-card { order: 2; width: min(280px, 80%); } }
@media (max-width: 640px) { .g-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-tile { min-height: 132px; } .g-more { grid-template-columns: 1fr 1fr; } }

/* 설정 · 조작법 창 */
.g-dialog { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgb(5 8 20 / .78); backdrop-filter: blur(6px); }
.g-dialog[hidden] { display: none; }
.g-dialog__box { display: grid; gap: 14px; width: min(460px, 100%); max-height: calc(100svh - 32px); overflow: auto; padding: 22px; border-radius: 22px; background: var(--g-glass-2); border: 1px solid var(--g-line); box-shadow: 0 30px 60px rgb(0 0 0 / .5); }
.g-dialog__box--wide { width: min(720px, 100%); }
.g-dialog__head { display: flex; align-items: center; justify-content: space-between; }
.g-dialog__head h2 { font: 800 1.5rem var(--font-display); }
.g-set { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; }
.g-set legend { margin-bottom: 4px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; color: var(--g-gold); }
.g-set .g-check { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 10px 12px; border-radius: 12px; background: rgb(255 255 255 / .04); color: var(--g-ink); }
.g-set .g-check input { flex: none; margin-top: 2px; }
.g-set .g-check span { display: grid; gap: 2px; }
.g-set .g-check b { font-size: .96rem; }
.g-set .g-check small { font-size: .8rem; font-weight: 600; color: var(--g-muted); line-height: 1.45; }
.g-set .g-check:has(input:disabled) { opacity: .5; }
.g-keymap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.g-keymap section { display: grid; gap: 4px; align-content: start; padding: 12px; border-radius: 14px; background: rgb(255 255 255 / .04); font-size: .88rem; line-height: 1.7; }
.g-keymap h3 { font-size: .8rem; font-weight: 800; letter-spacing: .06em; color: var(--g-gold); }
.g-keymap kbd { margin: 0 2px; }
.g-keymap__note { font-size: .8rem; color: var(--g-muted); }
@media (max-width: 600px) { .g-keymap { grid-template-columns: 1fr; } }

/* 3D 선수 불러오는 중 */
.g-loading { position: fixed; left: 50%; top: 45%; z-index: 55; display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 16px; background: var(--g-glass-2); border: 1px solid var(--g-line); transform: translate(-50%, -50%); font-weight: 700; }
.g-loading[hidden] { display: none; }
.g-loading { flex-wrap: wrap; width: min(380px, calc(100% - 32px)); }
.g-loading small { display: block; margin-top: 5px; color: var(--g-muted); font-size: .76rem; font-weight: 400; }
.g-loading .g-btn { width: 100%; }
.g-device-note { color: var(--g-muted); font-size: .78rem; line-height: 1.7; margin: 10px 0; }
.g-device-note[hidden] { display: none; }
.g-loading__spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgb(255 255 255 / .2); border-top-color: var(--g-gold); animation: gspin .8s linear infinite; }
@keyframes gspin { to { transform: rotate(360deg); } }

/* 처음 몇 판: 브리핑 팁 · 조작법 창 등번호 */
.g3-brief__tip { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgb(242 203 134 / .1); border: 1px dashed rgb(242 203 134 / .35); font-size: .78rem; font-weight: 600; line-height: 1.7; color: var(--g-ink); }
.g3-brief__tip[hidden] { display: none; }
.g3-brief__tip b { margin-right: 6px; color: var(--g-gold); }
.g3-brief__tip kbd { margin: 0 2px; }

/* 학습의 중심은 해설. 경기장을 가리지 않는 넓은 옆 패널로 읽는다. */
.g-flow { display: flex; gap: 12px; list-style: none; padding: 0; margin: 16px 0 4px; }
.g-flow li { display: flex; align-items: center; gap: 7px; flex: 1; padding: 10px 12px; border-bottom: 2px solid #ffffff16; color: var(--g-muted); font-size: .86rem; font-weight: 700; }
.g-flow span { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: #ffffff0c; }
.g-flow [aria-current] { color: var(--g-gold); border-color: var(--g-gold); }
.g-flow [aria-current] span { background: var(--g-gold); color: #17223b; }
.g-flow .is-done { color: #a6cbbb; border-color: #a6cbbb70; }
.g-3d.is-after .g-3d__controls { display: none; }
.g-3d__stage { scroll-margin-top: 12px; }
.g3-resolve-skip { position: absolute; right: 18px; bottom: 20px; z-index: 12; background: #17223bf0; }
.g3-resolve-skip[hidden] { display: none; }
.g-3d.is-deciding:not(.is-act) .g-3d__event { display: block; font-size: 1rem; line-height: 1.7; }
.g-3d.is-deciding #g3-cues { display: flex; }
.g-3d.is-deciding .g-cue { font-size: .9rem; }
@media (max-width: 900px) {
  .g-3d__stage { max-height: none; aspect-ratio: auto; }
  .g-3d__stage .g-3d__controls { padding: 18px 4px 4px; }
}
@media (max-width: 600px) {
  .g-flow { gap: 5px; }
  .g-flow li { gap: 5px; padding: 9px 0; font-size: .76rem; white-space: nowrap; }
  .g-flow span { width: 21px; height: 21px; }
}
.g-3d__lesson-panel { display: none; min-width: 0; }
.g-training { min-width: 0; margin: 20px 0; padding: 0; border: 0; }
.g-training legend { margin-bottom: 9px; font-size: .85rem; font-weight: 800; color: var(--g-gold); }
.g-training__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.g-training__options button { display: grid; align-content: start; gap: 7px; padding: 14px; text-align: left; border: 1px solid #ffffff30; border-radius: 12px; background: #151e36; color: var(--g-ink); cursor: pointer; }
.g-training__options button[aria-pressed='true'] { border-color: var(--g-gold); background: #edc98514; box-shadow: inset 0 0 0 1px var(--g-gold); }
.g-training__options button b { font-size: 1rem; line-height: 1.5; }
.g-training__options button span, .g-training > p { font-size: .82rem; line-height: 1.65; color: var(--g-muted); }
.g-training > p { margin: 9px 0 0; min-height: 2em; }
.g-training__options button:focus-visible { outline: 3px solid var(--g-gold); outline-offset: 3px; }
.g3-brief__glossary summary, .g-after__glossary summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; color: var(--g-muted); font-size: .95rem; }
.g3-brief__glossary summary::before, .g-after__glossary summary::before { content: '+'; color: var(--g-gold); }
.g3-brief__glossary[open] summary::before, .g-after__glossary[open] summary::before { content: '−'; }
.g-after__clues { padding: 14px 16px; border-radius: 12px; background: #edc98510; border: 1px solid #edc98538; }
.g-after__clues > b, .g-after__feedback > b { display: block; margin-bottom: 8px; font-size: .84rem; color: var(--g-gold); }
.g-after__clues ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.g-after__clues li { font-size: .95rem; line-height: 1.7; color: var(--g-muted); }
.g-after__clues strong { color: var(--g-ink); margin-left: 4px; }
.g-after__feedback { margin: 0; padding: 14px 16px; border-left: 3px solid #e6a19e; background: #e6a19e0a; font-size: 1rem; line-height: 1.8; }
.g-learning-summary { margin: 22px 0; padding: 20px; border: 1px solid #edc98538; border-radius: 16px; background: #edc9850a; text-align: left; }
.g-learning-summary h3 { margin: 0 0 12px; color: var(--g-gold); font-size: 1.1rem; }
.g-learning-summary p { line-height: 1.8; font-size: 1rem; margin: 8px 0; }
.g-learning-summary p b { display: block; color: var(--g-muted); font-size: .85rem; }
.g-learning-summary .g-btn { margin-top: 8px; width: 100%; }
.g-stamp { overflow: hidden; }
.g-3d__lesson-panel:has(> :not([hidden])) { display: grid; gap: 16px; }
.g-3d .g-3d__lesson-panel .g3-brief,
.g-3d .g-3d__lesson-panel .g-after--3d { position: static; inset: auto; width: 100%; height: auto; max-height: none; overflow: visible; margin: 0; padding: 26px; background: #151e36; border: 1px solid #ffffff2e; border-radius: 20px; box-shadow: 0 14px 40px #03091940; }
.g-3d__lesson-panel .g3-brief { gap: 16px; }
.g-3d__lesson-panel .g3-brief__rule,
.g-3d__lesson-panel .g3-brief__check,
.g-3d__lesson-panel .g-after__mine,
.g-3d__lesson-panel .g-after__rule,
.g-3d__lesson-panel .g-review p { font-size: 1rem; line-height: 1.8; }
.g-3d__lesson-panel .g3-brief__facts li { padding: 7px 11px; font-size: .95rem; }
.g-3d__lesson-panel .g3-brief__lesson { padding: 14px 16px; }
.g-3d__lesson-panel .g-after__why { margin: 0; padding: 16px; background: #ffffff08; border-left: 3px solid var(--g-gold); border-radius: 4px 12px 12px 4px; font-size: 1.05rem; line-height: 1.85; color: #f4f1ea; }
.g-after__why b { display: block; margin-bottom: 6px; color: var(--g-gold); font-size: .84rem; }
.g-after__practice { margin: 0; color: #a6cbbb; font-size: .9rem; line-height: 1.65; }
.g-3d__lesson-panel .g-review { gap: 12px; }
.g-3d__lesson-panel .fn-box { font-size: .95rem; line-height: 1.85; }
.g-3d__lesson-panel .fn-list { gap: 9px; }
.g-3d__lesson-panel .g-after__btns { grid-template-columns: 1fr; }
@media (min-width: 1101px) {
  .g-3d:has(.g-3d__lesson-panel > :not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(420px, .8fr); gap: 22px; align-items: start; }
  .g-3d:has(.g-3d__lesson-panel > :not([hidden])) .g-3d__stage { position: sticky; top: 14px; height: min(76svh, 840px); min-height: 510px; }
  .g-3d:has(.g-3d__lesson-panel > :not([hidden])) .g-3d__caption { top: 106px; max-width: calc(100% - 30px); width: max-content; font-size: 1.05rem; }
  .g-3d:has(.g-3d__lesson-panel > :not([hidden])) .g-3d__look { top: auto; bottom: 10px; font-size: .72rem; }
  .g-3d.is-after .g-3d__controls { display: none; }
}
@media (max-width: 1100px) {
  .g-3d__lesson-panel { margin-top: 12px; }
  .g-3d .g-3d__lesson-panel .g3-brief,
  .g-3d .g-3d__lesson-panel .g-after--3d { padding: 20px; }
  .g-3d:has(.g-3d__lesson-panel > :not([hidden])) .g-3d__stage { height: 54svh; min-height: 310px; }
  .g-3d:has(.g-3d__lesson-panel > :not([hidden])) .g-3d__view { height: 100%; min-height: 0; }
}
.g-keymap__wide { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .g-training__options { grid-template-columns: 1fr; }
  .g-3d.is-brief:has(.g-3d__lesson-panel > :not([hidden])) .g-3d__stage { height: 28svh; min-height: 200px; max-height: 290px; }
  .g-hud__outs b { white-space: nowrap; font-size: .8rem; }
}
.g-nums { display: flex; flex-wrap: wrap; gap: 6px; }
.g-nums span { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 4px; border-radius: 99px; background: rgb(255 255 255 / .06); font-size: .82rem; font-weight: 700; }
.g-nums b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #1B2556; color: var(--g-gold); font: 800 .85rem var(--font-display); }
