/* Zelo Arcade */
.arcade { padding: 40px 20px 60px; }
.arcade-title { font: 700 clamp(40px, 8vw, 84px) / 1 var(--f-px); text-align: center; margin: 0 0 8px; text-shadow: 5px 5px 0 var(--teal); }
.setup-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 860px) { .setup-grid { grid-template-columns: minmax(0, 1fr); } }
.h { font: 700 15px var(--f-px); margin: 18px 0 8px; }
.h:first-child { margin-top: 0; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-row.three { grid-template-columns: repeat(3, 1fr); }
.choice { border: var(--line); background: var(--paper); padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); font-family: var(--f-body); }
.choice b { font: 700 13px var(--f-px); text-align: center; }
.choice small { color: var(--muted); font-size: 11px; font-weight: 700; }
.choice.on { background: var(--mustard); }
.choice.locked { opacity: .5; cursor: not-allowed; background: var(--paper-3); }
.ci { width: 54px; height: 54px; display: block; }
.ci svg { width: 100%; height: 100%; }
.dama-ic { background: conic-gradient(var(--ink) 0 25%, var(--paper) 0 50%, var(--ink) 0 75%, var(--paper) 0) 0 0 / 50% 50%; border: 3px solid var(--ink); border-radius: 50%; }
.me-row { display: flex; gap: 14px; align-items: center; }
.me-avatar { width: 96px; height: 96px; border: var(--line); box-shadow: var(--shadow); background: var(--paper); }
.me-ctl { flex: 1; min-width: 0; }
.me-ctl input { max-width: 110px; min-width: 0; }
.char-strip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px 4px; }
.char-strip img { width: 40px; height: 40px; border: 2px solid var(--ink); cursor: pointer; flex: 0 0 auto; }
.char-strip img.on { outline: 3px solid var(--coral); }
.x-row { align-items: center; }
.at { font: 700 20px var(--f-px); }
.x-pic { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; }
.big-btn { width: 100%; margin-top: 16px; font-size: 18px; }
.board-list { margin: 0; padding-left: 22px; font-weight: 700; font-size: 14px; max-height: 260px; overflow: auto; }
.board-list li { padding: 3px 0; }
.board-list img { width: 22px; height: 22px; vertical-align: middle; border: 2px solid var(--ink); margin-right: 6px; }
.board-list em { font-style: normal; font-family: var(--f-mono); float: right; }

