* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #0d4a52 url("../Resource/background/table_felt.jpg") center / cover no-repeat;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: #fff; user-select: none; -webkit-user-select: none; touch-action: none;
}
/* 화면 안전 영역은 NcqSafe(ncq/safe.js)가 주는 --ncq-* 값만큼 비워요 */
#app { position: fixed; left: 0; top: 0; width: 100%; height: 100dvh; display: flex; flex-direction: column;
  padding: var(--ncq-top) var(--ncq-right) var(--ncq-bottom) var(--ncq-left); }

#hud { flex: 0 0 auto; height: 44px; display: flex; justify-content: center; align-items: center; gap: 28px;
  margin: 6px auto 0; padding: 0 28px; border-radius: 10px; background: rgba(0, 30, 36, .35); }
.stat { display: flex; align-items: baseline; gap: 10px; }
.stat .label { font-size: 15px; opacity: .85; }
.stat .value { font-size: 22px; font-weight: 700; min-width: 48px; font-variant-numeric: tabular-nums; }

/* overflow는 열어 둬요: 맨 윗줄 카드의 1.1배·글로우·점수 표시가 테이블 위쪽 경계에서 잘리지 않게 (화면 밖은 body가 잘라요) */
#table { position: relative; flex: 1 1 auto; overflow: visible; }

.slot { position: absolute; left: 0; top: 0; border-radius: 7%/4.6%; background: url("../Resource/cards/empty.png") center / 100% 100% no-repeat; }
.slot.stock-slot { cursor: pointer; transition: scale .14s ease-out; }
.slot.stock-slot::after { content: "↻"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 2.2em; color: rgba(255,255,255,.45); }
/* 카드를 놓을 수 있는 자리(파운데이션·빈 열): 금장식 테두리 */
.slot.found-slot, .slot.tab-slot {
  background: linear-gradient(160deg, rgba(0, 0, 0, .14), rgba(0, 0, 0, .26));
  border-radius: 7%/4.6%; border: 2px solid #d4ad55;
  box-shadow: 0 0 0 1px rgba(90, 60, 10, .55), 0 0 10px rgba(255, 210, 110, .22), inset 0 0 12px rgba(0, 0, 0, .25);
}
/* 안쪽 얇은 금선 */
.slot.found-slot::before, .slot.tab-slot::before { content: ""; position: absolute; inset: 5%; border-radius: 5%/3.3%;
  border: 1px solid rgba(232, 196, 110, .55); box-shadow: inset 0 0 0 1px rgba(80, 55, 10, .25); }
