/* 오목 */
/* ==AX== AAA 공통 꾸미기 — 보드 · 카드 게임 다섯 개가 같은 사본을 쓴다. 색은 각 게임이 .stage 의 --ax-* 로 정한다 */
/* 제목 화면 · 끝 화면 */
.overlay.ax-ov { padding: 14px; background: radial-gradient(120% 90% at 50% 0%, var(--ax-bg1) 0%, var(--ax-bg2) 72%); backdrop-filter: none; overflow: hidden; }
.overlay.ax-ov.ax-end-ov { background: radial-gradient(90% 80% at 50% 30%, color-mix(in srgb, var(--ax-bg1) 82%, transparent) 0%, color-mix(in srgb, var(--ax-bg2) 90%, transparent) 75%); backdrop-filter: blur(5px); }
.ax-scene { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ax-scene::after { content: ''; position: absolute; inset: 0; background: radial-gradient(80% 70% at 50% 45%, transparent 40%, rgba(0, 0, 0, 0.5) 100%); }
.ax-ov .panel.ax-card { position: relative; z-index: 1; width: min(900px, 100%); max-height: 100%; overflow: auto; background: none; box-shadow: none; color: #fff; padding: 6px; border-radius: 0;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 10px 34px; align-items: center; text-align: center; scrollbar-width: none; animation: ax-in 0.5s cubic-bezier(.2, .9, .3, 1.15); }
.ax-ov .panel.ax-card::-webkit-scrollbar { display: none; }
@keyframes ax-in { from { opacity: 0; transform: translateY(24px) scale(0.96); } }
.ax-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.ax-ov .ax-logo { position: relative; margin: 0; font-family: 'Black Han Sans', var(--title); font-weight: 400; font-size: clamp(44px, 6.4vw, 78px); line-height: 1.05; letter-spacing: -0.01em; word-break: keep-all;
  color: var(--ax-ink); -webkit-text-stroke: 6px var(--ax-ink); text-shadow: 0 4px 0 var(--ax-ink), 4px 0 0 var(--ax-ink), -4px 0 0 var(--ax-ink), 0 -4px 0 var(--ax-ink), 3px 3px 0 var(--ax-ink), -3px 3px 0 var(--ax-ink), 3px -3px 0 var(--ax-ink), -3px -3px 0 var(--ax-ink); filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.35)) drop-shadow(0 14px 18px rgba(0, 0, 0, 0.4)); animation: ax-logo 3.6s ease-in-out infinite; }
.ax-ov .ax-logo::after { content: attr(data-t); position: absolute; inset: 0; -webkit-text-stroke: 0; text-shadow: none; color: transparent; background: linear-gradient(180deg, var(--ax-l1) 8%, var(--ax-l2) 52%, var(--ax-l3) 100%); -webkit-background-clip: text; background-clip: text; }
@keyframes ax-logo { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-5px) rotate(1deg); } }
.ax-ov .ax-tag { margin: 0; max-width: 30em; font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, 0.78); font-weight: 600; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); }
.ax-pic { position: relative; width: min(330px, 100%); height: 170px; margin: 2px 0; }
.ax-pic .ax-bot { position: absolute; left: 50%; bottom: 6px; width: 132px; transform: translateX(-50%); z-index: 2; }
.ax-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.32); border: 1px solid rgba(255, 255, 255, 0.14); font-size: 14px; font-weight: 700; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.ax-badge:empty { display: none; }
.ax-badge i { font-style: normal; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(180deg, #ffe58a, #ffb020); color: #6b3d00; font-size: 14px; box-shadow: 0 2px 0 #a46a00; }
.ax-opts { min-width: 0; padding: 16px 16px 14px; border-radius: 26px; text-align: left; background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)); border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.16); backdrop-filter: blur(10px); }
.ax-ov p.ax-l { color: rgba(255, 255, 255, 0.62) !important; }
.ax-l { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.62); margin: 8px 4px 4px; text-align: left; }
.ax-l:first-child { margin-top: 0; }
.ax-ov .panel .seg { display: flex; gap: 6px; margin: 0 0 4px; }
.ax-ov .panel .seg button { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 4px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3); color: rgba(235, 238, 255, 0.86); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.3); transition: transform 0.12s, background 0.15s, border-color 0.15s; line-height: 1.15; -webkit-hyphens: auto; hyphens: auto; }
.ax-ov .panel .seg button:hover { border-color: rgba(255, 255, 255, 0.28); }
.ax-ov .panel .seg button:active { transform: scale(0.95); }
.ax-ov .panel .seg button.on { color: #fff; border-color: var(--ax-acc); background: linear-gradient(180deg, var(--ax-s1), var(--ax-s2)); box-shadow: 0 4px 16px var(--ax-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -3px 0 rgba(0, 0, 0, 0.2); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.ax-ov .panel .seg button small { display: block; font-size: 10px; line-height: 1; letter-spacing: 1px; color: #ffd65e; }
.ax-ov .panel .seg button small:empty { display: none; }
.ax-ov .panel .seg button:has(small:not(:empty)) { flex-direction: column; gap: 2px; padding: 6px 4px; }
.ax-rec { margin: 4px 4px 0 !important; font-size: 12.5px; color: rgba(255, 255, 255, 0.6) !important; text-align: center; }
/* 큰 입체 PLAY 단추 */
.big-btn.ax-play { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; margin-top: 14px; padding: 15px 14px 17px; border: 0; border-radius: 20px; cursor: pointer;
  font-family: 'Black Han Sans', var(--title); font-size: 30px; line-height: 1.1; letter-spacing: 0.02em; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
  background: linear-gradient(180deg, var(--ax-p1) 0%, var(--ax-p2) 100%); box-shadow: 0 7px 0 var(--ax-p3), 0 14px 26px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.5), inset 0 -4px 0 rgba(0, 0, 0, 0.12);
  animation: ax-breathe 2.2s ease-in-out infinite; transition: transform 0.08s, box-shadow 0.08s; }
