/* >>> AX-KIT */
/* ── 공통 틀(액션 · 타이밍 다섯 게임이 같은 단추 · HUD 느낌을 쓴다): 제목 화면 · PLAY 단추 · 알약 HUD · 손가락 안내 · 별 결과 ── */
.ax-title { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: clamp(18px, 6vh, 64px) 16px clamp(18px, 6vh, 56px); pointer-events: none; text-align: center;
  background: radial-gradient(120% 80% at 50% 45%, transparent 40%, rgba(8, 10, 30, 0.45)); }
.ax-title[hidden] { display: none; }
.ax-title > * { pointer-events: auto; }
.ax-title.out { animation: ax-out 0.32s ease-in forwards; pointer-events: none; }
.ax-title.out > * { pointer-events: none; }
@keyframes ax-out { to { opacity: 0; transform: scale(1.06); } }
.ax-kicker { display: inline-block; padding: 5px 14px 4px; border-radius: 99px; font: 400 14px/1.2 "Fredoka", "Do Hyeon", system-ui, sans-serif; letter-spacing: 0.14em;
  color: var(--ax-k-ink, #fff); background: var(--ax-k-bg, rgba(0, 0, 0, 0.3)); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35); margin-bottom: 10px; animation: ax-drop 0.6s 0.05s cubic-bezier(.2, 1.4, .4, 1) both; }
.ax-logo { margin: 0; max-width: 11em; font-family: "Black Han Sans", "Do Hyeon", var(--title), system-ui, sans-serif; font-weight: 400; font-size: clamp(42px, min(10vw, 11vh), 92px);
  line-height: 0.98; letter-spacing: -0.01em; text-wrap: balance; color: var(--ax-logo, #fff);
  -webkit-text-stroke: 0.16em var(--ax-logo-edge, #1c2140); paint-order: stroke fill;
  text-shadow: 0 0.05em 0 var(--ax-logo-edge, #1c2140), 0 0.09em 0 var(--ax-logo-edge, #1c2140), 0 0.13em 0 var(--ax-logo-edge, #1c2140), 0 0.22em 0.3em rgba(0, 0, 0, 0.4);
  transform: rotate(-2.5deg); animation: ax-drop 0.7s cubic-bezier(.2, 1.5, .4, 1) both, ax-bob 3.2s 0.7s ease-in-out infinite; }
.ax-logo em { display: block; font-style: normal; color: var(--ax-logo2, #ffd23f); font-size: 0.62em; letter-spacing: 0.02em; }
@keyframes ax-drop { from { opacity: 0; transform: translateY(-40px) scale(0.7) rotate(-2.5deg); } }
@keyframes ax-bob { 50% { transform: translateY(-6px) rotate(-1.5deg); } }
.ax-bottom { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ax-best { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px 6px 8px; border-radius: 99px; color: #fff; font-weight: 800; font-size: 15px;
  background: rgba(10, 12, 36, 0.55); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.18), 0 6px 16px rgba(0, 0, 0, 0.25); animation: ax-rise 0.5s 0.25s ease-out both; }
.ax-best svg { width: 26px; height: 26px; flex: none; }
.ax-best small { font-size: 12px; letter-spacing: 0.08em; opacity: 0.75; }
.ax-best b { font-family: "Fredoka", var(--title), sans-serif; font-weight: 600; font-size: 20px; color: #ffd23f; }
@keyframes ax-rise { from { opacity: 0; transform: translateY(16px); } }

/* 크고 도톰한 입체 단추 (눌림 · 반짝임 · 숨쉬기) */
.ax-play { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-width: 230px; padding: 16px 40px 18px; border: 0; border-radius: 22px; cursor: pointer;
  font: 400 32px/1 "Black Han Sans", "Do Hyeon", var(--title), system-ui, sans-serif; letter-spacing: 0.02em; color: #fff; overflow: hidden;
  background: linear-gradient(180deg, #ffe066 0%, #ffb31a 55%, #ff9500 100%);
  box-shadow: 0 7px 0 #c25e00, 0 14px 26px rgba(0, 0, 0, 0.35), inset 0 3px 0 rgba(255, 255, 255, 0.65), inset 0 -4px 0 rgba(180, 80, 0, 0.25);
  text-shadow: 0 2px 0 rgba(160, 70, 0, 0.75); -webkit-text-stroke: 1px rgba(160, 70, 0, 0.35);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s; animation: ax-rise 0.5s 0.15s ease-out both, ax-breathe 1.7s 0.7s ease-in-out infinite; }
.ax-play svg { width: 26px; height: 26px; flex: none; filter: drop-shadow(0 2px 0 rgba(160, 70, 0, 0.7)); }
.ax-play::after { content: ''; position: absolute; top: -20%; bottom: -20%; width: 36%; left: -50%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent); animation: ax-shine 2.8s 1s ease-in-out infinite; }
.ax-play:hover { filter: brightness(1.06) saturate(1.1); }
.ax-play:active { transform: translateY(6px) scale(0.98); box-shadow: 0 1px 0 #c25e00, 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 3px 0 rgba(255, 255, 255, 0.5); animation: none; }
.ax-play:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
@keyframes ax-breathe { 50% { transform: scale(1.045); } }
@keyframes ax-shine { 0%, 55% { left: -50%; } 100% { left: 130%; } }
.ax-tip { display: inline-flex; align-items: center; gap: 8px; max-width: 92vw; padding: 7px 14px; border-radius: 99px; font-size: 14px; font-weight: 700; color: #fff;
  background: rgba(10, 12, 36, 0.45); animation: ax-rise 0.5s 0.35s ease-out both; }
.ax-tip svg { width: 22px; height: 22px; flex: none; }

/* 알약 HUD: 아이콘 + 숫자 */
.ax-hud { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3; display: flex; gap: 8px; align-items: flex-start; pointer-events: none; }
.ax-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 4px; border-radius: 99px; color: #fff; white-space: nowrap;
  background: rgba(10, 12, 36, 0.58); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.16), 0 4px 12px rgba(0, 0, 0, 0.2); }
.ax-pill > svg, .ax-pill > i { width: 28px; height: 28px; flex: none; display: grid; place-items: center; font-style: normal; }
.ax-pill b { font: 600 20px/1 "Fredoka", var(--title), system-ui, sans-serif; display: inline-block; }
.ax-pill small { font-size: 12px; font-weight: 700; opacity: 0.7; }
.ax-pill .bump, .ax-bump { animation: ax-bump 0.34s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes ax-bump { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* 처음 하는 사람 안내: 손가락이 직접 보여 준다 */
.ax-tut { position: absolute; z-index: 6; pointer-events: none; width: 0; height: 0; }
.ax-tut[hidden] { display: none; }
.ax-hand { position: absolute; left: -10px; top: -4px; width: 64px; height: 64px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35)); transform-origin: 30% 10%; animation: ax-tap 1.1s ease-in-out infinite; }
.ax-tut .ax-ripple { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; opacity: 0; animation: ax-rip 1.1s ease-out infinite; }
.ax-tut b { position: absolute; left: 50%; top: 66px; transform: translateX(-50%); white-space: nowrap; padding: 5px 12px; border-radius: 99px; font: 400 18px/1.1 "Black Han Sans", "Do Hyeon", var(--title), sans-serif;
  color: #1c2140; background: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18); }
.ax-tut.hold .ax-hand { animation: ax-hold 1.6s ease-in-out infinite; }
.ax-tut.hold .ax-ripple { animation: ax-rip 1.6s ease-out infinite; }
@keyframes ax-tap { 0%, 100% { transform: translate(8px, 14px) scale(1); } 40% { transform: translate(0, 0) scale(0.92); } 55% { transform: translate(0, 0) scale(0.92); } }
@keyframes ax-hold { 0%, 100% { transform: translate(8px, 14px); } 20%, 75% { transform: translate(0, 0) scale(0.9); } }
@keyframes ax-rip { 0%, 35% { opacity: 0; transform: scale(0.4); } 45% { opacity: 0.9; } 100% { opacity: 0; transform: scale(1.8); } }

/* 결과 화면: 별 세 개 · 올라가는 점수 · 새 기록 띠 */
.ax-end .panel { position: relative; overflow: visible; width: min(380px, 100%); padding: 30px 22px 18px; border-radius: 28px; text-align: center; color: #fff;
  background: linear-gradient(180deg, var(--ax-card1, #2e3470), var(--ax-card2, #1b1f45)); border: 0;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12), inset 0 3px 0 rgba(255, 255, 255, 0.12), 0 10px 0 rgba(0, 0, 0, 0.25), 0 26px 60px rgba(0, 0, 0, 0.5);
  animation: ax-card 0.45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes ax-card { from { transform: translateY(40px) scale(0.85); opacity: 0; } }
.ax-end h2 { margin: 0 0 4px; font: 400 32px/1.1 "Black Han Sans", "Do Hyeon", var(--title), sans-serif; color: #fff; -webkit-text-stroke: 5px rgba(10, 12, 36, 0.6); paint-order: stroke fill; }
.ax-ribbon { position: absolute; left: 50%; top: -18px; transform: translateX(-50%) rotate(-3deg); white-space: nowrap; padding: 6px 22px 5px;
  font: 400 19px/1.1 "Black Han Sans", "Do Hyeon", var(--title), sans-serif; color: #fff; background: linear-gradient(180deg, #ff6b8b, #e8365d);
  box-shadow: 0 4px 0 #a51f40, 0 8px 18px rgba(0, 0, 0, 0.3); border-radius: 8px; text-shadow: 0 2px 0 rgba(120, 10, 40, 0.6); animation: ax-ribbon 0.6s 1.4s cubic-bezier(.2, 1.6, .4, 1) both; }
.ax-ribbon[hidden] { display: none; }
@keyframes ax-ribbon { from { transform: translateX(-50%) rotate(-3deg) scale(0); } }
.ax-stars { display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin: 6px 0 2px; height: 74px; }
.ax-star { width: 58px; height: 58px; display: block; }
.ax-star:nth-child(2) { width: 72px; height: 72px; }
.ax-star path { fill: rgba(0, 0, 0, 0.32); stroke: rgba(255, 255, 255, 0.12); stroke-width: 1.2; stroke-linejoin: round; }
.ax-star.on path { fill: url(#axStarG); stroke: #b86e00; }
.ax-star.on { animation: ax-star 0.5s cubic-bezier(.2, 1.8, .4, 1) both; filter: drop-shadow(0 3px 0 #a35e00) drop-shadow(0 0 10px rgba(255, 210, 63, 0.6)); }
@keyframes ax-star { 0% { transform: scale(2.2) rotate(-30deg); opacity: 0; } 60% { transform: scale(0.9) rotate(6deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
.ax-score { margin: 2px 0 2px; }
.ax-score b { display: block; font: 600 64px/1 "Fredoka", var(--title), system-ui, sans-serif; color: #ffd23f; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); }
.ax-score span { font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, 0.7); }
.ax-next { display: inline-block; margin: 8px 0 4px; padding: 5px 14px; border-radius: 99px; font-size: 14px; font-weight: 700; color: #fff; background: rgba(255, 255, 255, 0.1); }
.ax-next b { color: #ffd23f; }
.ax-bar { height: 8px; margin: 6px auto 2px; width: 80%; border-radius: 99px; background: rgba(0, 0, 0, 0.3); overflow: hidden; }
.ax-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #ffd23f, #ff9500); transition: width 0.9s 0.3s cubic-bezier(.2, .8, .3, 1); }
.ax-mini { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.ax-mini span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.8); background: rgba(0, 0, 0, 0.25); }
.ax-mini b { font: 600 16px/1 "Fredoka", var(--title), sans-serif; color: #fff; }
.ax-end .ax-play { width: 100%; min-width: 0; font-size: 28px; padding: 14px 20px 16px; animation: ax-breathe 1.7s 1.6s ease-in-out infinite; }
.ax-link { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, 0.65); text-decoration: none; }
.ax-link:hover { color: #fff; text-decoration: underline; }
.ax-row { display: flex; gap: 8px; }
.ax-row .ax-play { flex: 1; }
.ax-ghost { display: inline-flex; align-items: center; justify-content: center; min-width: 58px; border: 0; border-radius: 18px; cursor: pointer; color: #fff; font: 400 18px/1 "Black Han Sans", "Do Hyeon", var(--title), sans-serif;
  background: rgba(255, 255, 255, 0.14); box-shadow: 0 5px 0 rgba(0, 0, 0, 0.25), inset 0 2px 0 rgba(255, 255, 255, 0.2); padding: 0 14px; }
.ax-ghost:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }

@media (max-height: 620px) {
  .ax-logo { font-size: clamp(34px, 9vh, 60px); }
  .ax-play { font-size: 26px; padding: 12px 30px 14px; min-width: 190px; }
  .ax-stars { height: 56px; } .ax-star { width: 44px; height: 44px; } .ax-star:nth-child(2) { width: 54px; height: 54px; }
  .ax-score b { font-size: 46px; }
  .ax-end .panel { padding: 16px 18px 12px; }
  .ax-end h2 { font-size: 26px; }
  .ax-mini { margin: 6px 0 10px; }
}
@media (prefers-reduced-motion: reduce) { .ax-logo, .ax-play, .ax-play::after, .ax-hand, .ax-tut .ax-ripple { animation: none !important; } }

.ax-play[hidden], .ax-best[hidden], .ax-ghost[hidden], .ax-next[hidden], .ax-bar[hidden] { display: none !important; }

/* ── 더한 것(땅따먹기 · 육각 · 드롭 · 레이싱 · 미로 · 뱀 공통) ── */
.ax-title .ax-head { display: flex; flex-direction: column; align-items: center; }
.ax-art { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.ax-art:empty { display: none; }
.ax-bot { width: clamp(84px, 16vh, 150px); height: auto; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35)); animation: ax-botbob 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
.ax-bot-eyes { animation: ax-blink 4s infinite; transform-origin: 60px 64px; }
@keyframes ax-botbob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
@keyframes ax-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
.ax-hud { gap: 6px; flex-wrap: wrap; }
.ax-pill b.bump { animation: ax-bump 0.34s cubic-bezier(.3, 1.8, .5, 1); }
.ax-end-sub { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--ax-sub, #ff9aa6); }
/* 밀기(스와이프) 안내: 손가락이 옆으로 쓸고 지나간다 */
.ax-tut.swipe .ax-hand { animation: ax-swipe 1.5s ease-in-out infinite; }
.ax-tut.swipe .ax-ripple { animation: none; opacity: 0; }
@keyframes ax-swipe { 0% { transform: translate(-46px, 14px) scale(1); opacity: 0; } 15% { opacity: 1; transform: translate(-46px, 6px) scale(0.92); } 70% { transform: translate(46px, 6px) scale(0.92); opacity: 1; } 100% { transform: translate(52px, 14px); opacity: 0; } }
.ax-tut.drag .ax-hand { animation: ax-dragv 1.8s ease-in-out infinite; }
.ax-tut.drag .ax-ripple { animation: none; opacity: 0; }
@keyframes ax-dragv { 0% { transform: translate(0, 0) scale(1); opacity: 0; } 12% { opacity: 1; transform: translate(0, 0) scale(0.9); } 70% { transform: translate(var(--tx, 0px), var(--ty, -90px)) scale(0.9); opacity: 1; } 85%, 100% { transform: translate(var(--tx, 0px), var(--ty, -90px)) scale(1); opacity: 0; } }
.ax-keys { display: inline-flex; gap: 4px; align-items: center; }
.ax-keys kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px; font: 700 12px/1 system-ui, sans-serif; color: #1c2140; background: #fff; box-shadow: 0 2px 0 #9aa0c8; }
@media (max-height: 620px) { .ax-bot { width: clamp(64px, 14vh, 110px); } }
@media (prefers-reduced-motion: reduce) { .ax-bot, .ax-bot-eyes, .ax-tut .ax-hand { animation: none !important; } }
/* <<< AX-KIT */

/* 냠냠 뱀게임 — 반딧불 날리는 밤의 과일 정원 */
.stage { justify-content: flex-start; gap: 8px; padding: 10px 10px 12px;
  background: radial-gradient(120% 80% at 50% 0%, #26407a 0%, #182a52 50%, #0f1a33 100%);
  --ax-logo: #fff; --ax-logo-edge: #0c4642; --ax-logo2: #ffd23f; --ax-k-bg: linear-gradient(90deg, #3ee0b5, #17a088); --ax-card1: #234a6e; --ax-card2: #132a45; }
/* 아래쪽 풀숲 그림자 + 떠다니는 반딧불 */
.stage::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; pointer-events: none; opacity: 0.55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='120' viewBox='0 0 240 120'%3E%3Cpath d='M0 120V70c10-30 20-30 26 0 4-40 18-50 22-4 6-26 16-28 20 0 8-44 22-44 26 6 6-30 18-30 22 0 8-36 20-40 26 0 4-24 14-26 18 2 8-38 22-40 28 0 6-28 16-30 22 0 6-30 16-34 30-4V120z' fill='%230b2a25'/%3E%3C/svg%3E") repeat-x bottom / 240px 120px; }
.stage::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(220, 255, 140, 0.9) 0 1.5px, transparent 3px), radial-gradient(circle, rgba(140, 255, 210, 0.8) 0 1.5px, transparent 3px), radial-gradient(circle, rgba(255, 240, 150, 0.7) 0 1px, transparent 2.5px);
  background-size: 230px 190px, 310px 260px, 170px 210px; background-position: 20px 40px, 140px 120px, 60px 10px; animation: sn-fly 16s ease-in-out infinite alternate; opacity: 0.7; }
@keyframes sn-fly { 50% { background-position: 50px 10px, 110px 150px, 90px 40px; opacity: 1; } 100% { background-position: 10px 60px, 170px 100px, 40px 30px; opacity: 0.6; } }
.stage > * { position: relative; z-index: 1; }
.stage > .ax-title, .stage > .overlay { position: absolute; z-index: 10; }

.sn-top { position: relative; flex: none; display: flex; align-items: center; gap: 8px; width: min(100%, 640px); transition: opacity 0.3s; }
.stage:not(.on) .sn-top { opacity: 0; }
.sn-top .ax-pill { height: 40px; }
.sn-top .ax-pill > svg { width: 30px; height: 30px; }
.sn-top .ax-pill b { font-size: 22px; }
.sn-sc b { color: #ffe27a; }
.sn-bs b { color: #ffd23f; font-size: 18px !important; }
.sn-sp { flex: 1; }
.sn-pause { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 14px; color: #fff; cursor: pointer;
  background: rgba(255, 255, 255, 0.14); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.18); }
.sn-pause svg { width: 20px; height: 20px; fill: currentColor; }
.sn-pause:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3); }

.sn-wrap { position: relative; flex: 1 1 0; min-height: 0; width: 100%; display: grid; place-items: center; touch-action: none; }
.sn-cv { display: block; border-radius: 16px; touch-action: none;
  box-shadow: 0 0 0 4px #3ee0b5, 0 0 0 9px rgba(12, 70, 66, 0.9), 0 0 30px rgba(62, 224, 181, 0.35), 0 22px 50px rgba(0, 0, 0, 0.5); }
.sn-cv.wrapmode { box-shadow: 0 0 0 2px rgba(62, 224, 181, 0.35), 0 0 22px rgba(62, 224, 181, 0.35), 0 18px 44px rgba(0, 0, 0, 0.45);
  outline: 3px dashed rgba(62, 224, 181, 0.85); outline-offset: 5px; }
.sn-toast { position: absolute; left: 50%; top: 18%; z-index: 4; pointer-events: none; white-space: nowrap; transform: translateX(-50%);
  font: 400 clamp(26px, 6vw, 40px)/1 "Black Han Sans", "Do Hyeon", var(--title), sans-serif; color: #7ef0ff; -webkit-text-stroke: 6px rgba(10, 30, 40, 0.85); paint-order: stroke fill; }
.sn-toast[hidden] { display: none; }
.sn-toast.go { animation: sn-toast 1.3s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes sn-toast { 0% { transform: translateX(-50%) scale(0.3); opacity: 0; } 18% { transform: translateX(-50%) scale(1.12); opacity: 1; } 28% { transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-18px); } }

/* 폰용 방향 단추 (도톰한 입체) */
.sn-pad { position: relative; display: none; flex: none; grid-template-columns: repeat(3, 64px); grid-template-rows: 52px 52px; gap: 6px; touch-action: none; transition: opacity 0.3s; }
.stage.touch .sn-pad { display: grid; }
.stage:not(.on) .sn-pad { opacity: 0; }
.sn-pad button { display: grid; place-items: center; border: 0; border-radius: 16px; color: #fff; touch-action: none;
  background: linear-gradient(180deg, #4fe8c0, #17a088); box-shadow: 0 5px 0 #0c6656, 0 8px 18px rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.35); }
.sn-pad button svg { width: 26px; height: 26px; filter: drop-shadow(0 2px 0 rgba(0, 80, 60, 0.6)); }
.sn-pad button.on, .sn-pad button:active { transform: translateY(4px); box-shadow: 0 1px 0 #0c6656, inset 0 2px 0 rgba(255, 255, 255, 0.35); }
.sn-pad .d-up { grid-column: 2; grid-row: 1; }
.sn-pad .d-left { grid-column: 1; grid-row: 2; }
.sn-pad .d-down { grid-column: 2; grid-row: 2; }
.sn-pad .d-right { grid-column: 3; grid-row: 2; }
.sn-pad .d-down svg { transform: rotate(180deg); }
.sn-pad .d-left svg { transform: rotate(-90deg); }
.sn-pad .d-right svg { transform: rotate(90deg); }

/* 제목 화면 */
.stage .ax-title { background: radial-gradient(100% 80% at 50% 45%, rgba(15, 26, 51, 0.55), rgba(8, 14, 30, 0.93)); }
.sn-art { width: min(86vw, 420px, 46vh); height: auto; overflow: visible; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.45)); }
.sn-art-head { animation: sn-head 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.sn-art-tongue { animation: sn-tongue 2.2s ease-in-out infinite; }
.sn-art-apple { animation: sn-apple 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center bottom; }
@keyframes sn-head { 0%, 100% { transform: translate(40px, 120px) rotate(-6deg); } 50% { transform: translate(40px, 112px) rotate(4deg); } }
@keyframes sn-tongue { 0%, 70%, 100% { opacity: 0; } 78%, 92% { opacity: 1; } }
@keyframes sn-apple { 0%, 100% { transform: translate(150px, 54px) rotate(-4deg); } 50% { transform: translate(150px, 46px) rotate(4deg); } }
.stage .sn-mode { display: flex; gap: 8px; width: min(320px, calc(100vw - 40px)); }
.stage .sn-mode button { flex: 1; padding: 8px 6px; border: 0; border-radius: 14px; cursor: pointer; color: #cfe; font: 400 15px/1.2 "Black Han Sans", "Do Hyeon", var(--title), sans-serif;
  background: rgba(10, 20, 40, 0.75); box-shadow: inset 0 0 0 2px rgba(62, 224, 181, 0.3), 0 3px 0 rgba(0, 0, 0, 0.3); }
.stage .sn-mode button.on { color: #fff; background: linear-gradient(180deg, #3ee0b5, #17a088); box-shadow: inset 0 0 0 2px #fff, 0 3px 0 #0c6656; }
.ax-end .sn-mode { margin: 0 auto 12px; }
@media (pointer: coarse) { .sn-kb { display: none; } }

/* 멈춤 판 */
.ov-pause { background: rgba(8, 14, 30, 0.6); }
.ov-pause .panel { display: flex; flex-direction: column; gap: 12px; align-items: stretch; width: min(320px, 100%); padding: 26px 22px; border-radius: 26px; text-align: center; color: #fff; border: 0;
  background: linear-gradient(180deg, #234a6e, #132a45); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12), 0 10px 0 rgba(0, 0, 0, 0.25), 0 26px 60px rgba(0, 0, 0, 0.5); }
.ov-pause h2 { margin: 0 0 6px; font: 400 30px/1.1 "Black Han Sans", "Do Hyeon", var(--title), sans-serif; color: #fff; }
.ov-pause .ax-play { min-width: 0; font-size: 26px; }
.ax-end .ax-end-sub { color: #ff9aa6; }

@media (orientation: landscape) and (max-height: 520px) {
  .stage.touch .sn-pad { position: absolute; right: 12px; bottom: 12px; z-index: 3; opacity: 0.9; grid-template-columns: repeat(3, 54px); grid-template-rows: 46px 46px; }
  .stage.touch .sn-wrap { padding: 0 190px; }
  .sn-top .ax-pill { height: 34px; }
  .sn-pause { width: 38px; height: 38px; }
}
@media (max-width: 420px) {
  .sn-top { gap: 5px; }
  .sn-top .ax-pill { height: 34px; padding-right: 10px; }
  .sn-top .ax-pill > svg { width: 24px; height: 24px; }
  .sn-top .ax-pill b { font-size: 18px; }
}
@media (max-width: 359px) { .sn-pad { grid-template-columns: repeat(3, 56px); grid-template-rows: 46px 46px; } }

/* ── 판: 나무 울타리 테 + 둘레 풀 · 꽃 (2차 다듬기) ── */
.sn-board { position: relative; padding: 14px; border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 40%, rgba(0, 0, 0, 0.25)),
    repeating-linear-gradient(90deg, #9a6438 0 26px, #8a5630 26px 28px, #a26b3d 28px 52px, #7d4c29 52px 54px);
  box-shadow: inset 0 3px 0 rgba(255, 230, 190, 0.35), inset 0 -4px 0 rgba(40, 18, 6, 0.55), 0 0 0 3px #4a2a14, 0 0 0 7px rgba(10, 40, 25, 0.6), 0 22px 50px rgba(0, 0, 0, 0.55); }
/* 울타리 위 못 자국(네 귀퉁이) */
.sn-board::before { content: ''; position: absolute; inset: 4px; border-radius: 18px; pointer-events: none;
  background: radial-gradient(circle at 8px 8px, #3a2210 2.5px, transparent 3.5px), radial-gradient(circle at calc(100% - 8px) 8px, #3a2210 2.5px, transparent 3.5px),
    radial-gradient(circle at 8px calc(100% - 8px), #3a2210 2.5px, transparent 3.5px), radial-gradient(circle at calc(100% - 8px) calc(100% - 8px), #3a2210 2.5px, transparent 3.5px); }
.stage .sn-cv { border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4), 0 0 0 2px #3a2210, 0 3px 0 2px rgba(255, 220, 170, 0.25); }
.stage .sn-cv.wrapmode { outline: 3px dashed rgba(62, 224, 181, 0.9); outline-offset: 3px; }
.sn-deco { position: absolute; z-index: 2; pointer-events: none; display: block; background: no-repeat center bottom / contain; transform-origin: 50% 100%; animation: sn-sway 3.4s ease-in-out infinite; }
.sn-grass { width: 46px; height: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 34'%3E%3Cpath d='M4 34C6 22 3 14 1 8c6 5 9 14 9 26zM12 34c0-14 2-24 7-32 0 10-2 22-1 32zM20 34c2-12 7-20 14-24-4 7-7 15-8 24zM28 34c1-9 5-15 12-18-3 5-5 11-5 18zM8 34c1-8 5-13 9-16-2 5-3 10-3 16z' fill='%2334a867'/%3E%3Cpath d='M12 34c0-14 2-24 7-32-2 10-3 22-3 32z' fill='%2357d48a'/%3E%3Cpath d='M28 34c1-9 5-15 12-18-4 5-6 11-6 18z' fill='%2347c27b'/%3E%3C/svg%3E"); }
.sn-flower { width: 30px; height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 40'%3E%3Cpath d='M15 40V18' stroke='%232f9a5c' stroke-width='3'/%3E%3Cpath d='M15 30c-6-1-9-5-9-9 5 0 8 4 9 9z' fill='%2347c27b'/%3E%3Cg fill='%23ff8fb8'%3E%3Ccircle cx='15' cy='6' r='5'/%3E%3Ccircle cx='22' cy='12' r='5'/%3E%3Ccircle cx='8' cy='12' r='5'/%3E%3Ccircle cx='11' cy='19' r='5'/%3E%3Ccircle cx='19' cy='19' r='5'/%3E%3C/g%3E%3Ccircle cx='15' cy='13' r='4' fill='%23ffd23f'/%3E%3C/svg%3E"); }
.sn-flower.f2 { filter: hue-rotate(160deg) saturate(1.2); }
.sn-flower.f3 { filter: hue-rotate(60deg); }
.sn-deco.g1 { left: -10px; bottom: -8px; }
.sn-deco.f1 { left: 26px; bottom: -6px; animation-delay: -1.2s; }
.sn-deco.g2 { right: -12px; bottom: -8px; animation-delay: -0.6s; transform: scaleX(-1); }
.sn-deco.f2 { right: -8px; top: 28%; animation-delay: -2s; }
.sn-deco.g3 { left: -14px; top: 22%; animation-delay: -1.6s; }
.sn-deco.f3 { right: 30%; top: -18px; animation-delay: -0.3s; width: 24px; height: 32px; }
@keyframes sn-sway { 0%, 100% { rotate: -5deg; } 50% { rotate: 6deg; } }
.sn-deco.g2 { animation-name: sn-sway2; }
@keyframes sn-sway2 { 0%, 100% { transform: scaleX(-1) rotate(-5deg); } 50% { transform: scaleX(-1) rotate(6deg); } }
@keyframes sn-head { 0%, 100% { transform: translate(60px, 118px) rotate(-6deg); } 50% { transform: translate(60px, 110px) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .sn-deco { animation: none; } }