.slot.tab-slot { border-color: rgba(212, 173, 85, .6); }
.slot.tab-slot::before { border-color: rgba(232, 196, 110, .3); }
/* 파운데이션의 금빛 A */
.slot.found-slot::after { content: "A"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font: 700 2.1em Georgia, "Times New Roman", serif;
  background: linear-gradient(180deg, #fff1b5 0%, #f2cf6b 40%, #c8922f 75%, #e9c164 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 1px rgba(60, 35, 0, .55)); }

.card { position: absolute; left: 0; top: 0; background-size: 100% 100%; background-repeat: no-repeat;
  border-radius: 7%/4.6%; box-shadow: 0 1px 3px rgba(0,0,0,.35);
  transition: translate var(--move, .25s) ease-out, scale .14s ease-out, box-shadow .14s ease-out;
  will-change: translate, scale; cursor: pointer; }
.card.down { background-image: url("../Resource/cards/back.png"); cursor: default; }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: url("../Resource/cards/back.png") center / 100% 100% no-repeat; opacity: 0; transition: opacity .14s ease-out; }
.card.to-back::after { opacity: 1; }
.card.lifted { scale: 1.05;
  box-shadow: 0 0 0 2px rgba(255, 228, 130, .95), 0 0 16px 5px rgba(255, 206, 80, .7), 0 10px 22px rgba(0, 0, 0, .45); }
.card.dragging { transition: scale .14s ease-out, box-shadow .14s ease-out; } /* 끄는 동안 위치는 손가락을 바로 따라가요 */
.card.hint-src, .slot.hint-src { scale: 1.1;
  box-shadow: 0 0 0 3px rgba(255, 230, 90, .95), 0 0 22px 8px rgba(255, 210, 40, .8), 0 10px 22px rgba(0, 0, 0, .4);
  animation: hint-pulse .9s ease-in-out infinite alternate; }
@keyframes hint-pulse { to { box-shadow: 0 0 0 3px rgba(255, 240, 140, 1), 0 0 30px 12px rgba(255, 220, 60, .95), 0 10px 22px rgba(0, 0, 0, .4); } }
/* 힌트 대상 카드(원래 자리): 크기 그대로, 약한 글로우 */
/* 힌트 대상 카드(원래 자리): 테두리 밖이 아니라 카드 안쪽으로 은은한 노란 오버레이 */
.card.hint-from { box-shadow: inset 0 0 0 999px rgba(255, 226, 110, .14), inset 0 0 14px 4px rgba(255, 210, 60, .55), 0 1px 3px rgba(0, 0, 0, .35);
  animation: hint-from 1.1s ease-in-out infinite alternate; }
.card.hint-from-out { animation: hint-from-out .45s ease-out forwards; }
@keyframes hint-from-out {
  from { box-shadow: inset 0 0 0 999px rgba(255, 226, 110, .18), inset 0 0 17px 5px rgba(255, 210, 60, .62), 0 1px 3px rgba(0, 0, 0, .35); }
  to   { box-shadow: inset 0 0 0 999px rgba(255, 226, 110, 0), inset 0 0 17px 5px rgba(255, 210, 60, 0), 0 1px 3px rgba(0, 0, 0, .35); } }
.card.hint-src-out, .slot.hint-src-out { animation: hint-src-out .45s ease-out forwards; }
@keyframes hint-src-out {
  from { scale: 1.1; box-shadow: 0 0 0 3px rgba(255, 230, 90, .95), 0 0 22px 8px rgba(255, 210, 40, .8), 0 10px 22px rgba(0, 0, 0, .4); }
  to   { scale: 1; box-shadow: 0 0 0 3px rgba(255, 230, 90, 0), 0 0 22px 8px rgba(255, 210, 40, 0), 0 1px 3px rgba(0, 0, 0, .35); } }
@keyframes hint-from { to { box-shadow: inset 0 0 0 999px rgba(255, 226, 110, .22), inset 0 0 20px 7px rgba(255, 210, 60, .7), 0 1px 3px rgba(0, 0, 0, .35); } }
/* 힌트: 갈 자리로 미끄러지는 반투명 카드 */
.hint-ghost { position: absolute; left: 0; top: 0; pointer-events: none; background-size: 100% 100%; border-radius: 7%/4.6%;
  opacity: 0; } /* 크기·글로우는 js 애니메이션이 이동하면서 켜요 */
.card.no-anim { transition: none; }

.stock-count { position: absolute; padding: 1px 6px; border-radius: 6px; background: rgba(0,0,0,.55);
  font-size: 13px; font-weight: 700; pointer-events: none; z-index: 5000; }

#toolbar { flex: 0 0 auto; display: flex; justify-content: center; gap: 18px; padding: 6px 0 10px;
  transition: transform .28s cubic-bezier(.3, .7, .3, 1), opacity .28s; }
/* 바닥 탭으로 숨김: 자리는 그대로 두고 아래 화면 밖으로 미끄러져 내려가요 (카드 배치가 흔들리지 않게) */
#toolbar.tucked { transform: translateY(calc(100% + 16px + var(--ncq-bottom))); opacity: 0; pointer-events: none; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 76px; padding: 6px 10px;
  border: 0; border-radius: 14px; background: rgba(0, 30, 36, .35); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.tool .ico { font-size: 22px; line-height: 26px; }
.tool:active { transform: scale(.95); }
.tool:disabled { opacity: .4; }
.hidden { display: none !important; }

