/* 샤봇 솔리테어 — 짙은 초록 펠트 탁자 + 사이트 색(보라 · 해 · 민트 · 산호) */
/* ==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: #2462b8; --ax-bg2: #040b1d; --ax-acc: #ffd23f; --ax-glow: rgba(255, 210, 63, 0.4); --ax-l1: #ffffff; --ax-l2: #ffe9a8; --ax-l3: #f0b43c; --ax-ink: #0b1a3d;
  --ax-p1: #6ff5cf; --ax-p2: #17b386; --ax-p3: #0a6a50; --ax-s1: #3f7bff; --ax-s2: #2148b8;
  background: radial-gradient(70% 50% at 50% 0%, rgba(140, 190, 255, 0.22), transparent 70%), radial-gradient(circle, rgba(255, 255, 255, 0.03) 0 1px, transparent 1.5px) 0 0 / 4px 4px,
    radial-gradient(140% 100% at 50% 35%, #1f5bab 0%, #133f80 45%, #0a2652 80%, #061636 100%); }
.stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0; background: radial-gradient(100% 80% at 50% 45%, transparent 55%, rgba(0, 0, 20, 0.55) 100%); }
.sol-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sol { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; }
.sol-top { flex: none; display: flex; justify-content: center; padding: 8px 8px 2px; }
.sol-board { flex: 1; min-height: 0; position: relative; overflow: hidden; touch-action: none; }

/* 위 알약 점수판: 아이콘 + 숫자 */
.sol-hud { display: flex; gap: 8px; }
.sol-hud > div { position: relative; display: flex; align-items: center; gap: 7px; min-width: 92px; padding: 3px 14px 3px 4px; border-radius: 999px; color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(0, 0, 0, 0.18)); border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 3px 0 rgba(0, 0, 20, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15); }
.sol-hud i { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-style: normal; font-size: 15px; line-height: 1; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.sol-hud .h-time i { background: linear-gradient(180deg, #9ad0ff, #3f7bff); }
.sol-hud .h-moves i { background: linear-gradient(180deg, #ffd0a0, #ff8a4c); }
.sol-hud .h-score i { background: linear-gradient(180deg, #fff1a6, #ffc21f); }
.sol-hud b { display: inline-block; font-family: 'Black Han Sans', var(--title); font-weight: 400; font-size: 21px; line-height: 1.2; font-variant-numeric: tabular-nums; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); }

/* 아래 단추 줄 */
.sol-bar { flex: none; display: flex; gap: 8px; justify-content: center; padding: 6px 10px calc(10px + env(safe-area-inset-bottom)); }
.sol-bar .ax-btn { flex: 1 1 0; max-width: 170px; height: 44px; padding: 0 8px; font-size: 15px; }
.sol-bar .ax-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sol-bar .b-hint i { background: #ffe066; }
.sol-bar .b-undo i { background: #6ff5cf; }

/* 빈칸: 금테 자리 */
.sl { position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch); border-radius: calc(var(--cw) * 0.1); z-index: 1;
  background: rgba(0, 10, 40, 0.28); box-shadow: inset 0 0 0 2px rgba(255, 220, 140, 0.22), inset 0 4px 10px rgba(0, 0, 0, 0.3); display: grid; place-items: center; }
.sl span { font-family: 'Black Han Sans', var(--title); font-size: calc(var(--rf) * 1.6); color: rgba(255, 230, 160, 0.2); line-height: 1; }
.sl-s { cursor: pointer; }
.sl-s span { opacity: 0; font-family: var(--font); font-weight: 800; font-size: calc(var(--cw) * 0.55); color: #6ff5cf; transition: opacity 0.2s; }
.sl-s.can-recycle span { opacity: 0.9; }
.sl-f span { color: rgba(255, 210, 63, 0.35); }
.sl.hint { box-shadow: inset 0 0 0 3px #ffd23f, 0 0 18px 4px rgba(255, 210, 63, 0.55); }
.sl.drop-ok { box-shadow: inset 0 0 0 3px #6ff5cf, 0 0 16px 3px rgba(111, 245, 207, 0.55); }
.sl.ax-land { animation: sol-land 0.5s ease-out; }
@keyframes sol-land { 30% { box-shadow: inset 0 0 0 3px #ffd23f, 0 0 26px 8px rgba(255, 210, 63, 0.7); } }

/* 카드 */
.sc { position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch); z-index: 10; cursor: pointer;
  transition: transform 0.26s cubic-bezier(0.2, 0.9, 0.25, 1.12); will-change: transform; }
.noanim .sc { transition: none !important; }
.sc.dragging { transition: none; cursor: grabbing; }
.sc .sc-in { position: relative; width: 100%; height: 100%; border-radius: calc(var(--cw) * 0.1); transform-origin: 50% 50%;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 0 3px 8px rgba(0, 0, 20, 0.32); transition: transform 0.15s, box-shadow 0.15s; }
.sc.dragging .sc-in { transform: scale(1.06) rotate(-2deg); box-shadow: 0 18px 32px rgba(0, 0, 20, 0.55); }
.sc .sc-face, .sc .sc-back { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.sc.up .sc-back, .sc:not(.up) .sc-face { display: none; }
.sc.red { color: #d8293f; }
.sc.black { color: #1a1e38; }

.sc-face { background: radial-gradient(120% 80% at 30% 0%, #ffffff 0%, #fffdf7 50%, #f4eedd 100%); box-shadow: inset 0 0 0 1px rgba(28, 33, 64, 0.2), inset 0 -2px 0 rgba(120, 100, 60, 0.12); }
.sc-face::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(125deg, rgba(255, 255, 255, 0.55) 0%, transparent 30%); pointer-events: none; }
.c-r { position: absolute; left: calc(var(--cw) * 0.07); top: calc(var(--cw) * 0.045); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-weight: 900; font-size: var(--rf); line-height: 1; letter-spacing: -0.07em; }
.c-s { position: absolute; right: calc(var(--cw) * 0.07); top: calc(var(--cw) * 0.075); width: calc(var(--rf) * 0.78); height: calc(var(--rf) * 0.78); fill: currentColor; }
.c-big { position: absolute; left: 24%; width: 52%; height: calc(var(--cw) * 0.52); top: calc(60% - var(--cw) * 0.26); fill: currentColor; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.6)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.15)); }
.c-big.ace { left: 17%; width: 66%; height: calc(var(--cw) * 0.66); top: calc(60% - var(--cw) * 0.33); }
.black .c-big.ace { filter: drop-shadow(0 1px 0 rgba(123, 108, 255, 0.6)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2)); }
.c-art { position: absolute; left: 9%; right: 9%; top: calc(var(--cw) * 0.06 + var(--rf) * 1.08); bottom: 6%; border-radius: calc(var(--cw) * 0.07);
  display: grid; place-items: center; background: linear-gradient(160deg, #eceaff, #d4cfff); box-shadow: inset 0 0 0 1.5px currentColor, inset 0 0 0 3px rgba(255, 210, 63, 0.6); }
.red .c-art { background: linear-gradient(160deg, #fff0ec, #ffd6cf); }
.c-art svg { width: 86%; height: 86%; }
.c-art .c-art-s { position: absolute; right: 6%; bottom: 5%; width: 26%; height: 26%; fill: currentColor; }

/* 뒷면: 남색 · 금 무늬 + 샤봇 얼굴 */
.sc-back {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 220, 120, 0.2) 0 26%, transparent 27%),
    repeating-linear-gradient(45deg, rgba(255, 214, 120, 0.12) 0 3px, transparent 3px 8px),
    repeating-linear-gradient(-45deg, rgba(255, 214, 120, 0.12) 0 3px, transparent 3px 8px),
    linear-gradient(160deg, #3b4fd6, #1e2a8a);
  box-shadow: inset 0 0 0 calc(var(--cw) * 0.045) #fff8e6, inset 0 0 0 calc(var(--cw) * 0.07) #e8b33c;
}
.sc-back::before { content: ''; position: absolute; inset: 0; background: linear-gradient(125deg, rgba(255, 255, 255, 0.28) 0%, transparent 35%); }
.sc-back::after { content: ''; position: absolute; left: 18%; right: 18%; top: 50%; aspect-ratio: 1; transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cline x1='50' y1='9' x2='50' y2='26' stroke='%23ffd23f' stroke-width='6' stroke-linecap='round'/%3E%3Ccircle cx='50' cy='9' r='8' fill='%23ffd23f'/%3E%3Crect x='13' y='26' width='74' height='60' rx='21' fill='%234f8bff' stroke='%23fff' stroke-width='6'/%3E%3Crect x='25' y='40' width='50' height='28' rx='13' fill='%231c2140'/%3E%3Ccircle cx='40' cy='54' r='7' fill='%233ee0b5'/%3E%3Ccircle cx='60' cy='54' r='7' fill='%233ee0b5'/%3E%3C/svg%3E") center / contain no-repeat; }

/* 움직임: 3D 뒤집기 · 안 됨 흔들기 · 힌트 빛 */
.sc.flip .sc-in { animation: sol-flip 0.42s cubic-bezier(0.3, 1.4, 0.5, 1); }
@keyframes sol-flip { 0% { transform: perspective(520px) rotateY(95deg) scale(1.1); } 55% { transform: perspective(520px) rotateY(-12deg) scale(1.08); } 100% { transform: perspective(520px) rotateY(0) scale(1); } }
.sc.nope .sc-in { animation: sol-nope 0.32s; }
@keyframes sol-nope { 20% { transform: translateX(-5px) rotate(-2deg); } 45% { transform: translateX(5px) rotate(2deg); } 70% { transform: translateX(-3px); } }
.sc.ax-pop .sc-in { animation: sol-pop 0.36s cubic-bezier(0.3, 1.8, 0.5, 1); }
@keyframes sol-pop { 0% { transform: scale(1.18); } 100% { transform: scale(1); } }
.sc.hint .sc-in { box-shadow: 0 0 0 3px #ffd23f, 0 0 18px 4px rgba(255, 210, 63, 0.7); animation: sol-glow 0.8s ease-in-out infinite alternate; }
@keyframes sol-glow { to { box-shadow: 0 0 0 3px #ffd23f, 0 0 6px 1px rgba(255, 210, 63, 0.4); } }
.sc.drop-ok .sc-in { box-shadow: 0 0 0 3px #6ff5cf, 0 0 14px 2px rgba(111, 245, 207, 0.6); }

/* 알림 · 자동 완성 */
.sol-toast { position: absolute; left: 50%; bottom: 14px; z-index: 5000; width: max-content; max-width: calc(100% - 32px); transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
  padding: 8px 16px; border-radius: 999px; background: rgba(8, 16, 46, 0.94); border: 1px solid rgba(255, 210, 63, 0.4); color: #fff; font-size: 14px; font-weight: 700; text-align: center; transition: opacity 0.2s, transform 0.2s; }
.sol-toast.on { opacity: 1; transform: translate(-50%, 0); }
.sol-auto { position: absolute; left: 50%; bottom: 16px; z-index: 5001; transform: translateX(-50%); border: 0; border-radius: 999px; padding: 12px 26px;
  background: linear-gradient(180deg, #fff1a6, #ffc21f); color: #3a2400; font-family: 'Black Han Sans', var(--title); font-size: 19px; white-space: nowrap; cursor: pointer;
  box-shadow: 0 5px 0 #b37a00, 0 10px 24px rgba(0, 0, 0, 0.45); animation: sol-pulse 1.1s ease-in-out infinite alternate; }
.sol-auto[hidden] { display: none; }
@keyframes sol-pulse { to { transform: translateX(-50%) scale(1.07); box-shadow: 0 5px 0 #b37a00, 0 10px 30px rgba(255, 210, 63, 0.6); } }

/* 이긴 뒤 카드 튕기기 */
.sol-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 9; pointer-events: none; }
.overlay.ax-ov.ov-win { background: radial-gradient(70% 60% at 50% 40%, rgba(10, 20, 60, 0.55), rgba(4, 8, 24, 0.35)); backdrop-filter: none; }

/* 제목 화면: 부채꼴 카드 · 떠다니는 카드 */
.sol-fl { position: absolute; width: 70px; height: 98px; border-radius: 8px; animation: sol-float var(--d, 8s) ease-in-out infinite alternate; opacity: 0.85; box-shadow: 0 16px 24px rgba(0, 0, 0, 0.4); }
.sol-fl.bk { background: repeating-linear-gradient(45deg, rgba(255, 214, 120, 0.14) 0 3px, transparent 3px 8px), linear-gradient(160deg, #3b4fd6, #1e2a8a); box-shadow: inset 0 0 0 4px #fff8e6, inset 0 0 0 6px #e8b33c, 0 16px 24px rgba(0, 0, 0, 0.4); }
.sol-fl.fc { background: linear-gradient(180deg, #fff, #f4eedd); display: grid; place-items: center; font: 900 34px system-ui, sans-serif; }
.sol-fl.fc.r { color: #d8293f; } .sol-fl.fc.b { color: #1a1e38; }
@keyframes sol-float { from { transform: translateY(0) rotate(var(--r, 0deg)); } to { transform: translateY(-30px) rotate(calc(var(--r, 0deg) + 14deg)); } }
.sol-pic .sol-fan { position: absolute; left: 50%; bottom: 0; width: 0; height: 0; }
.sol-fan i { position: absolute; left: -36px; bottom: 0; width: 72px; height: 100px; border-radius: 9px; transform-origin: 50% 130%; background: linear-gradient(180deg, #fff, #f4eedd);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15), 0 8px 14px rgba(0, 0, 0, 0.4); display: grid; place-items: start; padding: 6px 8px; font: 900 22px/1 system-ui, sans-serif; animation: sol-fan 3.4s ease-in-out infinite alternate; }
.sol-fan i.r { color: #d8293f; } .sol-fan i.b { color: #1a1e38; }
@keyframes sol-fan { from { transform: rotate(calc(var(--a) * 0.6)); } to { transform: rotate(var(--a)) translateY(-6px); } }
.sol-pic .ax-bot { left: 50%; bottom: 96px; width: 92px; z-index: 3; }

/* 시작 · 끝 화면 세부 */
.sol-panel .sol-label { margin: 0 4px 4px !important; }
.sol-tip { margin: 10px 0 0 !important; font-size: 12.5px; text-align: center; color: rgba(255, 255, 255, 0.55) !important; }
.e-bonus { margin: 2px 0 4px !important; color: #6ff5cf !important; font-weight: 800; font-size: 14px; }
.ax-ov .sol-small { margin-top: 8px; padding: 9px; font-size: 13px; }
.ov-win .ax-pills b { font-size: 22px; }

@media (max-width: 560px) {
  .sol-top { padding-top: 6px; }
  .sol-hud { width: 100%; max-width: 380px; gap: 6px; }
  .sol-hud > div { min-width: 0; flex: 1 1 0; padding-right: 8px; gap: 5px; }
  .sol-hud i { width: 24px; height: 24px; font-size: 13px; }
  .sol-hud b { font-size: 18px; }
  .sol-bar { gap: 6px; padding-left: 6px; padding-right: 6px; }
  .sol-bar .ax-btn { font-size: 13px; height: 42px; gap: 4px; }
}
@media (max-width: 760px) {
  .sol-fan i { width: 58px; height: 80px; left: -29px; font-size: 18px; }
  .sol-pic .ax-bot { width: 74px; bottom: 74px; }
}
@media (prefers-reduced-motion: reduce) {
  .sc { transition-duration: 0.05s; }
  .sc.hint .sc-in, .sol-auto { animation: none; }
}
/* 낮은 화면(폰 가로) — 점수판 · 단추를 얇게 */
@media (max-height: 520px) {
  .sol-top { padding: 3px 8px 0; }
  .sol-hud i { width: 20px; height: 20px; font-size: 11px; }
  .sol-hud b { font-size: 16px; }
  .sol-bar { padding-top: 4px; padding-bottom: calc(4px + env(safe-area-inset-bottom)); }
  .sol-bar .ax-btn { height: 34px; font-size: 13px; }
}
