/* Elyndra Cards */
:root { --ember: #e8553f; --sylva: #33b46f; --aurel: #e9b53b; --azure: #3c7fe6; }
body { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.screen { flex: 1; min-height: 0; overflow-y: auto; }
.logo-cards { display: flex; justify-content: center; gap: 0; height: 64px; margin-top: 6px; }
.logo-cards i { width: 38px; height: 56px; border-radius: 8px; border: 3px solid #fff; margin: 0 -6px; box-shadow: 0 6px 14px rgba(0, 0, 0, .4); }
.logo-cards i:nth-child(1) { transform: rotate(-16deg); } .logo-cards i:nth-child(2) { transform: rotate(-5deg) translateY(-4px); }
.logo-cards i:nth-child(3) { transform: rotate(6deg) translateY(-4px); } .logo-cards i:nth-child(4) { transform: rotate(17deg); }
.c-ember { background: var(--ember); } .c-sylva { background: var(--sylva); } .c-aurel { background: var(--aurel); } .c-azure { background: var(--azure); }
.setup { display: flex; flex-direction: column; gap: 8px; padding: 4px 2px 6px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bar b { font-size: 18px; }

/* Adventure */
.stages { display: grid; gap: 10px; }
.stage { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(205, 184, 255, .2); background: linear-gradient(150deg, var(--kv-panel), var(--kv-navy2)); }
.stage.locked { opacity: .45; }
.stage.done { border-color: rgba(255, 215, 122, .5); }
.stage .num { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: rgba(255, 255, 255, .08); }
.stage.done .num { background: var(--kv-gold); color: #2a1b00; }
.stage .who { display: flex; }
.stage .who img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--kv-navy); margin-left: -8px; object-fit: cover; }
.stage .txt { flex: 1; }
.stage .txt b { display: block; }
.stage .txt small { color: var(--kv-muted); }

/* Table */
#table { display: flex; flex-direction: column; overflow: hidden; background: radial-gradient(90% 60% at 50% 45%, rgba(123, 92, 255, .25), transparent 70%); }
.opps { display: flex; justify-content: center; gap: 10px; padding: 10px 8px 4px; flex-wrap: wrap; }
.opp { position: relative; display: flex; flex-direction: column; align-items: center; width: 92px; padding: 6px; border-radius: 14px; border: 1px solid transparent; transition: .2s; }
.opp.turn { border-color: var(--kv-pink); background: rgba(255, 143, 200, .12); box-shadow: 0 0 18px rgba(255, 143, 200, .35); }
.opp img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, .7); }
.opp b { font-size: 13px; margin-top: 2px; }
.opp .n { font-size: 12px; color: var(--kv-muted); }
.opp .mini { display: flex; height: 18px; margin-top: 2px; }
.opp .mini i { width: 11px; height: 16px; border-radius: 3px; margin-left: -5px; background: linear-gradient(135deg, #3a2b7a, #ff8fc8); border: 1px solid #fff; }
.bubble { position: absolute; top: -6px; left: 50%; transform: translate(-50%, -100%); background: #fff; color: #2a1b4a; font-weight: 900; font-size: 12px; padding: 4px 8px; border-radius: 10px; white-space: nowrap; animation: pop .25s; z-index: 3; }
@keyframes pop { from { transform: translate(-50%, -80%) scale(.6); opacity: 0; } }
.center { flex: 1; min-height: 150px; display: flex; align-items: center; justify-content: center; gap: 26px; position: relative; }
.pile { position: relative; border: 0; background: none; padding: 0; }
.pile .back, .card { width: 76px; height: 112px; border-radius: 12px; }
.pile .back { display: block; border: 3px solid #fff; background: repeating-linear-gradient(45deg, #2a1f63 0 8px, #3a2b84 8px 16px); box-shadow: 0 4px 0 #1b1440, 0 8px 0 #120d2e, 0 14px 22px rgba(0, 0, 0, .45); }
.pile .back::after { content: "✦"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--kv-pink); font-size: 30px; }
.pile small { position: absolute; bottom: -20px; left: 0; right: 0; color: var(--kv-muted); font-size: 11px; }
.pile.glow .back { box-shadow: 0 0 0 3px var(--kv-cyan), 0 14px 22px rgba(0, 0, 0, .45); }
.dir { position: absolute; font-size: 160px; color: rgba(205, 184, 255, .08); pointer-events: none; transition: transform .4s; }
.dir.ccw { transform: scaleX(-1); }
.color-ring { position: absolute; width: 230px; height: 230px; border-radius: 50%; border: 6px solid transparent; pointer-events: none; opacity: .55; transition: border-color .3s; }
.status { text-align: center; font-weight: 800; min-height: 22px; padding: 2px 8px; }
.actions { display: flex; gap: 8px; justify-content: center; align-items: center; padding: 6px 8px; flex-wrap: wrap; }
.actions .call { background: linear-gradient(135deg, #ffb347, #ff6a88); border: 0; }
.actions .call:disabled { opacity: .35; filter: grayscale(.7); }
.actions .call.ready { animation: pulse 1s infinite; }
.actions .catch { background: linear-gradient(135deg, #5ee7ff, #7b5cff); border: 0; animation: pulse .8s infinite; }
@keyframes pulse { 50% { transform: scale(1.07); } }
.actions .count { color: var(--kv-muted); font-size: 13px; }
.hand { display: flex; gap: 0; padding: 14px 12px max(16px, env(safe-area-inset-bottom)); overflow-x: auto; min-height: 150px; align-items: flex-end; }
.hand .card { flex: none; margin-left: -26px; transition: transform .15s; }
.hand .card:first-child { margin-left: auto; }
.hand .card:last-child { margin-right: auto; }
.hand .card.ok { transform: translateY(-14px); cursor: pointer; box-shadow: 0 0 0 3px var(--kv-cyan), 0 10px 18px rgba(0, 0, 0, .4); }
.hand .card.ok:hover { transform: translateY(-22px); }
.hand .card.dim { filter: brightness(.6); }

/* Cards */
.card { position: relative; border: 3px solid #fff; box-shadow: 0 8px 16px rgba(0, 0, 0, .35); color: #fff; overflow: hidden; display: block; padding: 0; }
.card .oval { position: absolute; inset: 14px 9px; border-radius: 50%; background: rgba(255, 255, 255, .92); transform: rotate(-24deg); }
.card .sym { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: 34px; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.card .corner { position: absolute; font-weight: 900; font-size: 13px; line-height: 1; }
.card .tl { top: 6px; left: 7px; } .card .br { bottom: 6px; right: 7px; transform: rotate(180deg); }
.card.c-ember .sym { color: var(--ember); } .card.c-sylva .sym { color: var(--sylva); }
.card.c-aurel .sym { color: #c58f12; } .card.c-azure .sym { color: var(--azure); }
.card.wild { background: #1a1530; }
.card.wild .oval { background: conic-gradient(var(--ember) 0 25%, var(--aurel) 0 50%, var(--sylva) 0 75%, var(--azure) 0); }
.card.wild .sym { color: #fff; text-shadow: 0 2px 4px rgba(0, 0, 0, .6); }
.discard .card { transform: rotate(4deg); width: 86px; height: 126px; }
.discard .card .sym { font-size: 40px; }

/* Colour picker */
.colors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.colors button { height: 70px; border-radius: 16px; border: 3px solid #fff; font-weight: 900; font-size: 16px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.rules-text { text-align: left; font-size: 14px; color: #dcdcf5; }
.rules-text li { margin: 4px 0; }

@media (min-height: 760px) {
  .pile .back, .card { width: 86px; height: 126px; }
  .discard .card { width: 98px; height: 144px; }
}