.overlay { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.5); }
.panel { min-width: 260px; padding: 28px 32px; border-radius: 18px; background: #134f58; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.panel h2 { margin: 0 0 10px; font-size: 26px; }
.panel p { margin: 0 0 20px; font-size: 16px; line-height: 1.6; opacity: .9; }
.panel button { padding: 12px 34px; border: 0; border-radius: 12px; background: #f2b33d; color: #3a2400; font-size: 17px; font-weight: 700; cursor: pointer; }

#toast { position: fixed; left: 50%; bottom: calc(90px + var(--ncq-bottom)); transform: translateX(-50%); z-index: 1500; padding: 10px 18px;
  border-radius: 10px; background: rgba(0,0,0,.7); font-size: 15px; pointer-events: none; }

@media (max-height: 500px) {
  #hud { height: 34px; margin-top: 4px; }
  .stat .value { font-size: 18px; }
  #toolbar { padding: 2px 0 4px; }
  .tool { flex-direction: row; gap: 6px; padding: 4px 10px; }
  .tool .ico { font-size: 18px; }
}

/* 점수 획득 표시 (+10, +5) */
.score-pop { position: absolute; z-index: 6000; pointer-events: none; translate: -50% -50%;
  font-weight: 900; font-family: "Arial Rounded MT Bold", "Arial Black", -apple-system, sans-serif; letter-spacing: -.5px;
  color: #fff27a; -webkit-text-stroke: 2px #d9761c; paint-order: stroke fill;
  text-shadow: 0 0 10px rgba(255, 190, 40, .9), 0 2px 3px rgba(120, 50, 0, .5);
  animation: score-pop 1s ease-out forwards; }
@keyframes score-pop {
  0%   { opacity: 0; transform: translateY(0) scale(.4); }
  18%  { opacity: 1; transform: translateY(-4px) scale(1.18); }
  32%  { transform: translateY(-6px) scale(1); }
  70%  { opacity: 1; transform: translateY(-22px) scale(1); }
  100% { opacity: 0; transform: translateY(-38px) scale(.95); }
}

/* 파운데이션 도착 반짝임 */
.found-fx { position: absolute; z-index: 5500; pointer-events: none; }
.found-fx .shine { position: absolute; inset: 0; border-radius: 7%/4.6%; overflow: hidden; }
.found-fx .shine::before { content: ""; position: absolute; top: -20%; bottom: -20%; width: 45%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.95) 45%, rgba(255,240,180,.9) 55%, transparent);
  transform: skewX(-18deg); animation: fx-shine .5s ease-out forwards; }
@keyframes fx-shine { to { left: 125%; } }
.found-fx .ring { position: absolute; inset: 0; border-radius: 7%/4.6%;
  box-shadow: 0 0 0 2px rgba(255,236,150,.95), 0 0 18px 6px rgba(255,214,90,.8);
  animation: fx-ring .7s ease-out forwards; }
