/* ธีมตู้คีบ: บังคับก้ามคีบ คีบแคปซูล เปิดแคปซูลเห็นรูป */
:root { --pk: #ff5ea8; --cy: #5ee7ff; --hand: "Mali", "Comic Sans MS", cursive; --px: "Press Start 2P", "Courier New", monospace; }
body.theme-arcade { background: #1b1030; color: #f6e9ff; font-family: var(--hand); }
.doo { display: block; width: 100%; height: auto; overflow: visible; }
.gate { background: radial-gradient(circle at 50% 35%, #3a1b66, #170a2c 70%); text-align: center; padding: 0 20px; }
.g-neon { font: 400 clamp(24px, 7vw, 40px) var(--px); color: #fff; text-shadow: 0 0 8px var(--pk), 0 0 22px var(--pk), 0 0 44px var(--pk); animation: neon 3s infinite; margin-bottom: 18px; }
@keyframes neon { 0%, 18%, 22%, 62%, 100% { opacity: 1; } 20%, 60% { opacity: .55; } }
.gate-title { font: 600 clamp(24px, 6vw, 34px) var(--hand); margin-bottom: 6px; word-break: break-word; }
.gate-eyebrow { font-size: 14px; color: #cfb9f0; margin-bottom: 26px; }
.coin-btn { appearance: none; border: 3px solid var(--cy); background: rgba(94, 231, 255, .1); color: #fff; padding: 14px 28px; border-radius: 16px; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; box-shadow: 0 0 22px rgba(94, 231, 255, .4); animation: cp 1.8s ease-in-out infinite; }
.coin-btn .coin { font-size: 30px; } .coin-btn b { font: 400 13px var(--px); letter-spacing: .08em; }
@keyframes cp { 50% { transform: scale(1.05); } }
.gate-hint { margin-top: 20px; font-size: 14px; color: #bda3e6; }
.arc { padding: 74px 12px 30px; max-width: 520px; margin: 0 auto; text-align: center; }
.a-head .eyebrow { font: 400 10px var(--px); color: var(--cy); letter-spacing: .2em; }
.a-head h1 { font: 600 clamp(24px, 6.4vw, 34px) var(--hand); margin: 10px 0 4px; word-break: break-word; }
.a-sub { font-size: 14px; color: #cfb9f0; margin-bottom: 16px; }
.cab { position: relative; padding: 52px 14px 14px; border-radius: 26px 26px 14px 14px; background: linear-gradient(#ff7ab8, #c24f9c 40%, #8240b8); box-shadow: 0 0 0 4px #4a1f6e, 0 0 40px rgba(255, 94, 168, .45), 0 24px 40px rgba(0, 0, 0, .5); }
.marq { position: absolute; left: 14px; right: 14px; top: 10px; height: 34px; border-radius: 10px; background: #2a1148; display: grid; place-items: center; overflow: hidden; }
.marq span { font: 400 14px var(--px); color: #fff; text-shadow: 0 0 10px var(--cy); position: relative; z-index: 1; }
.bulbs { position: absolute; inset: 3px; border-radius: 8px; background: repeating-linear-gradient(90deg, #ffd666 0 6px, transparent 6px 16px); animation: chase .8s steps(2) infinite; opacity: .55; }
@keyframes chase { to { background-position: 16px 0; } }
.glass { position: relative; aspect-ratio: 4 / 4.2; border-radius: 14px; overflow: hidden; background: linear-gradient(#e8f6ff, #cde7f7 60%, #b5d5ec); box-shadow: inset 0 0 0 4px #2a1148, inset 0 10px 30px rgba(60, 40, 100, .25); touch-action: manipulation; }
.glass::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .0) 0 22px, rgba(255, 255, 255, .22) 22px 24px), radial-gradient(circle at 20% 90%, #fff6 0 2px, transparent 3px) 0 0 / 28px 28px; pointer-events: none; }
.rail { position: absolute; left: 0; right: 0; top: 0; height: 12px; background: linear-gradient(#6b4f8e, #3c2a58); }
.claw { position: absolute; top: 8px; width: 60px; margin-left: -30px; transition: left .12s linear; z-index: 4; }
.claw.travel { transition: left 1.1s ease-in-out; }
.cable { width: 4px; height: var(--cl, 22px); margin: 0 auto; background: linear-gradient(90deg, #3c2a58, #8a6fb0, #3c2a58); transition: height .9s ease-in-out; }
.head { position: relative; width: 60px; height: 44px; margin-top: -2px; transform-origin: 50% 0; }
.claw.sway .head { animation: sway 1.1s ease-in-out infinite; }
@keyframes sway { 50% { transform: rotate(5deg); } 0%, 100% { transform: rotate(-5deg); } }
.prongs { width: 60px; height: 44px; display: block; overflow: visible; }
.prongs .pr path { fill: none; stroke: #ffd666; stroke-width: 6; stroke-linecap: round; }
.prongs .hub { fill: #ff5ea8; stroke: #fff; stroke-width: 2; }
.prongs .pr { transform-origin: 30px 4px; transition: transform .35s; }
.claw.open .pr.l { transform: rotate(18deg); } .claw.open .pr.r { transform: rotate(-18deg); }
.claw.closed .pr.l { transform: rotate(-14deg); } .claw.closed .pr.r { transform: rotate(14deg); }
.hold { position: absolute; left: 50%; top: 20px; width: 44px; margin-left: -22px; z-index: -1; }
.pile { position: absolute; left: 0; right: 0; bottom: 0; height: 40%; }
.cap { position: absolute; width: 17%; aspect-ratio: 1; transform: translate(-50%, 0) rotate(var(--r, 0deg)); transition: filter .2s; }
.cap svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 2px rgba(60, 40, 100, .3)); }
.cap.near svg { filter: drop-shadow(0 0 8px #fff) drop-shadow(0 3px 2px rgba(60, 40, 100, .3)); }
.chute { position: absolute; left: 0; bottom: 0; width: 24%; height: 17%; background: repeating-linear-gradient(45deg, #2a1148 0 8px, #3a1b66 8px 16px); border-radius: 0 12px 0 0; display: grid; place-items: center; z-index: 5; box-shadow: 0 0 18px rgba(94, 231, 255, .3) inset; }
.chute span { font: 400 8px var(--px); color: var(--cy); text-shadow: 0 0 6px var(--cy); }
.glare { position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, .35), transparent 30%); pointer-events: none; z-index: 6; }
.panel { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 12px 16px; background: #34165a; border-radius: 16px; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .1); }
.joy { display: flex; gap: 10px; }
.jb { appearance: none; width: 64px; height: 64px; border-radius: 50%; border: 0; font-size: 22px; color: #fff; background: radial-gradient(circle at 35% 30%, #7de8ff, #2a9ed0); box-shadow: 0 6px 0 #1a6c93; cursor: pointer; touch-action: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.jb:active, .jb.on { transform: translateY(4px); box-shadow: 0 2px 0 #1a6c93; }
.grab { appearance: none; width: 92px; height: 92px; border-radius: 50%; border: 0; font: 400 13px var(--px); color: #fff; background: radial-gradient(circle at 35% 30%, #ff9ac4, #e0306f); box-shadow: 0 8px 0 #9c1f4e; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.grab:active { transform: translateY(6px); box-shadow: 0 2px 0 #9c1f4e; }
.grab:disabled, .jb:disabled { opacity: .5; }
.tip { margin-top: 10px; font-size: 13px; color: #fbe7ff; }
.shelf { margin-top: 26px; }
.shelf h2 { font: 400 11px var(--px); color: var(--cy); letter-spacing: .12em; margin-bottom: 12px; }
.sh-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 40px; }
.sh-row .it { width: 76px; background: #fff; padding: 3px 3px 12px; box-shadow: 0 4px 10px rgba(0, 0, 0, .4); transform: rotate(var(--r, 0deg)); cursor: zoom-in; position: relative; animation: ipop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.sh-row .it .ph { aspect-ratio: 1; background: #ddd center / cover no-repeat; }
@keyframes ipop { from { transform: scale(.3) rotate(30deg); opacity: 0; } }
.sh-row .empty { font-size: 13px; color: #a58bd0; }
.boss { margin-top: 22px; appearance: none; border: 3px solid var(--pk); background: rgba(255, 94, 168, .14); color: #fff; padding: 13px 26px; border-radius: 14px; font: 600 15px var(--hand); cursor: pointer; box-shadow: 0 0 20px rgba(255, 94, 168, .4); }
.boss.is-locked { opacity: .6; }
.foot { text-align: center; padding: 26px 8px 10px; color: #bda3e6; }
.prize { position: fixed; inset: 0; z-index: 8000; display: grid; place-items: center; padding: 16px; background: rgba(20, 8, 40, .78); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); opacity: 0; visibility: hidden; transition: opacity .3s; }
.prize.open { opacity: 1; visibility: visible; }
.pz-card { position: relative; width: min(380px, 100%); text-align: center; }
.cap-big { position: relative; width: 120px; height: 120px; margin: 0 auto; }
.cap-big svg { position: absolute; left: 0; width: 120px; height: 60px; overflow: visible; transition: transform .7s cubic-bezier(.3, 1.4, .5, 1); }
.cap-big .t { top: 0; } .cap-big .b { top: 60px; }
.cap-big.shake { animation: shk .5s 2; }
@keyframes shk { 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
.cap-big.split .t { transform: translateY(-110px) rotate(-24deg); opacity: 0; transition: transform .7s, opacity .7s .3s; } .cap-big.split .b { transform: translateY(40px) rotate(18deg); opacity: 0; transition: transform .7s, opacity .7s .3s; }
.pz-ph { display: flex; flex-direction: column; gap: 12px; align-items: center; margin-top: -10px; }
.pz-ph .pol { width: 72%; background: #fff; padding: 3% 3% 12%; position: relative; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); transform: rotate(var(--r, 0deg)); cursor: zoom-in; animation: pzIn .7s cubic-bezier(.3, 1.5, .5, 1) both; animation-delay: var(--d, 0s); }
.pz-ph .pol .ph { aspect-ratio: 4 / 3; background: #ddd center / cover no-repeat; }
.pz-ph .pol figcaption { position: absolute; left: 4%; right: 4%; bottom: 3%; font-size: 13px; color: #5b4636; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes pzIn { from { opacity: 0; transform: scale(.2) translateY(80px); } }
.pz-ok { margin-top: 18px; appearance: none; border: 0; border-radius: 999px; padding: 12px 28px; font: 600 15px var(--hand); color: #fff; background: var(--pk); box-shadow: 0 5px 0 #9c1f4e; cursor: pointer; }
.pool { display: none; }
@media (prefers-reduced-motion: reduce) { .claw.sway .head, .bulbs, .g-neon, .coin-btn { animation: none; } }
