/* 공통 꾸밈 틀 'board' — 보드 · 카드(체커 · 사목 · 오목 · 리버시 · 솔리테어). game.css 보다 먼저 읽힌다(build.js). 2026-11-25 게임마다 복사돼 있던 것을 모음 */
/* ==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== */