/* ---------- table scene ---------- */
.scene { position: relative; min-height: calc(100vh - 62px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px 12px 150px;
  background: radial-gradient(ellipse at 50% 45%, #5a3b25 0 40%, #2b1c12 75%); overflow: hidden; }
.seat { display: flex; align-items: center; gap: 12px; background: var(--paper-2); border: var(--line); box-shadow: var(--shadow); padding: 6px 12px 6px 6px; z-index: 3; }
.seat-char { width: 64px; height: 64px; border: 3px solid var(--ink); background: var(--paper); }
.seat-top .seat-char { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.seat-info { display: flex; flex-direction: column; line-height: 1.2; }
.seat-info b { font: 700 15px var(--f-px); }
.seat-info small { font-size: 12px; color: var(--muted); font-weight: 700; }
.seat-info .x-pic { width: 24px; height: 24px; }
.seat-actions { display: flex; align-items: center; gap: 10px; margin-left: 10px; }
.timer { font: 700 18px var(--f-mono); min-width: 40px; text-align: right; }
.timer.low { color: #b3372a; }
.seat.turn { background: var(--mustard); }

.table-wrap { perspective: 1100px; width: min(92vw, 560px, calc(100vh - 420px)); min-width: 280px; }
.table { transform: rotateX(18deg); transform-origin: 50% 60%; background: #a8693c; border: 6px solid var(--ink); border-radius: 26px; padding: 18px;
  box-shadow: 0 14px 0 #6d3f1f, 0 14px 0 6px var(--ink), 0 40px 60px rgba(0,0,0,.5);
  background-image: repeating-linear-gradient(90deg, rgba(0,0,0,.06) 0 3px, transparent 3px 22px); }
.felt { background: #e8d9b5; border: 4px solid var(--ink); border-radius: 12px; padding: 10px; aspect-ratio: 1; display: grid; place-items: center; }

.dama-board { width: 100%; height: 100%; display: grid; grid-template: repeat(8, 1fr) / repeat(8, 1fr); border: 4px solid var(--ink); }
.sq { position: relative; display: grid; place-items: center; }
.sq.l { background: #f3e6c6; }
.sq.d { background: #8a5a36; }
.sq.sel { box-shadow: inset 0 0 0 4px var(--mustard); }
.sq.dest::after { content: ""; width: 30%; height: 30%; border-radius: 50%; background: var(--teal); border: 3px solid var(--ink); }
.sq.lastm { box-shadow: inset 0 0 0 3px rgba(111,179,168,.9); }
.pc { width: 78%; height: 78%; border-radius: 50%; border: 4px solid var(--ink); box-shadow: 0 4px 0 var(--ink); position: relative; transition: transform .15s; cursor: pointer; }
.pc.w { background: radial-gradient(circle at 35% 30%, #fffaf0, #eadbb7); }
.pc.b { background: radial-gradient(circle at 35% 30%, #4b3d33, #161310); }
.pc.k::after { content: "♛"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.1em; color: var(--mustard); text-shadow: 1px 1px 0 var(--ink); }
.pc.mine:hover { transform: translateY(-3px); }
.pc.gone { opacity: 0; transition: opacity .3s; }
.pc.float { position: fixed; z-index: 30; pointer-events: none; }

.hand-layer { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.hand { position: fixed; width: 92px; transition: none; filter: drop-shadow(4px 6px 0 rgba(0,0,0,.35)); }
.hand svg { width: 100%; display: block; }
.hand.flip svg { transform: rotate(180deg); }

/* rps */
.rps-area { width: 100%; height: 100%; display: grid; grid-template-rows: 1fr auto 1fr; place-items: center; }
.rps-slot { width: 42%; height: clamp(90px, 15vw, 150px); display: grid; place-items: center; }
.rps-slot > div, .rps-slot svg { height: 100%; }
.rps-slot.top svg { transform: rotate(180deg); }
.rps-slot .pop { animation: popin .35s cubic-bezier(.2,1.6,.4,1); }
@keyframes popin { from { transform: translateY(60%) scale(.6); opacity: 0; } }
.rps-slot.top .pop { animation-name: popdown; }
@keyframes popdown { from { transform: translateY(-60%) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.rps-mid { font: 700 clamp(18px, 4vw, 28px) var(--f-px); text-align: center; }
.shake { animation: shake .45s ease-in-out 3; }
@keyframes shake { 50% { transform: translateY(-14px); } }
.under { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); display: flex; gap: 14px; z-index: 5; padding: 10px 16px 0; background: #a8693c; box-shadow: inset 0 4px 0 rgba(255,255,255,.18); border: 4px solid var(--ink); border-bottom: 0; border-radius: 18px 18px 0 0; }
.pick { width: 96px; height: 110px; background: var(--paper-2); border: var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; cursor: pointer; padding: 6px; transition: transform .15s; }
.pick:hover { transform: translateY(-10px); }
.pick.on { background: var(--mustard); transform: translateY(-16px); }
.pick:disabled { cursor: default; }
.pick svg { height: 100%; }

.status { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font: 700 18px var(--f-px); color: var(--paper); text-shadow: 2px 2px 0 var(--ink); z-index: 4; pointer-events: none; text-align: center; }
.result { position: fixed; inset: 0; background: rgba(22,19,16,.55); display: grid; place-items: center; z-index: 50; }
.result-card { text-align: center; min-width: 300px; }
.result-card h2 { font: 700 34px var(--f-px); margin: 0 0 6px; }
.row.center { justify-content: center; }
.links a.on { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }

/* ronda */
.ronda-area { width: 100%; height: 100%; display: grid; grid-template-rows: auto 1fr auto; gap: 6px; }
.r-op { display: flex; justify-content: center; gap: 4px; min-height: 18%; }
.r-op .cd { width: 13%; margin-top: -6%; }
.r-mid { display: flex; align-items: center; gap: 10px; min-height: 0; }
.r-deck { width: 15%; position: relative; flex: 0 0 auto; }
.r-deck b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 14px var(--f-px); color: var(--paper); text-shadow: 2px 2px 0 var(--ink); }
.r-deck .cd + .cd { position: absolute; top: -3px; left: 3px; }
.r-table { flex: 1; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 6px; min-height: 0; }
.r-table .cd { width: 15%; transition: transform .2s; }
.r-table .cd.taken { animation: taken .55s ease-in forwards; }
@keyframes taken { 30% { transform: translateY(-8px) scale(1.08); } to { transform: translateY(var(--to, 120px)) scale(.6); opacity: 0; } }
.r-table .cd.hit { outline: 4px solid var(--mustard); outline-offset: 1px; border-radius: 6px; }
.r-info { font: 700 clamp(12px, 2.4vw, 16px) var(--f-px); text-align: center; min-height: 22px; }
.r-info .bang { display: inline-block; background: var(--mustard); border: 3px solid var(--ink); padding: 2px 10px; box-shadow: 3px 3px 0 var(--ink); animation: popin .35s cubic-bezier(.2,1.6,.4,1); margin: 0 3px; }
.cd { display: block; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.25)); }
.cd svg { width: 100%; display: block; }
.r-hand { gap: 10px; }
.r-hand { padding-bottom: 8px; }
.r-hand .cd { width: 70px; cursor: pointer; transition: transform .15s; }
.r-hand.my .cd:hover { transform: translateY(-14px); }
.r-hand:not(.my) .cd { cursor: default; filter: brightness(.85) drop-shadow(2px 3px 0 rgba(0,0,0,.25)); }
.card-float { position: fixed; z-index: 35; pointer-events: none; }

/* archery */
.arch-wrap { position: relative; width: min(94vw, 760px, calc((100vh - 250px) * 760 / 520)); min-width: 300px; border: 6px solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 0 10px 0 var(--ink), 0 30px 50px rgba(0,0,0,.45); background: #9fd3e6; }
.arch-wrap svg { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; user-select: none; }
.a-score { position: absolute; left: 8px; top: 8px; background: var(--paper-2); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); padding: 6px 8px; font-size: 12px; font-weight: 800; }
.a-row { display: flex; align-items: center; gap: 4px; padding: 2px 0; }
.a-row i { width: 10px; height: 10px; border: 2px solid var(--ink); border-radius: 50%; }
.a-row b { min-width: 62px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--f-px); font-size: 11px; }
.a-cell { width: 22px; height: 22px; display: grid; place-items: center; border: 2px solid var(--ink); background: var(--mustard); font: 700 12px var(--f-mono); }
.a-cell.e { background: var(--paper); }
.a-row em { font: 700 15px var(--f-mono); font-style: normal; margin-left: 6px; min-width: 24px; text-align: right; }
.a-round { font: 700 11px var(--f-px); color: #b3372a; }
.a-wind { position: absolute; right: 8px; top: 8px; background: var(--paper-2); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); padding: 6px 10px; font: 700 13px var(--f-px); }
.a-msg { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); font: 700 clamp(11px, 2vw, 15px) var(--f-px); color: var(--paper); text-shadow: 2px 2px 0 var(--ink); white-space: nowrap; pointer-events: none; }
.a-power { position: absolute; left: 10px; bottom: 40px; width: 16px; height: 120px; border: 3px solid var(--ink); background: var(--paper); display: flex; align-items: flex-end; }
.a-power i { display: block; width: 100%; height: 0; background: linear-gradient(0deg, #5aa05a, #d9a521 60%, #e8695a); }
.a-power i.tired { animation: tired .2s linear infinite; }
@keyframes tired { 50% { opacity: .55; } }
.a-poptxt { animation: apop 1.5s ease-out forwards; }
@keyframes apop { 0% { opacity: 0; transform: translateY(10px); } 15% { opacity: 1; transform: none; } 80% { opacity: 1; } to { opacity: 0; transform: translateY(-14px); } }

/* live activity */
.live { margin-top: 22px; }
.live-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #e8695a; border: 2px solid var(--ink); margin-right: 8px; vertical-align: -1px; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.feed { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.feed li { display: flex; align-items: center; gap: 8px; border: 2px solid var(--ink); background: var(--paper); padding: 6px 8px; font-size: 13px; font-weight: 700; min-width: 0; }
.feed li.new { animation: popin .4s cubic-bezier(.2,1.6,.4,1); background: var(--paper-3); }
.feed img { width: 30px; height: 30px; border: 2px solid var(--ink); flex: 0 0 auto; }
.feed .vs { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .w { color: #2f7a3b; } .feed .l { color: #b3372a; }
.feed .tag { font: 700 10px var(--f-px); background: var(--mustard); border: 2px solid var(--ink); padding: 1px 5px; flex: 0 0 auto; }
.feed time { font: 600 11px var(--f-mono); color: var(--muted); flex: 0 0 auto; }

/* money */
.money-net { font: 700 11px var(--f-px); color: #b3372a; margin: 10px 0 6px; }
#money-info { margin: 8px 0; line-height: 1.5; }
.money-panel { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(22,19,16,.5); z-index: 45; }
.money-card { max-width: 420px; text-align: center; }
.money-card h3 { font: 700 20px var(--f-px); margin: 0 0 6px; }
.fund { list-style: none; padding: 0; margin: 10px 0; font-weight: 800; }
.fund li { padding: 3px 0; }
#res-money { margin: 8px 0 12px; }
#res-money p { margin: 4px 0 8px; }

/* money explainer */
.explain { margin-top: 22px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.step { border: 3px solid var(--ink); background: var(--paper); padding: 10px; position: relative; animation: stepOn 8s infinite; }
.step:nth-child(2) { animation-delay: 2s; } .step:nth-child(3) { animation-delay: 4s; } .step:nth-child(4) { animation-delay: 6s; }
@keyframes stepOn { 0%, 22% { background: var(--mustard); transform: translateY(-4px); box-shadow: 4px 4px 0 var(--ink); } 25%, 100% { background: var(--paper); transform: none; box-shadow: none; } }
.step > b { position: absolute; top: -12px; left: -12px; width: 28px; height: 28px; border-radius: 50%; background: var(--coral); border: 3px solid var(--ink); display: grid; place-items: center; font: 700 13px var(--f-px); }
.step h4 { font: 700 14px var(--f-px); margin: 8px 0 4px; }
.step p { margin: 0; font-size: 13px; line-height: 1.45; }
.anim { height: 64px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.coin { width: 46px; height: 46px; border-radius: 50%; background: #f2c230; border: 3px solid var(--ink); display: grid; place-items: center; font: 700 13px var(--f-mono); box-shadow: 0 3px 0 var(--ink); animation: drop 2s ease-in-out infinite; }
.coin.r { animation-delay: .25s; }
.coin.big { width: 64px; height: 64px; font-size: 14px; animation: grow 2s ease-in-out infinite; }
@keyframes drop { 0% { transform: translateY(-18px); opacity: 0; } 30%, 100% { transform: none; opacity: 1; } }
@keyframes grow { 0%, 100% { transform: scale(.9); } 50% { transform: scale(1.08) rotate(-4deg); } }
.vault { font-size: 40px; animation: grow 2s ease-in-out infinite; }
.vsx { font: 700 26px var(--f-px); color: var(--coral); text-shadow: 3px 3px 0 var(--ink); animation: shake .6s ease-in-out infinite; }
.sq .pc.can { box-shadow: 0 4px 0 var(--ink), 0 0 0 4px var(--mustard); }
.rps-slot.top .shake { animation-name: shakedown; }
@keyframes shakedown { 50% { transform: translateY(14px); } }

@media (max-width: 600px) {
  .arch-wrap { width: 96vw; min-width: 0; border-width: 4px; }
  .a-score { font-size: 10px; padding: 3px 5px; left: 4px; top: 4px; box-shadow: 2px 2px 0 var(--ink); }
  .a-wind { font-size: 10px; padding: 3px 6px; right: 4px; top: 4px; box-shadow: 2px 2px 0 var(--ink); }
  .a-msg { font-size: 10px; bottom: 6px; white-space: normal; width: 92%; text-align: center; }
  .a-power { left: 6px; bottom: 34px; width: 12px; height: 90px; }
  .a-cell { width: 16px; height: 16px; font-size: 9px; }
}

/* stake + open tables */
.usd-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; }
.usd-row .chip { font-size: 13px; padding: 5px 10px; background: var(--paper); }
.usd-row .chip.on { background: var(--mustard); box-shadow: 2px 2px 0 var(--ink); }
.usd-own { display: flex; align-items: center; gap: 3px; font-weight: 800; }
.usd-own input { width: 74px; padding: 5px 6px; }
.open-tables { margin-top: 22px; }
.tables { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.tables li.t { display: flex; align-items: center; gap: 10px; border: 3px solid var(--ink); background: var(--paper); padding: 8px; box-shadow: 3px 3px 0 var(--ink); }
.tables li.t img { width: 44px; height: 44px; image-rendering: pixelated; border: 2px solid var(--ink); }
.tables li.t div { flex: 1; min-width: 0; }
.tables li.t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tables li.t small { display: block; font-size: 12px; }
.tables li.t .amt { font: 700 13px var(--f-px); color: #1d6b4f; }
.tables li.t.mine { background: var(--paper-3); }

/* share result on X */
.share-box { border: 3px dashed var(--ink); background: var(--paper); padding: 10px; margin: 6px 0 14px; text-align: left; max-width: 380px; }
.share-txt { white-space: pre-line; font-size: 13px; line-height: 1.45; margin: 0 0 10px; }
.share-x { display: block; text-align: center; }
