/* ASTRO HANJA 시즌2 추가 스타일 (시즌1 style.css 위에 덮어씀) — 우주 아케이드 한 가지 테마 */
:root { --violet: #b98bff; --lc: var(--gold); --rc: var(--pink); }
body { background-color: var(--bg); }
#app { padding-left: max(0px, env(safe-area-inset-left, 0px)); padding-right: max(0px, env(safe-area-inset-right, 0px)); }

/* 첫 화면 · 대원 선택 */
.season-tag { display: inline-block; margin-top: 12px; padding: 4px 14px; border-radius: 99px; background: linear-gradient(90deg, var(--pink), var(--violet)); font-size: 1rem; letter-spacing: 1px; box-shadow: 0 0 18px rgba(255, 111, 168, 0.6); }
.profile-list { width: min(360px, 100%); display: grid; gap: 10px; }
.profile-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 8px 14px 8px 8px; border-radius: 18px; border: 2px solid var(--panel-line); background: rgba(14, 18, 52, 0.85); backdrop-filter: blur(6px); text-align: left; cursor: pointer; }
.profile-row img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: top; background: #2d3590; }
.profile-row b { display: block; font-weight: 400; font-size: 1.2rem; }
.profile-row small { color: var(--muted); }
.profile-row em { font-style: normal; color: var(--gold); font-size: 1.3rem; }
.profile-row:active { transform: scale(0.98); }

/* 지도: 레벨·리그 */
.lv-chip { font-size: 0.8rem; padding: 1px 8px; border-radius: 99px; background: var(--cyan); color: #06203a; margin-left: 4px; vertical-align: 2px; }
.league-chip .lg-ico { width: 18px; height: 18px; object-fit: contain; display: inline-block; vertical-align: -4px; margin-right: 3px; }
.league-chip { display: inline-block; font-size: 0.8rem; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--lc); color: var(--lc); background: rgba(0, 0, 0, 0.25); white-space: nowrap; }
.hello { grid-template-columns: 56px 1fr auto auto; }

