@import url("https://fonts.googleapis.com/css2?family=Do+Hyeon&family=Noto+Sans+KR:wght@400;500;600;700;800;900&display=swap");

:root {
  color-scheme: dark;
  --bg: #07091b;
  --panel: rgba(19, 24, 58, 0.72);
  --panel-strong: rgba(15, 19, 49, 0.94);
  --line: rgba(172, 196, 255, 0.16);
  --text: #f7f8ff;
  --muted: #aab1d3;
  --cyan: #55edff;
  --blue: #6b7cff;
  --violet: #aa65ff;
  --pink: #ff64ca;
  --gold: #ffd35a;
  --danger: #ff668b;
  --success: #70ffc3;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 0%, rgba(75, 81, 220, 0.22), transparent 34rem),
    radial-gradient(circle at 90% 95%, rgba(182, 61, 206, 0.16), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: "Noto Sans KR", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
dialog {
  font: inherit;
}

button {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.2;
  pointer-events: none;
}

.ambient-one {
  top: -10rem;
  left: -8rem;
  background: var(--blue);
}

.ambient-two {
  right: -8rem;
  bottom: -12rem;
  background: var(--pink);
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 30px;
}

.topbar,
.hud,
.stage-strip,
.action-legend {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(111, 241, 255, 0.42);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(86, 239, 255, 0.2), rgba(120, 79, 255, 0.19));
  box-shadow: inset 0 0 20px rgba(85, 237, 255, 0.12), 0 8px 30px rgba(71, 83, 255, 0.26);
  transform: rotate(-7deg);
}

.brand-mark span {
  position: absolute;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.brand-mark span:nth-child(1) { width: 7px; height: 7px; transform: translate(-10px, 4px); }
.brand-mark span:nth-child(2) { width: 7px; height: 7px; transform: translate(10px, 4px); }
.brand-mark span:nth-child(3) { width: 22px; height: 4px; transform: translateY(13px); }

.eyebrow {
  margin: 0 0 2px;
  color: var(--cyan);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.brand h1 {
  margin: 0;
  font-family: "Do Hyeon", sans-serif;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.header-actions {
  display: flex;
  gap: 9px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(16, 21, 52, 0.7);
  cursor: pointer;
  transition: 180ms ease;
}

.icon-button:hover {
  border-color: rgba(85, 237, 255, 0.5);
  background: rgba(35, 44, 92, 0.85);
  transform: translateY(-2px);
}

.icon-button:active { transform: translateY(0) scale(0.94); }
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button > span { font-size: 1.15rem; font-weight: 900; }
.icon-button.is-on { color: var(--cyan); border-color: rgba(85, 237, 255, 0.45); }

.hud {
  justify-content: space-between;
  gap: 20px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(22, 28, 69, 0.75), rgba(11, 15, 39, 0.86));
  box-shadow: 0 10px 38px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.mission-panel {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.level-badge {
  flex: 0 0 auto;
  min-width: 56px;
  padding: 8px 10px;
  border: 1px solid rgba(113, 241, 255, 0.28);
  border-radius: 12px;
  color: var(--cyan);
  background: rgba(73, 211, 255, 0.09);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.mission-copy { min-width: 0; }
.mission-copy p { margin: 0 0 3px; color: var(--muted); font-size: 0.76rem; font-weight: 700; }
.mission-copy h2 { margin: 0; overflow: hidden; font-size: 1rem; white-space: nowrap; text-overflow: ellipsis; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(82px, 1fr));
  gap: 8px;
}

.stat-card {
  min-width: 86px;
  padding: 7px 12px;
  border-left: 1px solid var(--line);
}

.stat-card span {
  display: block;
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.stat-card strong {
  font-variant-numeric: tabular-nums;
  font-size: 1.06rem;
  letter-spacing: 0.02em;
}

.combo-card strong { color: var(--gold); }
.time-card strong { color: var(--cyan); }
.time-card.is-urgent strong { color: var(--danger); animation: urgentPulse .7s infinite; }
.shield-card strong { color: var(--pink); font-size: 0.86rem; letter-spacing: 0.12em; }

.game-card {
  overflow: hidden;
  border: 1px solid rgba(155, 177, 255, 0.22);
  border-radius: 26px;
  background: rgba(11, 14, 37, 0.82);
  box-shadow: var(--shadow);
}

.stage-strip {
  justify-content: space-between;
  gap: 24px;
  min-height: 62px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(17, 21, 53, 0.76);
}

.stage-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stage-dot {
  position: relative;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(170, 181, 220, 0.35);
  border-radius: 50%;
  transition: 240ms ease;
}

.stage-dot:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 10px;
  width: 10px;
  height: 2px;
  background: rgba(170, 181, 220, 0.25);
}

.stage-dot.is-current {
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: 0 0 13px rgba(85, 237, 255, 0.9);
  transform: scale(1.15);
}

.stage-dot.is-done {
  border-color: var(--violet);
  background: var(--violet);
}

.objective {
  display: grid;
  grid-template-columns: auto minmax(90px, 190px) 45px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 700;
}

.objective-track {
  overflow: hidden;
  width: 100%;
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.objective-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  box-shadow: 0 0 12px rgba(85, 237, 255, 0.7);
  transition: width 260ms ease;
}

.objective strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.arena {
  position: relative;
  isolation: isolate;
  min-height: clamp(430px, 59vh, 610px);
  overflow: hidden;
  user-select: none;
  touch-action: none;
  cursor: crosshair;
  background:
    radial-gradient(circle at 50% 42%, rgba(62, 72, 169, 0.2), transparent 35%),
    linear-gradient(180deg, #0b1030 0%, #080a20 100%);
}

.arena::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.72) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(104,226,255,.55) 0 1px, transparent 1.6px);
  background-position: 12px 20px, 66px 44px;
  background-size: 98px 98px, 143px 143px;
  opacity: .42;
}

.arena-grid {
  position: absolute;
  inset: 45% -20% -48%;
  z-index: -2;
  background-image:
    linear-gradient(rgba(100, 143, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 143, 255, 0.14) 1px, transparent 1px);
  background-size: 54px 42px;
  transform: perspective(420px) rotateX(62deg);
  transform-origin: center top;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 75%, transparent);
}

.aurora {
  position: absolute;
  z-index: -1;
  top: -50%;
  left: 10%;
  width: 80%;
  height: 105%;
  border-radius: 50%;
  background: conic-gradient(from 90deg, rgba(80, 238, 255, .06), rgba(154, 82, 255, .1), rgba(255, 81, 198, .05), rgba(80, 238, 255, .06));
  filter: blur(35px);
  animation: auroraSpin 18s linear infinite;
}

#fxCanvas,
.entities,
.feedback-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#fxCanvas { z-index: 5; pointer-events: none; }
.entities { z-index: 3; }
.feedback-layer { z-index: 7; pointer-events: none; }

.overlay-screen {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
  background: radial-gradient(circle at 50% 44%, rgba(30, 38, 94, 0.58), rgba(6, 8, 26, 0.84) 70%);
  backdrop-filter: blur(5px);
  transition: opacity 280ms ease, visibility 280ms ease;
}

.overlay-screen.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.start-screen {
  display: grid;
  grid-template-columns: minmax(230px, .75fr) minmax(380px, 1fr);
  gap: clamp(24px, 6vw, 80px);
  text-align: left;
}

.start-content { max-width: 520px; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 10px;
  border: 1px solid rgba(91, 236, 255, .32);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(66, 222, 255, .08);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
}

.overlay-screen h2 {
  margin: 14px 0 10px;
  font-family: "Do Hyeon", sans-serif;
  font-size: clamp(2.1rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -.01em;
}

.overlay-screen h2 em {
  color: transparent;
  font-style: normal;
  background: linear-gradient(100deg, var(--cyan), #9f8bff 45%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(83, 222, 255, .18));
}

.overlay-screen > p,
.start-content > p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.skill-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.skill-preview > span {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  color: #dfe4ff;
  font-size: .80rem;
  font-weight: 700;
}

.skill-icon {
  position: relative;
  width: 15px;
  height: 20px;
  border: 1.5px solid currentColor;
  border-radius: 8px 8px 7px 7px;
  color: var(--cyan);
}

.skill-icon::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 1px;
  height: 8px;
  background: currentColor;
}

.double-icon::after { content: "2×"; position: absolute; left: 13px; top: -7px; color: var(--gold); font-size: 8px; font-style: normal; font-weight: 900; }
.right-icon { color: var(--pink); }
.drag-icon { color: var(--violet); transform: rotate(-15deg); }

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: 180ms ease;
}

.primary-button {
  color: #070a20;
  background: linear-gradient(100deg, var(--cyan), #b7a7ff);
  box-shadow: 0 9px 30px rgba(83, 222, 255, .28), inset 0 1px 0 rgba(255,255,255,.8);
}

.primary-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.primary-button:hover { transform: translateY(-3px); box-shadow: 0 14px 38px rgba(83, 222, 255, .36), inset 0 1px 0 rgba(255,255,255,.8); }
.primary-button:active { transform: translateY(0) scale(.97); }
.start-content .primary-button { min-width: 180px; }
.best-score { display: inline-block; margin-left: 13px !important; color: #858eb7 !important; font-size: .72rem !important; }

.start-orbit {
  position: relative;
  width: min(34vw, 340px);
  aspect-ratio: 1;
  place-self: center;
  filter: drop-shadow(0 28px 42px rgba(0,0,0,.38));
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(102, 218, 255, .28);
  box-shadow: inset 0 0 30px rgba(98, 99, 255, .08), 0 0 30px rgba(74, 206, 255, .08);
}

.ring-one { inset: 4%; animation: orbit 13s linear infinite; }
.ring-two { inset: 17%; border-style: dashed; border-color: rgba(255, 98, 205, .25); animation: orbit 9s linear reverse infinite; }
.ring-one::before,
.ring-two::before { content: ""; position: absolute; top: 8%; left: 16%; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); }
.ring-two::before { top: auto; left: auto; right: 2%; bottom: 28%; background: var(--pink); box-shadow: 0 0 16px var(--pink); }

.mouse-core {
  position: absolute;
  inset: 25% 32%;
  border: 2px solid rgba(151, 241, 255, .75);
  border-radius: 48% 48% 46% 46% / 36% 36% 58% 58%;
  background:
    linear-gradient(90deg, transparent 49%, rgba(137, 228, 255, .35) 49%, rgba(137, 228, 255, .35) 51%, transparent 51%),
    linear-gradient(150deg, rgba(78, 235, 255, .26), rgba(106, 83, 255, .34) 55%, rgba(255, 89, 202, .2));
  box-shadow: inset 0 0 38px rgba(100, 225, 255, .16), 0 0 42px rgba(90, 126, 255, .28);
  animation: float 3.4s ease-in-out infinite;
}

.mouse-core::after {
  content: "";
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: inherit;
}

.mouse-wheel {
  position: absolute;
  top: 13%;
  left: 50%;
  width: 7px;
  height: 21px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
}

.orb { position: absolute; width: 12px; height: 12px; border-radius: 50%; }
.orb-a { top: 8%; right: 23%; background: var(--gold); box-shadow: 0 0 18px var(--gold); animation: float 2.8s .4s ease-in-out infinite; }
.orb-b { bottom: 14%; left: 18%; background: var(--pink); box-shadow: 0 0 18px var(--pink); animation: float 3.5s .8s ease-in-out infinite; }
.orb-c { bottom: 9%; right: 22%; width: 7px; height: 7px; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); animation: float 2.4s ease-in-out infinite; }

.mission-screen h2,
.result-screen h2 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.mission-screen > p,
.result-screen > p { max-width: 520px; }

.mission-emblem {
  position: relative;
  width: 78px;
  height: 78px;
  margin-bottom: 16px;
  border: 1px solid rgba(102, 237, 255, .5);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(71, 228, 255,.2), rgba(124, 86, 255,.2));
  box-shadow: 0 0 32px rgba(76, 206, 255,.2), inset 0 0 26px rgba(101, 229, 255,.08);
  transform: rotate(45deg);
}

.mission-emblem::before,
.mission-emblem::after { content:""; position:absolute; inset: 23%; border: 2px solid var(--cyan); border-radius: 50%; box-shadow: 0 0 12px var(--cyan); }
.mission-emblem::after { inset: 39%; background: var(--cyan); }

.gesture-demo {
  position: relative;
  width: 190px;
  height: 60px;
  margin: 20px 0 22px;
}

.gesture-demo::before {
  content: "";
  position: absolute;
  top: 8px;
  left: calc(50% - 18px);
  width: 34px;
  height: 46px;
  border: 2px solid rgba(226, 234, 255, .75);
  border-radius: 17px 17px 13px 13px;
}

.gesture-demo::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 1px;
  height: 18px;
  background: rgba(226, 234, 255, .55);
}