@keyframes fx-ring { 0% { opacity: 0; transform: scale(.96); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.14); } }
.suit-p { position: absolute; line-height: 1; font-family: "Apple Symbols", "Segoe UI Symbol", "DejaVu Sans", serif; opacity: 0; }
.suit-p.red { color: #ff3b47; -webkit-text-stroke: 2px #fff; paint-order: stroke fill; text-shadow: 0 0 8px rgba(255,200,200,.9); }
.suit-p.black { color: #1b1b1b; -webkit-text-stroke: 2px #fff; paint-order: stroke fill; text-shadow: 0 0 8px rgba(255,236,160,.95); }
.twinkle { position: absolute; width: 14px; height: 14px; translate: -50% -50%; opacity: 0;
  background: radial-gradient(circle, #fff 0 18%, transparent 20%),
    linear-gradient(90deg, transparent 44%, #fff8d0 50%, transparent 56%),
    linear-gradient(0deg, transparent 44%, #fff8d0 50%, transparent 56%);
  filter: drop-shadow(0 0 4px #ffd75a); animation: fx-twinkle .55s ease-out forwards; }
@keyframes fx-twinkle { 0% { opacity: 0; transform: scale(.2) rotate(0); } 40% { opacity: 1; transform: scale(1.2) rotate(45deg); } 100% { opacity: 0; transform: scale(.4) rotate(90deg); } }

/* 콤보 표시 */
.combo-pop { position: absolute; z-index: 6500; pointer-events: none; translate: -50% -50%; white-space: nowrap;
  font-weight: 900; font-family: "Arial Rounded MT Bold", "Arial Black", -apple-system, sans-serif; letter-spacing: -.5px;
  color: #ffe36b; -webkit-text-stroke: 3px #b4400f; paint-order: stroke fill;
  text-shadow: 0 3px 0 #7a2508, 0 0 14px rgba(255, 170, 40, .85);
  animation: combo-pop 1.1s ease-out forwards; }
.combo-pop b { font-size: 1.15em; }
.combo-pop small { margin-left: .25em; font-size: .7em; color: #8ff0ff; -webkit-text-stroke-color: #0b5a7a; text-shadow: 0 2px 0 #06354a, 0 0 12px rgba(80, 220, 255, .8); }
.combo-pop.hot { color: #fff; -webkit-text-stroke-color: #d6192e; text-shadow: 0 3px 0 #7a0814, 0 0 18px rgba(255, 80, 60, .95); }
@keyframes combo-pop {
  0%   { opacity: 0; transform: scale(.3) rotate(-8deg); }
  16%  { opacity: 1; transform: scale(1.25) rotate(3deg); }
  28%  { transform: scale(.95) rotate(-1deg); }
  38%  { transform: scale(1) rotate(0); }
  75%  { opacity: 1; transform: translateY(-8px) scale(1); }
  100% { opacity: 0; transform: translateY(-24px) scale(1.05); }
}

/* ---------- 게임 메뉴 (새로운 딜 / 리플레이) ---------- */
#btn-new .ico i { font-style: normal; }
#btn-new .close { display: none; color: #7ed321; font-weight: 900; }
#btn-new.open { position: relative; z-index: 4100; background: rgba(4, 16, 20, .85); }
#btn-new.open .plus { display: none; }
#btn-new.open .close { display: inline; }

#game-menu { position: fixed; inset: 0; z-index: 4000;
  background: radial-gradient(ellipse 70% 80% at var(--ax) 100%, rgba(4, 18, 24, .92), rgba(4, 18, 24, .55) 60%, rgba(4, 18, 24, .25));
  animation: menu-fade .2s ease-out; }
@keyframes menu-fade { from { opacity: 0; } }
.menu-item { position: absolute; left: calc(var(--ax) - 32px); top: calc(var(--ay) - 84px - var(--i) * 88px);
  display: flex; align-items: center; gap: 18px; padding: 0; border: 0; background: none; cursor: pointer;
  color: #e9f98c; animation: menu-rise .26s cubic-bezier(.2, 1.4, .4, 1) calc(var(--i) * 50ms) both; }
@keyframes menu-rise { from { opacity: 0; transform: translateY(40px) scale(.6); } }
.menu-ico { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #3fae47, #1f7a2c 70%); box-shadow: 0 4px 0 #134f1c, 0 8px 18px rgba(0, 0, 0, .45); }
.menu-ico svg { width: 38px; height: 38px; }
.menu-label { font-size: 24px; font-weight: 800; letter-spacing: -.3px; text-shadow: 0 2px 4px rgba(0, 0, 0, .6); white-space: nowrap; }
.menu-item:active .menu-ico { transform: translateY(3px); box-shadow: 0 1px 0 #134f1c, 0 4px 10px rgba(0, 0, 0, .45); }
@media (max-height: 500px) {
  .menu-item { top: calc(var(--ay) - 64px - var(--i) * 66px); }
  .menu-ico { width: 52px; height: 52px; } .menu-ico svg { width: 30px; height: 30px; } .menu-label { font-size: 20px; }
}

/* 테스트용 치트 버튼: 일반 버튼과 구분되게 점선 테두리 */

/* ---------- 마법 지팡이 ---------- */
.tool.wand .ico { position: relative; display: inline-block; }
.tool.wand svg { width: 30px; height: 30px; display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.wand-badge { position: absolute; top: -8px; right: -18px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; font: 800 13px/1 -apple-system, sans-serif; color: #fff;
  background: radial-gradient(circle at 40% 30%, #3fb14a, #1d7a2a); border: 2px solid #e8c25a; box-shadow: 0 1px 3px rgba(0,0,0,.45); }
.wand-badge.ad { right: -22px; background: linear-gradient(#ffb341, #f08a12); border-color: #fff1b8; color: #fff; font-size: 11px; letter-spacing: .3px;
  animation: ad-pulse 1.4s ease-in-out infinite; }
@keyframes ad-pulse { 50% { transform: scale(1.12); } }
.card.wand-lift { scale: 1.1;
  box-shadow: 0 0 0 3px rgba(255, 228, 110, .95), 0 0 24px 9px rgba(255, 205, 50, .85), 0 14px 26px rgba(0, 0, 0, .45); }
.wand-fly { position: absolute; left: 0; top: 0; z-index: 7600; pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(255, 215, 80, .9)) drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); }
.wand-fly svg, .wand-fly img { width: 100%; height: 100%; display: block; }
.wand-ring { position: absolute; z-index: 7500; pointer-events: none; translate: -50% -50%; border-radius: 50%;
  border: 3px solid rgba(255, 236, 140, .95); box-shadow: 0 0 14px 4px rgba(255, 210, 60, .8), inset 0 0 10px rgba(255, 230, 120, .7);
  animation: wand-ring .6s ease-out forwards; }
@keyframes wand-ring { from { opacity: 1; scale: .2; } to { opacity: 0; scale: 2.4; } }
.wand-star { position: absolute; line-height: 1; color: #ffe27a; text-shadow: 0 0 8px #ffcf40, 0 0 14px rgba(255, 200, 60, .8); opacity: 0; }
.wand-panel { max-width: 340px; }
.wand-panel p { font-size: 15px; }
.wand-panel #wand-ad-watch { display: inline-flex; align-items: center; gap: 8px; }
.wand-panel .ad-tag { padding: 2px 6px; border-radius: 5px; background: #3a2400; color: #ffd257; font-size: 12px; font-weight: 900; }
.wand-panel .link { display: block; margin: 12px auto 0; padding: 6px 12px; background: none; color: rgba(255,255,255,.7); font-size: 15px; font-weight: 600; }
.ad-test { position: fixed; inset: 0; z-index: 6000; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.92); }
.ad-box { padding: 30px 36px; border: 2px dashed rgba(255,255,255,.35); border-radius: 14px; text-align: center; color: #fff; }
.ad-box b { font-size: 22px; } .ad-box p { opacity: .7; }
.ad-count { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.15); font-size: 22px; font-weight: 800; }
/* 좁은 세로 화면: 버튼이 5개라도 한 줄에 들어가게 */
@media (max-width: 480px) {
  #toolbar { gap: 6px; padding-left: 8px; padding-right: 8px; }
  .tool { flex: 1 1 0; min-width: 0; padding: 6px 2px; font-size: 12px; white-space: nowrap; }
  .tool .ico { font-size: 20px; }
  .tool.wand svg { width: 26px; height: 26px; }
}

/* 하단 버튼 그림 아이콘 (마법 지팡이·힌트·실행 취소) */
.tool .tool-img { width: 30px; height: 30px; display: block; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.tool:disabled .tool-img { filter: grayscale(.8) brightness(.8); }
@media (max-height: 500px) { .tool .tool-img { width: 24px; height: 24px; } }
@media (max-width: 480px) { .tool .tool-img { width: 26px; height: 26px; } }
.tool .ico { height: 30px; display: flex; align-items: center; justify-content: center; }
@media (max-height: 500px) { .tool .ico { height: 24px; } }

/* 하단 버튼 줄 전체를 120%로 (아이콘·글자·버튼·간격이 같은 비율로 커져요) */
#toolbar { zoom: 1.2; }

/* 광고 보상: 아이템이 들어오는 연출 */
.reward-fx { position: fixed; inset: 0; z-index: 6500; pointer-events: none; background: rgba(0, 12, 16, .55); animation: menu-fade .25s ease-out; transition: background .4s; }
.reward-fx.leaving { background: rgba(0, 12, 16, 0); }
.reward-rays, .reward-glow { position: absolute; left: 50%; top: 42%; translate: -50% -50%; border-radius: 50%; transition: opacity .35s; }
.reward-rays { width: min(70vmin, 520px); aspect-ratio: 1;
  background: repeating-conic-gradient(rgba(255, 220, 120, .28) 0 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 66%); mask: radial-gradient(circle, #000 18%, transparent 66%);
  animation: r-spin 9s linear infinite, reward-in .5s ease-out; }
.reward-glow { width: min(38vmin, 280px); aspect-ratio: 1; background: radial-gradient(circle, rgba(255, 226, 130, .75), rgba(255, 200, 60, 0) 68%); animation: reward-in .5s ease-out; }
@keyframes reward-in { from { opacity: 0; scale: .3; } }
.reward-item { position: absolute; left: 0; top: 0; object-fit: contain; filter: drop-shadow(0 0 14px rgba(255, 215, 80, .9)) drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.reward-text { position: absolute; left: 50%; top: calc(42% + min(16vmin, 85px) + 18px); translate: -50% 0; white-space: nowrap;
  font-size: 26px; font-weight: 800; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.6); animation: reward-text .5s ease-out .2s both; transition: opacity .3s; }
.reward-text b { color: #ffd257; font-size: 1.2em; }
@keyframes reward-text { from { opacity: 0; translate: -50% 12px; } }
.reward-fx.leaving .reward-rays, .reward-fx.leaving .reward-glow, .reward-fx.leaving .reward-text { opacity: 0; }
.reward-star { position: fixed; z-index: 6600; pointer-events: none; }

.wand-panel .wand-desc { font-size: 13px; opacity: .65; margin-top: -8px; }
.wand-panel small { opacity: .7; }
.reward-text small { display: block; font-size: .6em; font-weight: 700; color: #ffe8a8; text-align: center; margin-bottom: 2px; }

/* 막힘 안내 */
.stuck-panel { width: min(92vw, 420px); }
.stuck-panel p { word-break: keep-all; }
.stuck-panel h2 { font-size: 21px; }
.stuck-panel p { font-size: 14px; margin-bottom: 16px; }
.stuck-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.panel .stuck-btn { position: relative; white-space: nowrap; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; padding: 8px 4px; font-size: 14px;
  border: 0; border-radius: 12px; cursor: pointer; background: rgba(255,255,255,.1); color: #fff; font-size: 15px; font-weight: 700; }
.stuck-btn img { width: 28px; height: 28px; }
.stuck-btn .ico { font-size: 22px; line-height: 1; }
.panel .stuck-btn:disabled { opacity: .4; }
.panel .stuck-btn.primary { grid-column: 1 / -1; background: linear-gradient(#ffa64a, #f07a17 55%, #d9600d); box-shadow: 0 4px 0 #9b4505; font-size: 17px; }
.stuck-btn.primary .wand-badge { position: static; margin-left: 4px; }
.panel.stuck-panel .link { display: block; margin: 14px auto 0; padding: 6px 12px; border: 0; background: none; color: rgba(255,255,255,.7); font-size: 14px; font-weight: 600; cursor: pointer; }
.panel .stuck-btn.primary { flex-direction: row; min-height: 54px; gap: 8px; }

.panel .stuck-btn .stuck-ad { position: absolute; top: -7px; right: -6px; }

/* 연승 보호 */
.guard-panel .guard-cup { width: 64px; height: 64px; display: block; margin: -6px auto 4px; filter: drop-shadow(0 0 12px rgba(255, 205, 70, .9)); animation: rs-cup 1.6s ease-in-out infinite; }
.guard-panel h2 b { color: #ffd257; }
.guard-actions { grid-template-columns: 1fr; }
.panel .stuck-btn.primary.alt { background: linear-gradient(#5fcf63, #2e9a3a 55%, #1f7a2a); box-shadow: 0 4px 0 #134f1c; }
.panel.stuck-panel .link.danger { color: #ff9a8a; margin-top: 10px; }
.panel.stuck-panel #guard-back { margin-top: 2px; }
@keyframes rs-cup { 50% { transform: rotate(-8deg) scale(1.08); } }

/* 막힘 창: 지팡이·되돌리기를 크게, 리플레이·새 게임은 작게 */
.stuck-main { grid-template-columns: 1fr; gap: 12px; }
.panel .stuck-btn.hero { position: relative; overflow: hidden; min-height: 62px; font-size: 19px; }
.panel .stuck-btn.hero img { width: 36px; height: 36px; }
.panel .stuck-btn.hero::after { content: ""; position: absolute; top: 0; bottom: 0; width: 35%; left: -50%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: hero-shine 2.4s ease-in-out infinite; pointer-events: none; }
.panel .stuck-btn.hero.alt::after { animation-delay: 1.2s; }
@keyframes hero-shine { 0% { left: -50%; } 50%, 100% { left: 130%; } }
#stuck-wand.hero { animation: hero-pulse 1.4s ease-in-out infinite; }
@keyframes hero-pulse { 50% { transform: scale(1.03); box-shadow: 0 4px 0 #9b4505, 0 0 22px 6px rgba(255, 170, 60, .65); } }
.stuck-sub-actions { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.panel .stuck-mini { padding: 8px 16px; border: 1px solid rgba(255,255,255,.18); border-radius: 18px; background: rgba(0,0,0,.18);
  color: rgba(255,255,255,.75); font-size: 14px; font-weight: 600; cursor: pointer; }
.panel .stuck-mini:active { transform: scale(.96); }

/* 창·결과 화면도 가려지는 자리(상태 바·홈 인디케이터·배너) 안쪽에 버튼을 둬요 */
.overlay, .result { padding: var(--ncq-top) var(--ncq-right) var(--ncq-bottom) var(--ncq-left); }

/* 언어 (NcqLang): 언어가 정해지기 전 첫 순간에 다른 언어 글자가 비치지 않게 */
html:not([lang]) [data-i18n] { visibility: hidden; }
.pre-line { white-space: pre-line; }