/* 오늘의 복습 카드 */
.today-card { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; padding: 14px; border-radius: 20px; background: linear-gradient(120deg, #6a2fbf, #2d3590 70%); border: 2px solid rgba(255, 255, 255, 0.18); box-shadow: 0 8px 24px rgba(106, 47, 191, 0.4); }
.today-card .today-ico { grid-row: span 2; font-size: 2.2rem; width: 64px; height: 64px; object-fit: contain; }
.today-card span.today-ico { width: auto; height: auto; }
.today-card b { display: block; font-weight: 400; font-size: 1.25rem; }
.today-card small { color: #dcd3ff; }
.today-card .mini-chars { grid-column: 2; display: flex; gap: 6px; font-style: normal; }
.today-card .mini-chars i, .weak-card i { font-style: normal; font-family: var(--hanja); font-weight: 900; font-size: 1.2rem; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, 0.14); }
.today-card.urgent { background: linear-gradient(120deg, #c2304a, #6a2fbf 70%); animation: pulse 0.9s infinite alternate; }
.today-card.done { background: rgba(28, 34, 92, 0.82); box-shadow: none; }
.weak-card { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 16px; background: rgba(255, 212, 92, 0.12); border: 2px solid rgba(255, 212, 92, 0.45); }
.weak-card b { background: var(--gold); color: #4a2a00; border-radius: 99px; padding: 0 10px; font-weight: 400; }
.weak-card .mini-chars { display: flex; gap: 4px; margin-left: auto; }
.pin-label small { display: block; font-size: 0.72rem; color: var(--muted); }

.lock-banner { display: block; padding: 12px 14px; border-radius: 16px; background: rgba(232, 68, 90, 0.18); border: 2px dashed var(--red); text-align: center; }
.lock-banner small { color: var(--muted); }

/* 스테이지 길: 복습 정거장 */
.stage-node.gate { justify-self: center; margin-left: 0; border-color: var(--violet); background: linear-gradient(90deg, rgba(106, 47, 191, 0.9), rgba(20, 26, 80, 0.9)); }
.stage-node.gate > b img { width: 44px; height: 44px; object-fit: contain; }
.stage-node.gate > b { background: radial-gradient(circle at 35% 30%, #fff, var(--violet) 60%); font-size: 1.3rem; }
.stage-node.gate .stage-name small { font-family: var(--ui); }
.stage-sheet .step { justify-content: flex-start; }
.stage-sheet .step i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.2); font-size: 0.9rem; }
.stage-sheet .step.did { border: 2px solid var(--green); }

/* 아이템 바 */
.itembar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 4px; }
.item-btn { position: relative; display: grid; place-items: center; min-height: 52px; border-radius: 14px; border: 2px solid var(--panel-line); background: rgba(20, 26, 80, 0.9); cursor: pointer; font-size: 1.5rem; }
.item-btn img { width: 40px; height: 40px; object-fit: contain; }
.item-btn b { position: absolute; right: 4px; bottom: 2px; font-size: 0.8rem; font-weight: 400; color: var(--gold); }
.item-btn:disabled { opacity: 0.35; cursor: default; }
.item-btn.active { border-color: var(--gold); box-shadow: 0 0 16px rgba(255, 212, 92, 0.6); }
.opt.gone { opacity: 0.15; transform: scale(0.94); }
.timer.frozen div { background: linear-gradient(90deg, #9fe8ff, #fff) !important; }
.timer.frozen { box-shadow: 0 0 12px #9fe8ff; }
.correction small { display: block; color: var(--muted); font-size: 0.85rem; }

/* 획순 쓰기 */
.stroke-box { position: relative; width: min(320px, 82vw); aspect-ratio: 1; max-width: 100%; border-radius: 22px; border: 3px solid var(--panel-line); overflow: hidden; touch-action: none;
  background:
    linear-gradient(rgba(140, 170, 255, 0.16), rgba(140, 170, 255, 0.16)) center / 2px 100% no-repeat,
    linear-gradient(rgba(140, 170, 255, 0.16), rgba(140, 170, 255, 0.16)) center / 100% 2px no-repeat,
    radial-gradient(circle at 50% 40%, #232c86, #0d1140 75%); }
.stroke-target { width: 100%; height: 100%; display: grid; place-items: center; }
.stroke-target svg { display: block; touch-action: none; }
.stroke-box.glow { border-color: var(--gold); box-shadow: 0 0 40px rgba(79, 227, 255, 0.7); }
.stroke-box.free .stroke-target { display: block; }
.stroke-info { min-height: 1.5em; text-align: center; color: var(--muted); }
.stroke-info b { color: var(--cyan); font-size: 1.2em; }
.write-screen [data-ctrl] { flex-wrap: wrap; justify-content: center; }

/* 카드: 기억 단계 */
.srs-meter { display: flex; gap: 6px; }
.srs-meter i { width: 26px; height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.15); }
.srs-meter i.on { background: linear-gradient(90deg, var(--cyan), var(--gold)); }
.card-cell { position: relative; }
.due-dot { position: absolute; top: -4px; right: -2px; font-style: normal; font-size: 1rem; animation: pulse 0.8s infinite alternate; }

/* 보상 목록 · 레벨업 · 잭팟 */
.prize-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.prize-list span { padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--panel-line); }
.lv-big { font-family: 'Black Han Sans', var(--ui); font-weight: 400; font-size: 3.4rem; color: var(--gold); text-shadow: 0 0 20px rgba(255, 212, 92, 0.7); }
.jackpot { position: fixed; z-index: 130; left: 50%; top: 38%; transform: translate(-50%, -50%); display: grid; justify-items: center; pointer-events: none; animation: jackpot 1.6s ease-out forwards; }
.jackpot b { font-family: 'Black Han Sans', var(--ui); font-weight: 400; font-size: 3.6rem; color: var(--gold); text-shadow: 0 4px 0 #6a4200, 0 0 30px var(--gold); }
.jackpot span { font-size: 1.6rem; }
@keyframes jackpot { 0% { transform: translate(-50%, -50%) scale(0.3) rotate(-8deg); opacity: 0; } 20% { transform: translate(-50%, -50%) scale(1.2) rotate(4deg); opacity: 1; } 70% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -80%) scale(0.9); opacity: 0; } }
body.flash::after { content: ''; position: fixed; inset: 0; z-index: 200; pointer-events: none; background: radial-gradient(circle, #fff, rgba(255, 111, 168, 0.6) 40%, transparent 70%); animation: fade 0.7s reverse; }
.weak-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.weak-preview div { display: grid; justify-items: center; padding: 8px 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); }
.weak-preview .glyph { font-size: 2rem; }
.weak-preview small { color: var(--muted); font-size: 0.8rem; }
.code-box { width: 100%; font-size: 12px; border-radius: 10px; padding: 8px; background: #0b0f33; color: var(--text); border: 1px solid var(--panel-line); }

/* 대결 */
.league-card { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 14px; border-radius: 20px; background: var(--panel); border: 2px solid var(--lc); }
.league-card .league-ico { width: 72px; height: 72px; object-fit: contain; }
.league-card b { font-weight: 400; font-size: 1.2rem; color: var(--lc); }
.league-card .meter div { background: linear-gradient(90deg, var(--lc), #fff); }
.rival-list { display: grid; gap: 10px; }
.rival { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 18px; border: 2px solid var(--rc); background: linear-gradient(90deg, rgba(20, 26, 80, 0.95), rgba(20, 26, 80, 0.75)); text-align: left; cursor: pointer; color: var(--text); font: inherit; }
.rival img { width: 64px; height: 64px; object-fit: contain; border-radius: 14px; background: rgba(255, 255, 255, 0.06); }
.rival b { display: block; font-weight: 400; font-size: 1.15rem; }
.rival small { color: var(--muted); }
.rival em { font-style: normal; font-size: 0.8rem; }
.rival.locked, .rival:disabled { opacity: 0.45; cursor: default; }
.rival.ghost img { object-fit: cover; object-position: top; border-radius: 50%; }
.vs-screen { min-height: 100dvh; display: grid; grid-template-rows: 1fr auto 1fr auto; justify-items: center; align-items: center; padding: 24px 16px; background: linear-gradient(160deg, rgba(79, 227, 255, 0.25), transparent 45%, transparent 55%, color-mix(in srgb, var(--rc) 40%, transparent)); }
.vs-side { display: grid; justify-items: center; gap: 6px; animation: slidein 0.5s ease-out both; }
.vs-side img { width: 130px; height: 130px; object-fit: contain; filter: drop-shadow(0 0 18px rgba(79, 227, 255, 0.6)); }
.vs-side.me img { object-fit: cover; object-position: top; border-radius: 50%; background: #2d3590; }
.vs-side.op { animation-name: slidein2; }
.vs-side.op img { filter: drop-shadow(0 0 18px var(--rc)); }
.vs-side b { font-size: 1.4rem; font-weight: 400; }
.vs-side small { color: var(--muted); }
.vs-mark { font-family: 'Black Han Sans', var(--ui); font-size: 4.4rem; color: var(--gold); text-shadow: 0 4px 0 #6a4200, 0 0 30px var(--gold); animation: pop 0.6s 0.4s both; }
.vs-tip { color: var(--muted); }
@keyframes slidein { from { transform: translateX(-120%); opacity: 0; } }
@keyframes slidein2 { from { transform: translateX(120%); opacity: 0; } }
.duel-screen { padding-top: 12px; }
.duel-op, .duel-me { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 18px; background: var(--panel); }
.duel-op { border: 2px solid var(--rc); }
.duel-me { border: 2px solid var(--cyan); }
.duel-op img, .duel-me img { width: 56px; height: 56px; object-fit: contain; }
.duel-me img { object-fit: cover; object-position: top; border-radius: 50%; background: #2d3590; }
.duel-op b, .duel-me b { display: block; font-weight: 400; }
.rv-bubble { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); padding: 4px 12px; border-radius: 99px; background: #fff; color: #1b2063; font-size: 0.9rem; animation: pulse 0.7s infinite alternate; }
.rv-bubble.miss { background: var(--red); color: #fff; animation: none; }
.round-chip { justify-self: center; padding: 2px 14px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); font-size: 0.9rem; }
.duel-screen.hit-op .duel-op { animation: shake 0.3s 2; border-color: var(--gold); }
.duel-screen.hit-me .duel-me { animation: shake 0.3s 2; border-color: var(--red); background: rgba(232, 68, 90, 0.3); }
.trophy-delta { font-size: 1.6rem; }
.trophy-delta span { margin-left: 6px; padding: 2px 10px; border-radius: 99px; font-size: 1.1rem; }
.trophy-delta.up span { background: var(--green); color: #062b14; }
.trophy-delta.down span { background: rgba(232, 68, 90, 0.4); }
.league-big { width: 150px; height: 150px; object-fit: contain; font-size: 4.2rem; line-height: 1; animation: pop 0.6s both; filter: drop-shadow(0 0 20px var(--lc)); }

/* 랭킹 */
.rank-screen .tabs a { flex: 1; text-align: center; }
.rank-hero { display: grid; justify-items: center; gap: 4px; padding: 14px; border-radius: 20px; background: linear-gradient(120deg, #2d3590, #6a2fbf); text-align: center; }
.rank-hero > b { font-family: 'Black Han Sans', var(--ui); font-weight: 400; font-size: 2.6rem; color: var(--gold); line-height: 1; }
.rank-hero span b { color: var(--gold); font-weight: 400; }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rank-row { display: grid; grid-template-columns: 36px 40px 1fr auto; gap: 10px; align-items: center; padding: 6px 12px 6px 8px; border-radius: 14px; background: var(--panel); font-variant-numeric: tabular-nums; }
.rank-row .rk { text-align: center; font-size: 1.1rem; }
.rank-row img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; background: #2d3590; }
.rank-row .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .nm small { font-size: 0.75rem; }
.rank-row b { font-weight: 400; color: var(--gold); }
.rank-row.me { border: 2px solid var(--gold); background: rgba(255, 212, 92, 0.16); }
.rank-row.bot { opacity: 0.88; }

/* 가방 · 상점 */
.gacha-banner { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px; border-radius: 20px; background: linear-gradient(120deg, #ff6fa8, #6a2fbf); box-shadow: 0 8px 24px rgba(255, 111, 168, 0.35); }
.gacha-banner .capsule-ico { width: 64px; height: 64px; object-fit: contain; }
.gacha-banner b { display: block; font-weight: 400; font-size: 1.3rem; }
.gacha-banner em { font-style: normal; font-size: 1.4rem; }
.gacha-banner.ready { animation: pulse 0.9s infinite alternate; }
.item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.item-cell:last-child:nth-child(odd) { grid-column: span 2; }
.item-cell { position: relative; display: grid; gap: 4px; justify-items: center; text-align: center; padding: 12px 8px; border-radius: 16px; background: var(--panel); border: 1px solid var(--panel-line); }
.item-cell .item-ico { width: 64px; height: 64px; object-fit: contain; }
.item-cell b { font-weight: 400; }
.item-cell small { font-size: 0.78rem; min-height: 2.4em; }
.item-cell .item-n { position: absolute; top: 8px; right: 10px; color: var(--gold); }
.item-cell .btn { min-height: 40px; padding: 6px 14px; font-size: 0.95rem; }
.hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hub-grid a { display: grid; justify-items: center; gap: 2px; padding: 14px 8px; border-radius: 16px; background: var(--panel); border: 1px solid var(--panel-line); }
.hub-grid span { font-size: 2rem; }
.hub-grid b { font-weight: 400; }
.hub-grid small { color: var(--muted); }

/* 캡슐 뽑기 */
.gacha-screen { justify-items: center; }
.machine { position: relative; width: min(280px, 72vw); display: grid; justify-items: center; }
.machine-img { border: 0; background: none; padding: 0; cursor: pointer; width: 100%; filter: drop-shadow(0 0 24px rgba(255, 111, 168, 0.45)); }
.machine-img img { width: 100%; }
.machine-img:active { transform: scale(0.97); }
.machine.shake .machine-img { animation: shake 0.18s 6; }
.capsule { position: absolute; left: 50%; bottom: 2%; width: 22%; margin-left: -11%; pointer-events: none; }
.capsule.drop { animation: capdrop 0.5s cubic-bezier(0.3, 1.6, 0.6, 1) both; }
@keyframes capdrop { from { transform: translateY(-60px) scale(0.5); opacity: 0; } }
.capsule.big { position: relative; left: auto; bottom: auto; margin: 0; width: 190px; height: 190px; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; }
.capsule.big img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 30px rgba(159, 177, 255, 0.6)); }
.capsule.big.glow-epic img { filter: drop-shadow(0 0 40px #ffd45c) drop-shadow(0 0 80px #ffd45c); }
.capsule.big.glow-legend img { filter: drop-shadow(0 0 40px #ff6fa8) drop-shadow(0 0 90px #b98bff); animation: rainbow 0.6s infinite alternate; }
@keyframes rainbow { to { filter: drop-shadow(0 0 50px #4fe3ff) drop-shadow(0 0 100px #ff6fa8) hue-rotate(60deg) brightness(1.2); } }
.capsule.big.open img { animation: capopen 0.6s ease-out forwards; }
@keyframes capopen { 40% { transform: scale(1.35); filter: brightness(2.2) drop-shadow(0 0 60px #fff); } 100% { transform: scale(0.75); opacity: 0.25; } }
.capsule.wiggle img { animation: wiggle 0.3s; }
.gacha-reveal .tier-tag { display: inline-block; padding: 2px 14px; border-radius: 99px; background: var(--cc); color: #1b2063; }
.gacha-prize { display: grid; justify-items: center; gap: 8px; animation: pop 0.4s both; }
.pity b { color: var(--gold); font-weight: 400; }
.odds { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; font-size: 0.8rem; }
.odds span { padding: 2px 10px; border-radius: 99px; border: 1px solid var(--cc); color: var(--cc); }

@media (prefers-reduced-motion: reduce) {
  .today-card.urgent, .gacha-banner.ready, .rv-bubble, .due-dot, .capsule.big.glow-legend img { animation: none; }
}
#app:has(> .title-screen) { padding-bottom: 0; }

/* ───── 의진이 모드: 새 한자 카드 ───── */
.new-hanja .learn-card.small { width: 150px; }
.new-hanja .reveal-title { color: var(--gold); }

/* 지도: 모드 타일 */
.mode-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mode-tile { position: relative; display: grid; justify-items: center; text-align: center; gap: 2px; padding: 14px 8px 12px; border-radius: 20px; border: 2px solid rgba(255, 255, 255, 0.18); }
.mode-tile .tile-ico { font-size: 2.6rem; line-height: 1.1; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4)); }
.mode-tile b { font-weight: 400; font-size: 1.15rem; }
.mode-tile small { color: #e4defc; font-size: 0.8rem; }
.mode-tile.repair { background: linear-gradient(150deg, #ff9b3d, #b8442a 60%, #5a1f2c); }
.mode-tile.launch { background: linear-gradient(150deg, #36d6ff, #2d3590 60%, #1a1550); }
.mode-tile.alert { box-shadow: 0 0 0 2px var(--gold), 0 0 22px rgba(255, 212, 92, 0.45); }
.mode-tile.urgent { animation: pulse 0.9s infinite alternate; }
.mode-tile .badge-n { position: absolute; top: -6px; right: -4px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; background: var(--red); color: #fff; font-style: normal; display: grid; place-items: center; font-size: 0.9rem; }
.mode-tile:active { transform: scale(0.97); }

/* 로봇 수리 공장 */
.repair-screen { background: repeating-linear-gradient(135deg, rgba(255, 212, 92, 0.05) 0 14px, transparent 14px 28px); }
.robot-bay { --fix: 0; position: relative; height: 190px; display: grid; place-items: center; border-radius: 22px; overflow: hidden;
  background: radial-gradient(circle at 50% 75%, rgba(79, 227, 255, calc(0.12 + var(--fix) * 0.35)), transparent 60%), linear-gradient(#232a6e, #11143e); border: 2px solid #ff9b3d; }
.robot-img { height: 150px; object-fit: contain; transition: filter 0.6s, transform 0.6s;
  filter: grayscale(calc(1 - var(--fix))) brightness(calc(0.55 + var(--fix) * 0.45)) drop-shadow(0 0 calc(var(--fix) * 24px) var(--cyan));
  transform: rotate(calc((1 - var(--fix)) * -14deg)) translateY(calc((1 - var(--fix)) * 10px)); }
.robot-bay .spark { position: absolute; font-size: 1.6rem; animation: spark 0.9s infinite steps(2); }
.robot-bay .spark.s1 { left: 30%; top: 22%; }
.robot-bay .spark.s2 { right: 28%; top: 48%; animation-delay: 0.45s; }
.robot-bay .smoke { position: absolute; left: 56%; top: 8%; font-size: 1.8rem; opacity: 0.7; animation: smoke 2s infinite ease-out; }
.bay-label { position: absolute; left: 10px; bottom: 8px; font-size: 0.85rem; padding: 2px 10px; border-radius: 99px; background: rgba(0, 0, 0, 0.45); }
.robot-bay.clank .robot-img { animation: clank 0.4s; }
.robot-bay.zap { animation: shake 0.25s 2; border-color: var(--red); }
.robot-bay.awake { border-color: var(--gold); box-shadow: 0 0 40px rgba(255, 212, 92, 0.5); }
.robot-bay.awake .robot-img { animation: wakeup 1s ease-out both, bob 1.4s 1s infinite alternate ease-in-out; }
@keyframes spark { 50% { opacity: 0; transform: scale(1.4) rotate(20deg); } }
@keyframes smoke { from { transform: translateY(10px) scale(0.6); opacity: 0.8; } to { transform: translateY(-30px) scale(1.4); opacity: 0; } }
@keyframes clank { 30% { transform: scale(1.08) rotate(3deg); } }
@keyframes wakeup { 0% { filter: grayscale(1) brightness(0.5); transform: rotate(-14deg); } 50% { filter: brightness(2) drop-shadow(0 0 40px #fff); transform: scale(1.15); } 100% { filter: drop-shadow(0 0 24px var(--cyan)); transform: none; } }
@keyframes bob { to { transform: translateY(-10px); } }
.parts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.part { aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, 0.07); border: 2px dashed rgba(255, 155, 61, 0.5); font-family: var(--hanja); font-weight: 900; font-size: 1.4rem; }
.part.now { border-style: solid; border-color: var(--gold); animation: pulse 0.7s infinite alternate; }
.part.ok { border: 2px solid var(--green); background: rgba(91, 227, 138, 0.18); color: #c9ffd9; }
.part.pop { animation: pop 0.35s; }
.repair-done .robot-bay { height: 220px; width: 100%; }

/* 로켓 발사 */
.launch-screen { --power: 0; }
.pad { position: relative; height: 210px; border-radius: 22px; overflow: hidden; display: grid; place-items: center; border: 2px solid var(--cyan);
  background: linear-gradient(rgba(14, 18, 52, 0.25), rgba(14, 18, 52, 0.75)), var(--landing) center 70% / cover; }
.countdown { position: absolute; top: 10px; left: 16px; font-family: 'Black Han Sans', var(--ui); font-size: 3.6rem; line-height: 1; color: var(--gold); text-shadow: 0 4px 0 #6a4200, 0 0 20px var(--gold); font-variant-numeric: tabular-nums; }
.countdown.tick { animation: pop 0.35s; }
.rocket { position: relative; display: grid; justify-items: center; animation: rumble calc(0.5s - var(--power) * 0.4s) infinite; }
.rocket-emoji { display: block; font-size: 5.4rem; line-height: 1; transform: rotate(-45deg); filter: drop-shadow(0 0 16px rgba(79, 227, 255, 0.6)); }
.rocket img { width: 110px; height: 150px; object-fit: contain; }
.flame { width: 26px; height: calc(10px + var(--power) * 60px); margin-top: -6px; border-radius: 0 0 50% 50%; background: linear-gradient(#fff, var(--gold) 40%, #ff6a3d 80%, transparent); filter: blur(1px); opacity: calc(0.2 + var(--power)); transition: height 0.3s; }
@keyframes rumble { 25% { transform: translate(calc(var(--power) * 2px), 0); } 75% { transform: translate(calc(var(--power) * -2px), calc(var(--power) * 1px)); } }
.fuel { position: absolute; right: 16px; top: 16px; bottom: 16px; width: 22px; border-radius: 12px; background: rgba(0, 0, 0, 0.45); border: 2px solid rgba(255, 255, 255, 0.35); display: flex; align-items: flex-end; overflow: hidden; }
.fuel div { width: 100%; background: linear-gradient(var(--gold), #ff6a3d); transition: height 0.4s; }
.fuel small { position: absolute; bottom: -2px; left: 50%; transform: translate(-50%, 100%); font-size: 0.7rem; }
.launch-screen.alarm .pad { animation: shake 0.25s 2; border-color: var(--red); box-shadow: inset 0 0 40px rgba(232, 68, 90, 0.6); }
.blastoff { --power: 1; position: relative; min-height: 100dvh; overflow: hidden; display: grid; place-items: center; background: linear-gradient(rgba(14, 18, 52, 0.2), rgba(14, 18, 52, 0.85)), var(--landing) center / cover; }
.blastoff .countdown.big { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); font-size: 5.4rem; white-space: nowrap; }
.blastoff .rocket { position: absolute; bottom: 14%; }
.blastoff .rocket .flame { height: 90px; width: 34px; }
.blastoff.lift .rocket { animation: liftoff 2s cubic-bezier(0.55, 0, 0.8, 0.2) forwards; }
.blastoff.lift { animation: shake 0.15s 8; }
.stars-streak { position: absolute; inset: 0; opacity: 0; background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(255, 255, 255, 0.7) 22px 24px, transparent 24px 61px); background-size: 100% 300%; }
.blastoff.lift .stars-streak { opacity: 0.6; animation: streak 0.5s linear infinite; transition: opacity 1s; }
@keyframes liftoff { to { transform: translateY(-120dvh) scale(0.6); } }
@keyframes streak { to { background-position: 0 100%; } }
.arrive { display: flex; align-items: center; gap: 10px; font-size: 2.2rem; }
.arrive i { width: 90px; border-top: 3px dashed var(--cyan); }
.arrive b { font-size: 1.2rem; font-weight: 400; padding: 4px 12px; border-radius: 99px; background: var(--gold); color: #4a2a00; }

/* 보스: 로봇 조종석 */
.boss-screen.cockpit { position: relative; }
.boss-screen.cockpit::before { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: 24px; border: 3px solid rgba(79, 227, 255, 0.35); box-shadow: inset 0 0 50px rgba(79, 227, 255, 0.18); }
.hud { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 6px 12px; border-radius: 14px; background: rgba(4, 30, 50, 0.85); border: 1px solid var(--cyan); font-size: 0.9rem; color: var(--cyan); font-variant-numeric: tabular-nums; }
.hud-energy { height: 10px; border-radius: 6px; background: rgba(79, 227, 255, 0.15); overflow: hidden; }
.hud-energy i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--gold)); transition: width 0.3s; }
.mech-hit { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); z-index: 5; font-family: 'Black Han Sans', var(--ui); font-size: 2.2rem; color: #fff; text-shadow: 0 3px 0 #1b2063, 0 0 20px var(--cyan); white-space: nowrap; pointer-events: none; animation: mechhit 0.9s ease-out forwards; }
.mech-hit.laser { color: var(--gold); text-shadow: 0 3px 0 #6a4200, 0 0 30px var(--gold); }
@keyframes mechhit { 0% { transform: translateX(-50%) scale(0.3); opacity: 0; } 30% { transform: translateX(-50%) scale(1.2); opacity: 1; } 100% { transform: translateX(-50%) translateY(-30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .rocket, .robot-bay .spark, .robot-bay .smoke, .mode-tile.urgent, .part.now, .robot-bay.awake .robot-img { animation: none; }
}