.gesture-demo span {
  position: absolute;
  left: 50%;
  bottom: -3px;
  min-width: max-content;
  transform: translateX(-50%);
  color: #dce4ff;
  font-size: .75rem;
  font-weight: 800;
}

.gesture-demo i {
  position: absolute;
  top: 12px;
  left: calc(50% - 14px);
  width: 14px;
  height: 15px;
  border-radius: 8px 3px 5px 3px;
  background: var(--cyan);
  box-shadow: 0 0 13px var(--cyan);
  animation: gestureClick 1.25s ease-in-out infinite;
}

.gesture-demo[data-gesture="double"] i { animation: gestureDouble 1.35s ease-in-out infinite; }
.gesture-demo[data-gesture="right"] i { left: calc(50% + 1px); background: var(--pink); box-shadow:0 0 13px var(--pink); }
.gesture-demo[data-gesture="drag"] i { animation: gestureDrag 1.8s ease-in-out infinite; background:var(--violet); box-shadow:0 0 13px var(--violet); }
.gesture-demo[data-gesture="mixed"] i { background:linear-gradient(135deg,var(--cyan),var(--pink)); animation:gestureMixed 2s ease-in-out infinite; }

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 9px;
  width: min(480px, 100%);
  margin: 22px 0;
}

.result-stats > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
}