.big-btn.ax-play::before { content: ''; flex: none; width: 0; height: 0; border-left: 20px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.25)); }
.big-btn.ax-play.ax-again::before { content: '\21BB'; width: auto; height: auto; border: 0; font-family: system-ui, sans-serif; font-size: 30px; line-height: 1; font-weight: 900; }
.big-btn.ax-play::after { content: ''; position: absolute; top: -10%; left: -50%; width: 34%; height: 120%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.6), transparent); transform: skewX(-20deg); animation: ax-shine 3s ease-in-out infinite; }
.big-btn.ax-play:hover { filter: brightness(1.07); }
.big-btn.ax-play:active { transform: translateY(6px) scale(0.99); box-shadow: 0 1px 0 var(--ax-p3), 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.5); animation: none; }
@keyframes ax-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes ax-shine { 0%, 55% { left: -50%; } 100% { left: 130%; } }
.ax-ov .sub-btn { display: block; width: 100%; margin-top: 8px; padding: 11px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.08); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; }
.ax-ov .sub-btn:hover { background: rgba(255, 255, 255, 0.15); }
.ax-ov .sub-btn[hidden] { display: none; }
.ax-ov details { margin-top: 10px; font-size: 14px; color: rgba(255, 255, 255, 0.78); text-align: left; }
.ax-ov details summary { cursor: pointer; text-align: center; font-weight: 800; color: rgba(255, 255, 255, 0.7); list-style: none; }
.ax-ov details summary::-webkit-details-marker { display: none; }
.ax-ov details summary::before { content: '?'; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); font-size: 12px; }
.ax-ov details ul { margin: 8px 0 0; padding-left: 20px; color: rgba(255, 255, 255, 0.78); font-size: 13.5px; line-height: 1.5; }
/* 끝 화면 */
.ax-ov .panel.ax-card.ax-endc { display: flex; flex-direction: column; align-items: center; gap: 0; width: min(430px, 100%); padding: 0 22px 18px; margin-top: 30px; border-radius: 30px; overflow: visible;
  background: linear-gradient(180deg, rgba(36, 40, 92, 0.96), rgba(18, 20, 50, 0.97)); border: 2px solid rgba(255, 255, 255, 0.14); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.ax-ribbon { position: relative; margin: -26px -34px 4px; padding: 12px 30px 14px; border-radius: 14px; background: linear-gradient(180deg, var(--ax-r1, #ffcf4a), var(--ax-r2, #f29a00)); box-shadow: 0 6px 0 var(--ax-r3, #a35d00), 0 14px 24px rgba(0, 0, 0, 0.4); }
.ax-ribbon::before, .ax-ribbon::after { content: ''; position: absolute; top: 14px; width: 26px; height: 100%; background: var(--ax-r3, #a35d00); z-index: -1; }
.ax-ribbon::before { left: -14px; transform: skewY(20deg); border-radius: 6px 0 0 6px; }
.ax-ribbon::after { right: -14px; transform: skewY(-20deg); border-radius: 0 6px 6px 0; }
.ax-ribbon h2 { margin: 0 !important; font-family: 'Black Han Sans', var(--title); font-weight: 400; font-size: 36px !important; line-height: 1.1; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.28); white-space: nowrap; }
.ax-endc.lose .ax-ribbon { --ax-r1: #8a93c8; --ax-r2: #5a628f; --ax-r3: #353b62; }
.ax-endc.draw .ax-ribbon { --ax-r1: #6fd6c0; --ax-r2: #2aa58a; --ax-r3: #17604f; }
.ax-endico { margin-top: 6px; height: 104px; display: grid; place-items: center; font-size: 74px; line-height: 1; }
.ax-endico .ax-cup { width: 108px; height: 108px; filter: drop-shadow(0 8px 14px rgba(255, 190, 40, 0.45)); animation: ax-cup 0.7s cubic-bezier(.3, 1.7, .5, 1) both; }
@keyframes ax-cup { from { transform: scale(0.2) rotate(-25deg); opacity: 0; } }
.ax-endico .ax-bot { width: 116px; }
.ax-stars { display: flex; justify-content: center; align-items: flex-end; gap: 8px; height: 66px; margin: 2px 0 4px; }
.ax-stars:empty { display: none; }
.ax-star { width: 54px; height: 54px; background: rgba(0, 0, 0, 0.35); clip-path: polygon(50% 2%, 62% 36%, 98% 37%, 69% 59%, 80% 95%, 50% 74%, 20% 95%, 31% 59%, 2% 37%, 38% 36%); transform: scale(0.85); }
.ax-star.ax-star-mid { width: 66px; height: 66px; margin-bottom: 8px; }
.ax-star.on { background: radial-gradient(circle at 40% 30%, #fffbe0 0%, #ffe066 30%, #ffb800 70%, #e08a00 100%); animation: ax-star 0.5s cubic-bezier(.3, 1.9, .5, 1) both; }
.ax-star.off { background: rgba(255, 255, 255, 0.13); animation: ax-star-off 0.3s ease-out both; }
@keyframes ax-star { 0% { transform: scale(2.4) rotate(-40deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes ax-star-off { from { transform: scale(0.5); } to { transform: scale(0.85); } }
.ax-msg { margin: 2px 0 6px !important; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, 0.82) !important; }
.ax-msg:empty { display: none; }
.ax-next { margin: 4px 0 8px !important; padding: 7px 14px; border-radius: 999px; background: rgba(255, 214, 94, 0.12); border: 1px dashed rgba(255, 214, 94, 0.55); color: #ffe08a !important; font-size: 13.5px; font-weight: 800; }
.ax-next:empty { display: none; }
.ax-pills { text-align: center; display: flex; justify-content: center; gap: 8px; margin: 6px 0 4px; width: 100%; }
.ax-pills > div { flex: 1; min-width: 0; padding: 7px 4px 6px; border-radius: 14px; background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.08); }
.ax-pills b { display: block; font-family: 'Black Han Sans', var(--title); font-weight: 400; font-size: 24px; line-height: 1.1; color: #fff; }
.ax-pills span { display: block; font-size: 11.5px; font-weight: 700; color: rgba(255, 255, 255, 0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-best { margin: 6px 0 2px !important; font-size: 13.5px; font-weight: 700; color: rgba(255, 255, 255, 0.7) !important; }
.ax-best:empty { display: none; }
.ax-best.newbest { display: inline-block; padding: 6px 16px; border-radius: 10px; color: #3a2400 !important; background: linear-gradient(180deg, #fff1a6, #ffc83d); box-shadow: 0 4px 0 #b37a00, 0 0 24px rgba(255, 200, 61, 0.6); animation: ax-newbest 1s ease-in-out infinite alternate; }
@keyframes ax-newbest { from { transform: rotate(-2deg) scale(1); } to { transform: rotate(2deg) scale(1.05); } }
.ax-row { display: flex; gap: 6px; width: 100%; margin-top: 10px; }
.ax-row > * { flex: 1; min-width: 0; padding: 9px 4px !important; margin: 0 !important; font-size: 13px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 게임 화면 단추 · 숫자 튐 */
.ax-btn { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 6px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.16); cursor: pointer;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05)); color: #fff; font: inherit; font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22); transition: transform 0.08s, box-shadow 0.08s, background 0.15s; }
.ax-btn i { font-style: normal; flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ax-acc); color: #1c1400; font-size: 14px; line-height: 1; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); }
.ax-btn:hover { background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)); }
.ax-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.ax-btn:disabled { opacity: 0.4; cursor: default; transform: none; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); }
.ax-bump { animation: ax-bump 0.36s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes ax-bump { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 100% { transform: scale(1); } }
/* 샤봇 얼굴 · 표정 */
.ax-bot { position: relative; display: inline-block; width: 60px; flex: none; line-height: 0; }
.ax-bot svg { width: 100%; height: auto; overflow: visible; animation: ax-bob 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes ax-bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-4%) rotate(2deg); } }
.ax-bot .ax-m, .ax-bot .ax-brow, .ax-bot .ax-joy { display: none; }
.ax-bot[data-mood="idle"] .ax-m-idle, .ax-bot[data-mood="happy"] .ax-m-happy, .ax-bot[data-mood="sad"] .ax-m-sad, .ax-bot[data-mood="wow"] .ax-m-wow, .ax-bot[data-mood="think"] .ax-m-think { display: inline; }
.ax-bot[data-mood="sad"] .ax-brow-sad, .ax-bot[data-mood="think"] .ax-brow-think { display: inline; }
.ax-bot[data-mood="happy"] .ax-eyes { display: none; }
.ax-bot[data-mood="happy"] .ax-joy { display: inline; }
.ax-bot[data-mood="happy"] svg { animation: ax-hop 0.5s ease-in-out infinite; }
.ax-bot[data-mood="sad"] svg { animation: ax-sad 2.4s ease-in-out infinite; }
.ax-bot[data-mood="wow"] svg { animation: ax-wow 0.4s ease-out; }
.ax-bot[data-mood="sad"] .ax-eyes { transform: translateY(3px); }
.ax-bot .ax-eyes { transform-box: fill-box; transform-origin: center; animation: ax-blink 4.2s infinite; }
.ax-bot[data-mood="think"] .ax-eyes { animation: ax-look 1.6s ease-in-out infinite; }
@keyframes ax-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes ax-look { 0%, 100% { transform: translate(-4px, -2px); } 50% { transform: translate(4px, -2px); } }
@keyframes ax-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10%) rotate(3deg); } }
@keyframes ax-sad { 0%, 100% { transform: translateY(3%) rotate(-3deg); } 50% { transform: translateY(5%) rotate(-5deg); } }
@keyframes ax-wow { 0% { transform: scale(1); } 40% { transform: scale(1.15); } 100% { transform: scale(1); } }
.ax-bot .ax-ant { animation: ax-ant 1.8s ease-in-out infinite; }
.ax-bot[data-mood="think"] .ax-ant { fill: #ffd65e; animation: ax-antb 0.5s ease-in-out infinite alternate; }
@keyframes ax-ant { 0%, 100% { opacity: 1; } 50% { opacity: 0.75; } }
@keyframes ax-antb { from { fill: #ffd65e; } to { fill: #fff6cf; } }
.ax-bubble { position: absolute; right: -16%; top: -18%; display: none; gap: 3px; padding: 5px 7px; border-radius: 12px; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); line-height: 0; }
.ax-bubble b { width: 6px; height: 6px; border-radius: 50%; background: #4b55e0; animation: ax-dot 1s ease-in-out infinite; }
.ax-bubble b:nth-child(2) { animation-delay: 0.15s; }
.ax-bubble b:nth-child(3) { animation-delay: 0.3s; }
.ax-bot[data-mood="think"] .ax-bubble { display: flex; }
@keyframes ax-dot { 0%, 100% { transform: translateY(0); opacity: 0.4; } 40% { transform: translateY(-4px); opacity: 1; } }
/* 처음 하는 사람 안내 손가락 */
.ax-hand { position: absolute; left: 0; top: 0; z-index: 6000; width: 52px; pointer-events: none; transform: translate(var(--ax0), var(--ay0)); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45)); }
.ax-hand svg { display: block; width: 52px; margin: -2px 0 0 -21px; transform-origin: 40% 10%; }
.ax-hand.tap svg { animation: ax-tap 1.1s ease-in-out infinite; }
.ax-hand.drag { animation: ax-drag 2.2s cubic-bezier(.5, 0, .3, 1) infinite; }
.ax-hand.drag svg { animation: ax-press 2.2s ease-in-out infinite; }
.ax-hand-dot { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; opacity: 0; animation: ax-ripple 1.1s ease-out infinite; }
.ax-hand.drag .ax-hand-dot { animation-duration: 2.2s; }
@keyframes ax-tap { 0%, 100% { transform: translate(6px, 10px) scale(1); } 45% { transform: translate(0, 0) scale(0.9); } }
@keyframes ax-ripple { 0%, 40% { transform: scale(0.3); opacity: 0; } 45% { opacity: 0.9; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes ax-drag { 0%, 12% { transform: translate(var(--ax0), var(--ay0)); opacity: 0; } 18% { opacity: 1; } 30% { transform: translate(var(--ax0), var(--ay0)); } 75% { transform: translate(var(--ax1), var(--ay1)); opacity: 1; } 92%, 100% { transform: translate(var(--ax1), var(--ay1)); opacity: 0; } }
@keyframes ax-press { 0%, 20% { transform: translate(6px, 10px); } 30%, 75% { transform: scale(0.9); } 85%, 100% { transform: translate(6px, 10px); } }
@media (max-width: 760px) {
  .ax-ov .panel.ax-card { grid-template-columns: 1fr; gap: 10px; width: min(440px, 100%); align-content: start; }
  .ax-pic { height: 120px; }
  .ax-pic .ax-bot { width: 96px; }
  .ax-ov .ax-logo { font-size: clamp(40px, 12vw, 56px); }
  .ax-ov .ax-tag { font-size: 13.5px; }
  .big-btn.ax-play { font-size: 26px; padding: 13px 12px 15px; }
}
@media (max-height: 700px) and (min-width: 761px) { .ax-pic { height: 130px; } .ax-pic .ax-bot { width: 100px; } .ax-ov .ax-logo { font-size: 54px; } }
@media (prefers-reduced-motion: reduce) { .ax-logo, .big-btn.ax-play, .big-btn.ax-play::after, .ax-bot svg { animation: none !important; } }
/* ==/AX== */
/* ── 오목: 달밤의 먹빛 정원 · 비자나무 바둑판 ── */
.stage { --ax-bg1: #34405e; --ax-bg2: #07090f; --ax-acc: #ff7a5c; --ax-glow: rgba(255, 110, 80, 0.4); --ax-l1: #ffffff; --ax-l2: #f5e6c8; --ax-l3: #d9a35a; --ax-ink: #1a0f05;
  --ax-p1: #ff7a5c; --ax-p2: #d9322a; --ax-p3: #861812; --ax-s1: #c9904a; --ax-s2: #8a5a26;
  padding: 8px; overscroll-behavior: none;
  background: radial-gradient(60% 50% at 88% 8%, rgba(255, 236, 170, 0.14), transparent 70%), linear-gradient(180deg, #2a3350 0%, #161b2c 55%, #0a0c14 100%); }
.stage::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 55%, rgba(200, 210, 230, 0.06) 70%, transparent 85%); animation: gm-mist 14s ease-in-out infinite alternate; }
@keyframes gm-mist { to { transform: translateY(-40px); opacity: 0.6; } }
.gm { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.gm-side { display: contents; }
.gm-info { order: 0; width: var(--bw, 340px); max-width: 100%; display: flex; flex-direction: column; gap: 6px; }
.gm-board { order: 1; line-height: 0; position: relative; }
.gm-ctrl { order: 2; width: var(--bw, 340px); max-width: 100%; display: flex; gap: 8px; }
.gm-board { padding: 9px; border-radius: 18px; background: linear-gradient(160deg, #6b4423, #3d230f); box-shadow: 0 3px 0 #8a5a2e inset, 0 8px 0 #24140a, 0 26px 44px rgba(0, 0, 0, 0.6); }
.gm-board canvas { display: block; border-radius: 8px; touch-action: none; cursor: pointer; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4); }

/* 차례 표시 */
.gm-chips { display: flex; gap: 8px; }
.gm-chip { position: relative; flex: 1; min-width: 0; color: #fff; display: flex; align-items: center; gap: 9px; padding: 6px 10px 6px 8px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)); border: 2px solid rgba(255, 255, 255, 0.12); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2); transition: border-color 0.2s, box-shadow 0.2s; }
.gm-av { position: relative; flex: none; display: grid; place-items: center; }
.gm-av .ax-bot { display: none; width: 46px; }
.gm-chip.is-bot .gm-av .ax-bot { display: block; }
.gm-chip.is-bot .gm-av .gm-st { position: absolute; right: -5px; bottom: -3px; width: 19px; height: 19px; z-index: 2; }
.gm-chip span { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.gm-chip b { font-family: 'Black Han Sans', var(--title); font-weight: 400; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-chip small { font-size: 11px; color: #c9c3b6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-chip.on { border-color: #ff7a5c; background: linear-gradient(180deg, rgba(255, 122, 92, 0.22), rgba(90, 20, 10, 0.2)); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 0 22px rgba(255, 122, 92, 0.4); }
.gm-chip.on::after { content: ''; position: absolute; left: 50%; top: -9px; width: 12px; height: 12px; margin-left: -6px; background: #ff7a5c; clip-path: polygon(0 0, 100% 0, 50% 100%); animation: gm-turn 0.8s ease-in-out infinite alternate; }
@keyframes gm-turn { to { transform: translateY(3px); } }
.gm-chip.won { border-color: #ffd23f; background: rgba(255, 210, 63, 0.18); box-shadow: 0 0 24px rgba(255, 210, 63, 0.5); }
.gm-chip-w { flex-direction: row-reverse; text-align: right; }
.gm-chip-w span { align-items: flex-end; }
.gm-st { flex: none; position: relative; display: inline-block; width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.35), inset 0 0 0 3px rgba(255, 255, 255, 0.2); }
.gm-st.b { background: radial-gradient(circle at 34% 30%, #7a7f9a 0%, #2a2d40 36%, #08090f 100%); }
.gm-st.w { background: radial-gradient(circle at 34% 30%, #ffffff 0%, #f1efe8 55%, #bdb8a8 100%); }
.gm-status { text-align: center; font-weight: 800; font-size: 15px; color: #f4efe6; min-height: 21px; text-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); }
.gm-status.think::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: gm-dots 1s steps(4) infinite; }
@keyframes gm-dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

/* 넓은 화면: 판 오른쪽에 정보 · 단추 */
.gm.wide { flex-direction: row; gap: 26px; }
.gm.wide .gm-side { display: flex; order: 2; flex-direction: column; gap: 16px; width: 236px; }
.gm.wide .gm-info, .gm.wide .gm-ctrl { width: 100%; }
.gm.wide .gm-chips { flex-direction: column; gap: 14px; }
.gm.wide .gm-chip-w { flex-direction: row; text-align: left; }
.gm.wide .gm-chip-w span { align-items: flex-start; }
.gm.wide .gm-chip { padding: 10px 12px 10px 10px; }
.gm.wide .gm-chip b { font-size: 22px; }
.gm.wide .gm-st { width: 34px; height: 34px; }
.gm.wide .gm-chip.is-bot .gm-av .gm-st { width: 20px; height: 20px; }
.gm.wide .gm-av .ax-bot { width: 54px; }
.gm.wide .gm-chip.on::after { left: -10px; top: 50%; margin: -6px 0 0; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.gm.wide .gm-status { font-size: 17px; padding: 9px 4px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35); }
.gm.wide .gm-ctrl { flex-direction: column; }
.gm.wide .ax-btn { padding: 12px; font-size: 16px; justify-content: flex-start; padding-left: 14px; }

/* 넓지만 낮은 화면(폰 가로) */
.gm.short { gap: 16px; }
.gm.short .gm-side { width: 214px; gap: 8px; }
.gm.short .gm-chips { gap: 8px; }
.gm.short .gm-chip { padding: 4px 10px 4px 8px; }
.gm.short .gm-chip b { font-size: 17px; }
.gm.short .gm-st { width: 24px; height: 24px; }
.gm.short .gm-av .ax-bot { width: 40px; }
.gm.short .gm-status { font-size: 14px; padding: 4px; }
.gm.short .gm-ctrl { flex-direction: row; gap: 6px; }
.gm.short .ax-btn { flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 12px; justify-content: center; }

/* 제목 화면: 달 · 안개 · 대나무 · 떠다니는 돌 · 기울어진 바둑판 */
.gm-moon { position: absolute; right: 9%; top: 8%; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle at 40% 38%, #fffaf0, #f3e7c8 60%, #d8c79c); box-shadow: 0 0 60px rgba(255, 240, 200, 0.5), 0 0 160px rgba(255, 240, 200, 0.25); opacity: 0.9; }
.gm-mist { position: absolute; left: -20%; width: 140%; height: 120px; background: radial-gradient(ellipse at center, rgba(220, 230, 250, 0.16), transparent 70%); animation: gm-drift var(--d, 18s) ease-in-out infinite alternate; }
@keyframes gm-drift { from { transform: translateX(-8%); } to { transform: translateX(8%); } }
.gm-bam { position: absolute; bottom: -10px; width: 14px; border-radius: 7px; background: repeating-linear-gradient(180deg, #1f3a2a 0 70px, #0f2418 70px 76px); opacity: 0.75; transform-origin: bottom; animation: gm-sway var(--d, 6s) ease-in-out infinite alternate; }
@keyframes gm-sway { from { transform: rotate(-1.5deg); } to { transform: rotate(1.5deg); } }
.gm-table { position: absolute; left: 50%; bottom: -55%; width: 120vmin; height: 120vmin; margin-left: -60vmin; transform: perspective(900px) rotateX(64deg) rotateZ(-15deg); opacity: 0.55;
  background: linear-gradient(rgba(60, 30, 5, 0.7) 2px, transparent 2px) 0 0 / 7.14% 7.14%, linear-gradient(90deg, rgba(60, 30, 5, 0.7) 2px, transparent 2px) 0 0 / 7.14% 7.14%, linear-gradient(135deg, #f0c57e, #cf914a);
  box-shadow: 0 0 0 3vmin #3d230f, 0 0 80px rgba(0, 0, 0, 0.8); }
.gm-fl { position: absolute; border-radius: 50%; animation: gm-float var(--d, 8s) ease-in-out infinite alternate; filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.5)); }
.gm-fl.b { background: radial-gradient(circle at 34% 30%, #7a7f9a 0%, #2a2d40 36%, #08090f 100%); }
.gm-fl.w { background: radial-gradient(circle at 34% 30%, #ffffff 0%, #f1efe8 55%, #bdb8a8 100%); }
@keyframes gm-float { from { transform: translateY(0) scaleY(0.9); } to { transform: translateY(-30px) scaleY(0.9); } }
.gm-pic .gm-mini { position: absolute; left: 50%; bottom: 6px; width: 210px; height: 120px; margin-left: -105px; border-radius: 14px; transform: perspective(500px) rotateX(38deg);
  background: linear-gradient(rgba(60, 30, 5, 0.75) 1.5px, transparent 1.5px) 7px 7px / 26px 26px, linear-gradient(90deg, rgba(60, 30, 5, 0.75) 1.5px, transparent 1.5px) 7px 7px / 26px 26px, linear-gradient(135deg, #f3c983, #cf914a);
  box-shadow: 0 10px 0 #6b4423, 0 22px 30px rgba(0, 0, 0, 0.5); }
.gm-mini i { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; box-shadow: 0 3px 3px rgba(0, 0, 0, 0.45); }
.gm-mini i.b { background: radial-gradient(circle at 34% 30%, #7a7f9a 0%, #2a2d40 36%, #08090f 100%); }
.gm-mini i.w { background: radial-gradient(circle at 34% 30%, #ffffff 0%, #f1efe8 55%, #bdb8a8 100%); }
.gm-mini i.pop { animation: gm-pop 2.6s ease-in-out infinite; }
@keyframes gm-pop { 0%, 30% { transform: scale(0); } 40% { transform: scale(1.3); } 48%, 90% { transform: scale(1); } 100% { transform: scale(0); } }
.gm-pic .ax-bot { left: 50%; bottom: 74px; width: 100px; z-index: 2; }
.gm-seal { position: absolute; right: calc(50% - 150px); top: 6px; width: 40px; height: 40px; border-radius: 8px; background: #d9322a; box-shadow: inset 0 0 0 3px #f9d9c9, 0 4px 8px rgba(0, 0, 0, 0.4); transform: rotate(8deg); }
.gm-seal::after { content: ''; position: absolute; inset: 10px; border-radius: 50%; border: 3px solid #f9d9c9; }

/* 시작 · 끝 화면 세부 */
.gm-ai[hidden] { display: none; }
.gm-mini { width: 16px; height: 16px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }

@media (max-width: 760px) {
  .gm-pic .gm-mini { transform: perspective(500px) rotateX(38deg) scale(0.8); transform-origin: bottom center; }
  .gm-pic .ax-bot { width: 80px; bottom: 56px; }
  .gm-moon { width: 90px; height: 90px; }
}
@media (max-width: 380px) {
  .ax-btn { font-size: 13px; gap: 4px; }
  .gm-chip b { font-size: 17px; }
}
.gm-mini-st { width: 16px; height: 16px; }
.ai-only[hidden] { display: none; }
.gm-av { position: relative; flex: none; display: grid; place-items: center; }
.gm-av .ax-bot { display: none; width: 46px; }
.gm-chip.is-bot .gm-av .ax-bot { display: block; }
.gm-chip.is-bot .gm-av .gm-st { position: absolute; right: -5px; bottom: -3px; width: 19px; height: 19px; z-index: 2; }
.gm.wide .gm-av .ax-bot { width: 54px; }
.gm.wide .gm-chip.is-bot .gm-av .gm-st { width: 20px; height: 20px; }
/* 플레이 화면 뒤 무대 (판 · 칸 뒤): 달 · 별빛 · 대나무 그림자 · 안개 */
.gm-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.gm { z-index: 1; }
.gm-moon2 { position: absolute; right: 3.5%; top: 4%; width: 86px; height: 86px; border-radius: 50%;
  background: radial-gradient(circle at 30% 34%, rgba(205, 180, 120, 0.55) 0 7px, transparent 8px), radial-gradient(circle at 62% 58%, rgba(205, 180, 120, 0.5) 0 11px, transparent 12px),
    radial-gradient(circle at 66% 26%, rgba(205, 180, 120, 0.4) 0 4px, transparent 5px), radial-gradient(circle at 34% 70%, rgba(205, 180, 120, 0.35) 0 5px, transparent 6px),
    radial-gradient(circle at 38% 36%, #fffbe6 0%, #ffeeb0 55%, #f2d27e 100%);
  box-shadow: inset -10px -8px 18px rgba(170, 120, 40, 0.35), 0 0 30px 8px rgba(255, 230, 150, 0.45), 0 0 110px 40px rgba(255, 220, 130, 0.18); animation: gm-glow 6s ease-in-out infinite alternate; }
@keyframes gm-glow { to { box-shadow: inset -10px -8px 18px rgba(170, 120, 40, 0.35), 0 0 38px 12px rgba(255, 230, 150, 0.55), 0 0 140px 54px rgba(255, 220, 130, 0.22); } }
.gm-stars { position: absolute; inset: 0 0 45% 0; opacity: 0.7; animation: gm-twinkle 3.2s ease-in-out infinite alternate;
  background: radial-gradient(circle, #fff 0 1px, transparent 1.6px) 0 0 / 97px 83px, radial-gradient(circle, rgba(255, 245, 210, 0.9) 0 1.2px, transparent 2px) 41px 29px / 151px 127px; }
.gm-stars2 { opacity: 0.45; animation-delay: -1.6s; background: radial-gradient(circle, #fff 0 0.8px, transparent 1.4px) 23px 51px / 61px 71px; }
@keyframes gm-twinkle { from { opacity: 0.25; } to { opacity: 0.8; } }
.gm-bam2 { position: absolute; bottom: -10px; width: 16px; border-radius: 8px; transform-origin: bottom; animation: gm-sway var(--d, 6s) ease-in-out infinite alternate;
  background: repeating-linear-gradient(180deg, #1b3326 0 66px, #0c1d14 66px 72px); box-shadow: 0 0 18px rgba(0, 0, 0, 0.4); }
.gm-bam2 b { position: absolute; width: 46px; height: 12px; border-radius: 0 100% 0 100%; background: #16301f; }
.gm-bam2 b:nth-child(1) { top: 18%; left: 10px; transform: rotate(-24deg); }
.gm-bam2 b:nth-child(2) { top: 36%; right: 10px; transform: rotate(204deg); }
.gm-fog { position: absolute; left: -30%; width: 160%; height: 140px; background: radial-gradient(ellipse at center, rgba(210, 222, 245, 0.16), transparent 68%); animation: gm-drift var(--d, 20s) ease-in-out infinite alternate; }
@media (max-width: 760px) {
  .gm-moon2 { width: 58px; height: 58px; right: 5%; top: 2%; }
  .gm-bam2 { width: 11px; }
  .gm-bam2 b { width: 30px; height: 8px; }
}