.result-stats span { display:block; margin-bottom: 3px; color: var(--muted); font-size: .69rem; font-weight: 700; }
.result-stats strong { font-size: 1.3rem; }
.rank-medal {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 2px solid rgba(255, 222, 104, .8);
  border-radius: 50%;
  color: #241600;
  background: radial-gradient(circle at 35% 25%, #fff8b8, var(--gold) 48%, #e18b22);
  font-family: "Do Hyeon", sans-serif;
  font-size: 3rem;
  box-shadow: 0 0 36px rgba(255, 203, 76, .42), inset 0 0 0 6px rgba(255,255,255,.18);
  transform: rotate(-7deg);
  animation: medalPop 500ms cubic-bezier(.2,1.6,.4,1);
}
.rank-medal.is-retry { color:#101530; background:radial-gradient(circle at 35% 25%,#eafcff,var(--cyan) 52%,#627cff); border-color:rgba(132,239,255,.8); box-shadow:0 0 36px rgba(85,237,255,.35),inset 0 0 0 6px rgba(255,255,255,.18); }

.action-legend {
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.action-legend > div {
  display: grid;
  grid-template-columns: 30px auto;
  grid-template-rows: auto auto;
  column-gap: 9px;
  min-width: 150px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(14, 18, 45, .72);
  transition: 180ms ease;
}

.action-legend > div.is-active {
  border-color: rgba(85, 237, 255,.48);
  background: rgba(54, 107, 150, .22);
  box-shadow: inset 0 0 18px rgba(85,237,255,.08);
  transform: translateY(-2px);
}
.action-legend > div.is-success { border-color:var(--success); box-shadow:0 0 20px rgba(112,255,195,.2),inset 0 0 18px rgba(112,255,195,.12); }

.action-legend b { align-self: end; font-size: .94rem; }
.action-legend small { color: var(--muted); font-size: .78rem; }
.mouse-mini {
  position: relative;
  grid-row: 1 / 3;
  align-self: center;
  width: 23px;
  height: 31px;
  border: 1.5px solid #bfcaed;
  border-radius: 11px 11px 9px 9px;
}
.mouse-mini::before { content:""; position:absolute; top:-1px; left:50%; width:1px; height:12px; background:#bfcaed; }
.mouse-mini::after { content:""; position:absolute; top:3px; width:8px; height:9px; border-radius: 5px; background: var(--cyan); box-shadow: 0 0 8px currentColor; }
.mouse-mini.left::after,
.mouse-mini.double::after { left:3px; }
.mouse-mini.double::after { animation: mousePulse .7s infinite; }
.mouse-mini.right::after { right:3px; background: var(--pink); }
.mouse-mini.drag::after { left:3px; background: var(--violet); transform: translate(6px, 12px); }

.entity {
  position: absolute;
  display: grid;
  place-items: center;
  width: var(--size, 74px);
  height: var(--size, 74px);
  transform: translate(-50%, -50%);
  cursor: pointer;
  animation: entityIn 260ms cubic-bezier(.2,1.45,.45,1), entityFloat 2.1s .3s ease-in-out infinite;
  will-change: transform, opacity;
}

.entity::after {
  content: attr(data-hint);
  position: absolute;
  left: 50%;
  bottom: -21px;
  min-width: max-content;
  padding: 3px 7px;
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  color: rgba(235,239,255,.86);
  background: rgba(7,9,28,.78);
  font-size: .72rem;
  font-weight: 800;
  opacity: .78;
  pointer-events: none;
}

.entity.is-removing { animation: entityOut 240ms ease forwards; pointer-events:none; }
.entity.is-wrong { animation: wrongShake 300ms ease; }

.click-target .shape {
  position: relative;
  width: 58%;
  height: 58%;
  background: linear-gradient(145deg, #fff7a8, var(--gold) 52%, #ff8d4d);
  clip-path: polygon(50% 0,61% 34%,98% 35%,68% 56%,79% 93%,50% 70%,20% 93%,31% 56%,2% 35%,39% 34%);
  filter: drop-shadow(0 0 11px rgba(255,207,81,.9));
}
.click-target .shape::after { content:""; position:absolute; inset:25%; border-radius:50%; background:#fffce1; filter:blur(3px); }
.click-target::before { content:""; position:absolute; inset:4%; border:1px solid rgba(255,217,102,.38); border-radius:50%; animation: pulseRing 1.25s ease-out infinite; }

.double-target .shape {
  position: relative;
  width: 54%;
  height: 68%;
  clip-path: polygon(50% 0, 93% 31%, 78% 90%, 50% 100%, 20% 88%, 7% 31%);
  background: linear-gradient(135deg, #bafcff 0%, #57ddff 35%, #7773ff 72%, #d768ff 100%);
  box-shadow: 0 0 22px rgba(93,216,255,.72);
  filter: drop-shadow(0 0 9px rgba(101, 105,255,.82));
}
.double-target .shape::before { content:""; position:absolute; inset:5% 46% 22% 16%; background:linear-gradient(rgba(255,255,255,.8), transparent); transform:skewX(-12deg); }
.double-target::before { content:""; position:absolute; inset:1%; border:1px dashed rgba(115,228,255,.55); border-radius:50%; animation: orbit 4s linear infinite; }

.right-target .shape {
  position: relative;
  width: 68%;
  height: 58%;
  border-radius: 48% 52% 50% 50% / 56% 45% 55% 44%;
  background: radial-gradient(circle at 35% 28%, #9d70ff, #5f38b8 38%, #221442 76%);
  box-shadow: 0 0 24px rgba(170,101,255,.42), inset -8px -10px 15px rgba(0,0,0,.28);
  animation: blob 3s ease-in-out infinite;
}
.right-target .shape::before,
.right-target .shape::after { content:""; position:absolute; top:38%; width:7px; height:9px; border-radius:50%; background:#ff9be5; box-shadow:0 0 8px var(--pink); }
.right-target .shape::before { left:29%; }
.right-target .shape::after { right:29%; }

.drag-target { cursor: grab; z-index: 5; }
.drag-target:active,
.drag-target.is-dragging { cursor: grabbing; animation:none; filter:brightness(1.18); }
.drag-target .shape {
  position: relative;
  width: 48%;
  height: 68%;
  border: 2px solid rgba(225, 239, 255,.72);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255,255,255,.22), var(--energy, #64eeff) 34%, rgba(71,83,255,.72));
  box-shadow: 0 0 22px color-mix(in srgb, var(--energy, #64eeff) 70%, transparent), inset 0 0 11px rgba(255,255,255,.24);
}
.drag-target .shape::before { content:""; position:absolute; top:-8px; left:25%; width:50%; height:8px; border-radius:4px 4px 0 0; background:#dbe7ff; }
.drag-target .shape::after { content:""; position:absolute; left:50%; top:50%; width:11px; height:22px; transform:translate(-50%,-50%); background:#fff; clip-path:polygon(55% 0,0 57%,43% 57%,34% 100%,100% 40%,57% 40%); filter:drop-shadow(0 0 5px white); }

.drop-zone {
  position: absolute;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  transform: translate(-50%,-50%);
  border: 2px dashed color-mix(in srgb, var(--energy, #64eeff) 72%, transparent);
  border-radius: 50%;
  color: var(--energy, #64eeff);
  background: radial-gradient(circle, color-mix(in srgb, var(--energy, #64eeff) 15%, transparent), transparent 67%);
  box-shadow: inset 0 0 28px color-mix(in srgb, var(--energy, #64eeff) 12%, transparent), 0 0 26px color-mix(in srgb, var(--energy, #64eeff) 14%, transparent);
  animation: zoneSpin 7s linear infinite;
}
.drop-zone::before { content:""; width:54%; height:54%; border:1px solid currentColor; border-radius:50%; opacity:.45; }
.drop-zone::after { content:"에너지 포털"; position:absolute; bottom:-25px; min-width:max-content; color:#d9e0ff; font-size:.74rem; font-weight:800; }
.drop-zone.is-hot { border-style:solid; background:radial-gradient(circle, color-mix(in srgb, var(--energy, #64eeff) 34%, transparent), transparent 72%); filter:brightness(1.4); }

.boss-core {
  position: absolute;
  left: 50%;
  top: 49%;
  width: 170px;
  height: 170px;
  transform: translate(-50%,-50%);
  border: 1px solid rgba(255,104,211,.5);
  border-radius:50%;
  background:radial-gradient(circle at 38% 32%, rgba(255,255,255,.28), rgba(132,76,255,.28) 22%, rgba(41,16,93,.82) 64%, rgba(8,10,32,.95));
  box-shadow:0 0 65px rgba(163,80,255,.35), inset 0 0 36px rgba(255,88,211,.18);
  pointer-events:none;
  animation: bossPulse 2.4s ease-in-out infinite;
}
.boss-core::before,
.boss-core::after { content:""; position:absolute; border-radius:50%; border:1px dashed rgba(102,229,255,.42); }
.boss-core::before { inset:-22px; animation:orbit 8s linear infinite; }
.boss-core::after { inset:18px; border-color:rgba(255,211,90,.33); animation:orbit 5s linear reverse infinite; }
.boss-health { position:absolute; left:50%; top:calc(49% + 102px); width:180px; height:6px; transform:translateX(-50%); border-radius:999px; background:rgba(255,255,255,.1); overflow:hidden; }
.boss-health span { display:block; height:100%; width:100%; background:linear-gradient(90deg,var(--pink),var(--gold)); transition:width 240ms; }

.float-feedback {
  position: absolute;
  transform: translate(-50%, -50%);
  color: var(--success);
  font-family: "Do Hyeon", sans-serif;
  font-size: 1.4rem;
  text-shadow: 0 0 14px currentColor;
  animation: feedbackUp 700ms ease forwards;
}
.float-feedback.is-error { color: var(--danger); font-size: 1rem; }

.help-dialog {
  width: min(520px, calc(100% - 30px));
  padding: 0;
  border: 1px solid rgba(154,181,255,.28);
  border-radius: 24px;
  color: var(--text);
  background: rgba(12, 16, 43, .96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}
.help-dialog::backdrop { background: rgba(3,5,19,.76); backdrop-filter:blur(6px); }
.help-dialog form { position:relative; padding:28px; }
.help-dialog h2 { margin:12px 0 19px; font-family:"Do Hyeon",sans-serif; font-size:1.8rem; font-weight:400; }
.dialog-close { position:absolute; top:17px; right:17px; width:36px; height:36px; border:0; border-radius:11px; color:var(--muted); background:rgba(255,255,255,.06); font-size:1.5rem; cursor:pointer; }
.help-list { display:grid; gap:8px; }
.help-list > div { display:flex; align-items:center; gap:14px; padding:10px 12px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.035); }
.help-list p { margin:0; }
.help-list b { display:block; font-size:.95rem; }
.help-list span { color:var(--muted); font-size:.85rem; }
.help-shape { flex:0 0 auto; width:32px; height:32px; }
.help-shape.star { background:var(--gold); clip-path:polygon(50% 0,61% 34%,98% 35%,68% 56%,79% 93%,50% 70%,20% 93%,31% 56%,2% 35%,39% 34%); filter:drop-shadow(0 0 7px var(--gold)); }
.help-shape.crystal { background:linear-gradient(145deg,var(--cyan),var(--violet)); clip-path:polygon(50% 0,93% 31%,78% 90%,50% 100%,20% 88%,7% 31%); filter:drop-shadow(0 0 7px var(--cyan)); }
.help-shape.shadow { border-radius:48% 52% 50% 50% / 56% 45% 55% 44%; background:var(--violet); box-shadow:0 0 8px var(--violet); }
.help-shape.battery { width:23px; border:2px solid #dce8ff; border-radius:7px; background:linear-gradient(var(--cyan),var(--blue)); box-shadow:0 0 8px var(--cyan); }
.help-tip { margin:16px 0; color:var(--gold); font-size:.82rem; line-height:1.6; }
.secondary-button { width:100%; color:#dfe5ff; background:rgba(255,255,255,.08); border:1px solid var(--line); }
.secondary-button:hover { background:rgba(255,255,255,.13); }

.cursor-glow {
  position: fixed;
  z-index: 99;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 1px solid rgba(99,235,255,.54);
  border-radius:50%;
  box-shadow:0 0 16px rgba(85,237,255,.23);
  pointer-events:none;
  opacity:0;
  transition:width .15s,height .15s,margin .15s,opacity .2s,border-color .15s;
}
.cursor-glow.is-visible { opacity:.8; }
.cursor-glow.is-down { width:17px;height:17px;margin:-8.5px 0 0 -8.5px;border-color:var(--gold); }

@keyframes orbit { to { transform:rotate(360deg); } }
@keyframes auroraSpin { to { transform:rotate(360deg) scale(1.08); } }
@keyframes float { 50% { transform:translateY(-10px) rotate(1deg); } }
@keyframes entityFloat { 50% { margin-top:-7px; } }
@keyframes entityIn { from { opacity:0; transform:translate(-50%,-50%) scale(.35) rotate(-12deg); } }
@keyframes entityOut { to { opacity:0; transform:translate(-50%,-50%) scale(1.7) rotate(16deg); filter:blur(5px); } }
@keyframes pulseRing { 0% { transform:scale(.65);opacity:.8; } 100% { transform:scale(1.25);opacity:0; } }
@keyframes blob { 50% { border-radius:58% 42% 38% 62% / 44% 55% 45% 56%; transform:rotate(3deg) scale(1.03); } }
@keyframes zoneSpin { to { transform:translate(-50%,-50%) rotate(360deg); } }
@keyframes bossPulse { 50% { transform:translate(-50%,-50%) scale(1.04); box-shadow:0 0 86px rgba(163,80,255,.48),inset 0 0 48px rgba(255,88,211,.22); } }
@keyframes wrongShake { 0%,100%{margin-left:0} 25%{margin-left:-7px} 75%{margin-left:7px} }
@keyframes feedbackUp { 0%{opacity:0;transform:translate(-50%,-25%) scale(.8)} 20%{opacity:1} 100%{opacity:0;transform:translate(-50%,-125%) scale(1.08)} }
@keyframes medalPop { from { opacity:0;transform:scale(.2) rotate(-45deg); } }
@keyframes mousePulse { 0%,100%{opacity:1} 45%{opacity:.25} }
@keyframes urgentPulse { 50%{opacity:.48;transform:scale(.94)} }
@keyframes gestureClick { 0%,38%,100%{transform:scale(1)} 52%{transform:scale(.72)} }
@keyframes gestureDouble { 0%,18%,46%,100%{transform:scale(1)} 10%,35%{transform:scale(.68)} }
@keyframes gestureDrag { 0%,20%{transform:translate(0,0) scale(1)} 35%{transform:scale(.72)} 80%{transform:translate(48px,0) scale(.72)} 100%{transform:translate(48px,0) scale(1)} }
@keyframes gestureMixed { 0%,100%{transform:translateX(0);filter:hue-rotate(0)} 50%{transform:translateX(30px) scale(.7);filter:hue-rotate(150deg)} }

@media (max-width: 850px) {
  .hud { align-items:flex-start; }
  .stats-grid { grid-template-columns:repeat(2,minmax(82px,1fr)); }
  .stat-card { border-left:0; padding:4px 8px; }
  .start-screen { grid-template-columns: .6fr 1fr; gap:20px; }
  .start-orbit { width:min(32vw,260px); }
  .action-legend > div { min-width:0; flex:1; }
}

@media (max-width: 650px) {
  .app-shell { width:min(100% - 18px, 1180px); padding-top:12px; }
  .topbar { margin-bottom:10px; }
  .eyebrow { display:none; }
  .brand-mark { width:40px;height:40px;border-radius:13px; }
  .hud { display:block; padding:10px 12px; }
  .mission-panel { margin-bottom:10px; }
  .mission-copy h2 { font-size:.9rem; }
  .stats-grid { grid-template-columns:repeat(4,1fr); border-top:1px solid var(--line); padding-top:8px; }
  .stat-card { min-width:0; padding:0 5px; }
  .stat-card span { font-size:.58rem; }
  .stat-card strong { font-size:.86rem; }
  .shield-card strong { font-size:.64rem;letter-spacing:.04em; }
  .game-card { border-radius:20px; }
  .stage-strip { display:block; min-height:67px; padding:9px 12px; }
  .stage-progress { display:none; }
  .objective { grid-template-columns:1fr 42px; gap:4px 8px; }
  .objective > span { grid-column:1 / 3; font-size:.66rem; }
  .arena { min-height:520px; }
  .start-screen { display:flex; text-align:center; padding:18px; }
  .start-orbit { width:150px; flex:0 0 auto; }
  .start-content { margin-top:-8px; }
  .overlay-screen h2 { font-size:clamp(1.9rem,10vw,2.7rem); }
  .skill-preview { justify-content:center; margin:14px 0; }
  .best-score { display:block; margin:9px 0 0 !important; }
  .action-legend { display:grid; grid-template-columns:1fr 1fr; }
  .action-legend > div { width:100%; }
  .entity { --size:66px !important; }
  .result-stats { grid-template-columns:1fr; gap:5px; max-width:300px; }
  .result-stats > div { display:flex;justify-content:space-between;align-items:center;padding:8px 12px; }
  .result-stats span { margin:0; }
  .result-stats strong { font-size:1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; }
}
