@font-face {
  font-family: "Baloo2";
  src: url(assets/baloo2.woff2) format("woff2");
  font-weight: 400 800;
  font-display: block;
}

:root {
  --ol: #2f2437;
  --font: "Baloo2", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #221d34; }
body { font-family: var(--font); color: #fff; user-select: none; -webkit-user-select: none; touch-action: manipulation; }

#stage { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(120% 90% at 50% 40%, #3a325e 0%, #1d1930 72%); }
#phone { position: absolute; left: 0; top: 0; width: 540px; height: 1170px; transform-origin: 0 0; overflow: hidden; background: #eadfce; }
#world { position: absolute; left: 0; top: 0; width: 540px; height: 1170px; display: block; }
#ui { position: absolute; inset: 0; pointer-events: none; }
#ui .hit, #ui button { pointer-events: auto; cursor: pointer; }
button { font-family: var(--font); }

.ink { color: #fff; -webkit-text-stroke: 6px var(--ol); paint-order: stroke fill; }

/* ---- name plates and hearts ------------------------------------------- */
.vsbar {
  position: absolute; left: 14px; right: 14px; top: 40px; height: 68px;
  border: 4px solid var(--ol); border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, #8391ff 0%, #6474f2 55%, #5462de 100%);
  box-shadow: 0 6px 0 rgba(47, 36, 55, 0.22);
}
.vs-red {
  position: absolute; top: -10px; bottom: -10px; left: 50%; right: -40px;
  transform: skewX(-20deg); transform-origin: 50% 50%;
  background: linear-gradient(180deg, #ff8189 0%, #f0606a 55%, #dc4e59 100%);
  border-left: 5px solid var(--ol);
}
.vsbar::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
  pointer-events: none; z-index: 1;
}
.plate { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; gap: 9px; z-index: 2; }
.plate.left { left: 8px; }
.plate.right { right: 8px; }
.plate .ava {
  width: 48px; height: 48px; border: 3px solid var(--ol); border-radius: 11px;
  background: linear-gradient(160deg, #cfe0ff, #8ea6ff);
}
.plate.right .ava { background: linear-gradient(160deg, #d6f2b8, #7fcf6a); }
.plate .nm { font-size: 25px; font-weight: 800; letter-spacing: 0.2px; -webkit-text-stroke: 5px var(--ol); }
.vs { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; font-size: 40px; font-weight: 800; font-style: italic; -webkit-text-stroke: 7px var(--ol); }

.hearts { position: absolute; top: 118px; display: flex; gap: 3px; }
.hearts.left { left: 24px; }
.hearts.right { right: 24px; }
.heart { width: 42px; height: 38px; display: block; filter: drop-shadow(0 3px 0 rgba(47, 36, 55, 0.22)); }
.heart svg { width: 100%; height: 100%; overflow: visible; display: block; }
.heart .h { fill: #ef3b4d; stroke: var(--ol); stroke-width: 2.8; stroke-linejoin: round; }
.heart .s { fill: rgba(255, 255, 255, 0.6); }
.heart.lost .h { fill: #1e1924; }
.heart.lost .s { fill: rgba(255, 255, 255, 0.12); }

/* ---- card offer ------------------------------------------------------- */
.offer { position: absolute; left: 0; right: 0; top: 418px; display: flex; flex-direction: column; align-items: center; }
.bubble {
  position: relative; width: 430px; height: 70px; display: grid; place-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 60%, #d8e8fb 100%);
  border: 4px solid var(--ol); border-radius: 30px; margin-bottom: 30px;
  box-shadow: 0 6px 0 rgba(47, 36, 55, 0.2);
  animation: bubbleIn 360ms cubic-bezier(.2, 1.4, .4, 1) both;
}
.bubble span { position: relative; z-index: 2; font-size: 34px; font-weight: 800; color: #fff; -webkit-text-stroke: 7px #413753; paint-order: stroke fill; }
.bubble i {
  position: absolute; bottom: -12px; width: 20px; height: 20px; margin-left: -10px;
  background: #d8e8fb; border-right: 4px solid var(--ol); border-bottom: 4px solid var(--ol);
  transform: rotate(45deg); border-bottom-right-radius: 4px;
}
.cards { display: flex; gap: 9px; }
.card {
  position: relative; width: 168px; height: 262px; overflow: hidden;
  border: 5px solid var(--ol); border-radius: 24px;
  background: linear-gradient(180deg, #fff8e2 0%, #ffeab4 62%, #ffdc95 100%);
  box-shadow: 0 7px 0 rgba(47, 36, 55, 0.26), inset 0 0 0 3px rgba(255, 255, 255, 0.5);
  animation: cardIn 420ms cubic-bezier(.2, 1.3, .4, 1) both;
}
.card.up { background: linear-gradient(180deg, #f4ffe4 0%, #d4f5a8 62%, #b6ec7c 100%); }
.card.spell { background: linear-gradient(180deg, #f9f0ff 0%, #e4cbff 62%, #d3aaf7 100%); }
.card.spell .label { font-size: 21px; }
.card .art { position: absolute; left: 0; top: 6px; width: 100%; height: auto; }
.card .zig { position: absolute; left: -2px; right: -2px; bottom: -2px; width: calc(100% + 4px); height: 92px; }
.card .zig .fill { fill: #dcb178; }
.card.r-rare .zig .fill { fill: #6f9fe6; }
.card.r-epic .zig .fill { fill: #a973dd; }
.card.r-legendary .zig .fill { fill: #e8b33f; }
.card.up .zig .fill { fill: #6cc046; }
.card.spell .zig .fill { fill: #a973dd; }
.card .zig .edge { fill: none; stroke: var(--ol); stroke-width: 4; stroke-linejoin: round; }
.card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 70px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.08)); pointer-events: none;
}
.card .label { position: absolute; left: 0; right: 0; bottom: 26px; text-align: center; font-size: 26px; font-weight: 800; line-height: 1; -webkit-text-stroke: 6px var(--ol); z-index: 2; white-space: nowrap; }
.card .art[data-long] ~ .label { font-size: 22px; }
.card .art[data-long="2"] ~ .label { font-size: 18px; }

.offer .bubble, .offer .cards { position: relative; z-index: 2; }
.offer.comeback .ribbon {
  position: absolute; left: -14px; right: -14px; top: 2px; height: 348px; z-index: 1;
  background: linear-gradient(180deg, #a7d0ff, #6aa3f5);
  border: 5px solid var(--ol);
  box-shadow: 0 6px 0 rgba(47, 36, 55, 0.18);
  animation: ribbonIn 0.3s cubic-bezier(.2, .9, .3, 1) both;
}
.offer.comeback .ribbon::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; bottom: 8px; border-top: 4px solid #cfe4ff; border-bottom: 4px solid #cfe4ff; }
.offer.comeback .bubble { background: linear-gradient(180deg, #ffffff, #dbecff); animation-delay: 0.18s; }
@keyframes ribbonIn { from { transform: translateX(-110%); } to { transform: none; } }

@keyframes cardIn { from { transform: translateY(60px) scale(0.7); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bubbleIn { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }

.bigtext { position: absolute; left: 0; right: 0; top: 600px; text-align: center; font-size: 76px; font-weight: 800; -webkit-text-stroke: 11px var(--ol); line-height: 1;
  filter: drop-shadow(0 6px 0 rgba(47, 36, 55, 0.25)); animation: bigIn 0.28s cubic-bezier(.3, .7, .4, 1) both; }
@keyframes bigIn { 0% { transform: translateY(-40px) scale(.92); } 60% { transform: translateY(0) scale(1.15); } 100% { transform: none; } }

/* ---- pick timer -------------------------------------------------------- */
.timer {
  position: absolute; left: 50%; bottom: 54px; transform: translateX(-50%);
  width: 252px; height: 50px; display: flex; align-items: center; gap: 9px; padding: 0 13px;
  border: 4px solid var(--ol); border-radius: 26px;
  background: linear-gradient(180deg, #cb9d5f, #a97b45);
  box-shadow: 0 5px 0 rgba(47, 36, 55, 0.25);
}
.timer .clock { font-size: 24px; line-height: 1; }
.timer .bar { position: relative; flex: 1; height: 20px; border-radius: 10px; background: #7a5630; overflow: hidden; box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.28); }
.timer .bar i { position: absolute; inset: 0; transform-origin: left center; background: linear-gradient(180deg, #ffe6a8, #f3b64e); }

.toast {
  position: absolute; left: 50%; top: 300px; z-index: 5; transform: translateX(-50%);
  width: max-content; white-space: nowrap; text-align: center;
  padding: 7px 22px 8px; border: 4px solid var(--ol); border-radius: 26px;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 60%, #d8e8fb 100%); box-shadow: 0 5px 0 rgba(47, 36, 55, 0.2);
  color: #fff; font-size: 20px; font-weight: 800; line-height: 1.2; -webkit-text-stroke: 5px var(--ol); paint-order: stroke fill;
  animation: toastIn 0.25s ease both;
}
.hud ~ .toast { top: 172px; }

.bigtext.fight { font-size: 94px; animation: fightIn 0.3s cubic-bezier(.2, 1.6, .4, 1) both; }
.bigtext.result { top: 520px; font-size: 80px; }
.bigtext.result.win { color: #ffe36b; }
.bigtext.result.lose { color: #ffc3c3; }

/* ---- round splash ------------------------------------------------------ */
.splash { position: absolute; inset: 0; z-index: 30; overflow: hidden; }
.splash .half { position: absolute; left: -12%; right: -12%; height: 62%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.splash .half.red { top: -9%; padding-top: 7%; background: linear-gradient(180deg, #ea6771, #d9525c); transform: rotate(-4.5deg); animation: halfInTop 0.34s cubic-bezier(.2, .9, .3, 1) both; }
.splash .half.blue { bottom: -9%; padding-bottom: 7%; background: linear-gradient(180deg, #7c8bf6, #6472e8); transform: rotate(-4.5deg); animation: halfInBottom 0.34s cubic-bezier(.2, .9, .3, 1) both; }
.splash .who { display: flex; align-items: center; gap: 15px; }
.splash .who .ava { width: 66px; height: 66px; border: 4px solid var(--ol); border-radius: 15px; background: rgba(255, 255, 255, 0.25); }
.splash .who .nm { font-size: 36px; font-weight: 800; }
.splash .hearts { position: static; display: flex; gap: 12px; }
.splash .heart { width: 84px; height: 76px; }
.splash .heart.lost .h { fill: #5a4e66; }
.splash .half.red.lose { background: linear-gradient(rgba(47, 36, 55, .15), rgba(47, 36, 55, .15)), linear-gradient(180deg, #ea6771, #d9525c); }
.splash .half.blue.lose { background: linear-gradient(rgba(47, 36, 55, .15), rgba(47, 36, 55, .15)), linear-gradient(180deg, #7c8bf6, #6472e8); }
/* the diagonal seam: an ink line on the blue edge, a highlight 6px inside each half (the red one drawn from the blue half) */
.splash .half.blue, .vs-intro .side.blue { border-top: 6px solid var(--ol); }
.splash .half.red, .vs-intro .side.red { border-bottom: 6px solid var(--ol); }
.splash.out .half.blue::after, .vs-intro.open .side.blue::after { display: none; }
.splash .half.blue::before, .splash .half.blue::after, .vs-intro .side.blue::before, .vs-intro .side.blue::after { content: ""; position: absolute; left: 0; right: 0; height: 4px; background: rgba(255, 255, 255, .55); }
.splash .half.blue::before, .vs-intro .side.blue::before { top: 6px; }
.splash .half.blue::after, .vs-intro .side.blue::after { top: -16px; }
/* the red highlight rides on the blue half, so it stays hidden until the halves meet */
.splash .half.blue::after { animation: seamHi .34s steps(1, end) both; }
.vs-intro .side.blue::after { animation: seamHi .42s steps(1, end) both; }
@keyframes seamHi { from { visibility: hidden; } }
.splash.out .half.red { animation: halfOutTop 0.3s cubic-bezier(.6, 0, .8, .4) both; }
.splash.out .half.blue { animation: halfOutBottom 0.3s cubic-bezier(.6, 0, .8, .4) both; }
@keyframes halfOutTop { from { transform: translateY(0) rotate(-4.5deg); } to { transform: translateY(-100%) rotate(-4.5deg); } }
@keyframes halfOutBottom { from { transform: translateY(0) rotate(-4.5deg); } to { transform: translateY(100%) rotate(-4.5deg); } }

.heart.breaking { animation: heartBreak 0.85s ease-in both; }
@keyframes heartBreak { 0% { transform: scale(1); } 25% { transform: scale(1.4) rotate(-9deg); } 42% { transform: scale(1.12) rotate(7deg); } 100% { transform: scale(0.92); } }
@keyframes halfInTop { from { transform: translateY(-70%) rotate(-4.5deg); } to { transform: translateY(0) rotate(-4.5deg); } }
@keyframes halfInBottom { from { transform: translateY(70%) rotate(-4.5deg); } to { transform: translateY(0) rotate(-4.5deg); } }
@keyframes fightIn { from { transform: scale(2.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastIn { from { transform: translate(-50%, 14px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* ======================= menus ======================= */
.screen { position: absolute; inset: 0; }
.topbar { position: absolute; left: 14px; right: 14px; top: 22px; height: 52px; display: flex; align-items: center; gap: 10px; }
.pill { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px 0 6px; border: 4px solid var(--ol); border-radius: 24px; background: linear-gradient(180deg, #5b5470, #443e58); color: #fff; font-weight: 800; font-size: 21px; }
.pill canvas { width: 38px; height: 38px; border-radius: 9px; }
.pill.money { padding: 0 8px 0 16px; background: linear-gradient(180deg, #4b4463, #37314c); }
.pill.money .icon { width: 26px; height: 26px; }
.icon { width: 24px; height: 24px; display: block; }
.iconbtn { width: 46px; height: 46px; border: 4px solid var(--ol); border-radius: 50%; background: linear-gradient(180deg, #eceaf6, #c9c5dc); font-size: 24px; line-height: 1; padding: 0; }
.spacer { flex: 1; }

.road { position: absolute; left: 0; right: 0; top: 88px; display: flex; flex-direction: column; align-items: center; }
.arena-name { font-size: 34px; font-weight: 800; margin-bottom: 6px; }
.track { width: 312px; padding: 10px 0 6px; display: flex; flex-direction: column; gap: 10px; }
.step { display: grid; grid-template-columns: 1fr 76px 1fr; align-items: center; justify-items: center; }
.shield { width: 64px; height: 68px; display: grid; place-items: center; font-size: 30px; font-weight: 800; color: #fff; -webkit-text-stroke: 5px var(--ol); paint-order: stroke fill;
  background: linear-gradient(180deg, #a07be8, #7a55c9); border: 4px solid var(--ol); border-radius: 16px 16px 34px 34px; }
.step.done .shield { background: linear-gradient(180deg, #ffd15c, #f0a92e); }
.bubble-l, .bubble-r { width: 54px; height: 54px; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: #4a4166;
  background: linear-gradient(180deg, #ffffff, #dfe8f7); border: 4px solid var(--ol); border-radius: 16px; }
.step.done .bubble-l, .step.done .bubble-r { background: linear-gradient(180deg, #b9f08a, #79cf4e); color: #2f4a1d; }
.progress { position: relative; width: 300px; height: 42px; margin-top: 12px; border: 4px solid var(--ol); border-radius: 22px; background: #5a4b7c; overflow: hidden; display: grid; place-items: center; }
.progress i { position: absolute; left: 0; top: 0; bottom: 0; right: 0; transform-origin: left center; transform: scaleX(0); background: linear-gradient(180deg, #c99bff, #8f5ce0); transition: transform .6s cubic-bezier(.2,.9,.3,1); }
.progress span { position: relative; font-size: 23px; font-weight: 800; color: #fff; -webkit-text-stroke: 5px var(--ol); paint-order: stroke fill; }
.progress .tro { position: absolute; right: -2px; top: -2px; width: 42px; height: 42px; display: grid; place-items: center; }

.battle { position: absolute; left: 50%; bottom: 178px; transform: translateX(-50%); width: 330px; height: 92px;
  border: 5px solid var(--ol); border-radius: 26px; font-size: 46px; font-weight: 800; letter-spacing: 1px;
  background: linear-gradient(180deg, #ff8a8a 0%, #ef5561 60%, #d94450 100%); box-shadow: 0 8px 0 rgba(47,36,55,.35);
  animation: battlePulse 1.8s ease-in-out infinite; }
@keyframes battlePulse { 0%,100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.035); } }

.tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 132px; display: flex; align-items: flex-end; gap: 6px; padding: 0 8px 10px; }
.tab { flex: 1; height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 4px solid var(--ol); border-radius: 20px 20px 12px 12px; background: linear-gradient(180deg, #6f7cc9, #55609f); color: #fff; font-size: 19px; font-weight: 800; -webkit-text-stroke: 4px var(--ol); paint-order: stroke fill; }
.tab svg { width: 40px; height: 30px; }
.tab.on { height: 116px; background: linear-gradient(180deg, #ffd98a, #f0a93e); }

.ribbon-title { position: absolute; left: 50%; top: 92px; transform: translateX(-50%); padding: 4px 34px 8px; font-size: 32px; font-weight: 800; white-space: nowrap;
  background: linear-gradient(180deg, #ffe9a8, #f6c453); border: 4px solid var(--ol); border-radius: 22px; z-index: 3; }
.deckrow { position: absolute; left: 12px; right: 12px; top: 132px; display: flex; gap: 10px; justify-content: center; padding: 26px 12px 16px;
  background: linear-gradient(180deg, #ffdf95, #f3b950); border: 4px solid var(--ol); border-radius: 18px; }
.deckrow .ucard { width: 104px; }
.deckrow.five { gap: 7px; }
.deckrow.five .ucard { width: 88px; }
.deckrow .ucard .bits { display: none; }
.deckrow .ucard { aspect-ratio: 0.82; }
.ucard.spellcard { background: linear-gradient(180deg, #d6b0ff, #a870e8); }
.ucard.spellcard.locked { background: linear-gradient(180deg, #8d8296, #6a6076); }
.ucard.spellcard .nm { font-size: 12px; }
.ucard.spellcard .art { top: 4%; width: 86%; }
.modal .big.wide-art { width: 160px; height: 120px; }
.deckrow.small { position: static; background: none; border: none; padding: 6px 0; }
.deckrow.small .ucard { width: 84px; }
.grid { position: absolute; left: 12px; right: 12px; top: 300px; bottom: 142px; display: grid; grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: max-content; gap: 10px; overflow-y: auto; padding: 12px; background: rgba(32, 25, 48, 0.42); border: 4px solid var(--ol); border-radius: 18px; }
.screen.collection, .screen.rank { background: rgba(32, 25, 48, 0.35); }

.ucard { position: relative; aspect-ratio: 0.78; border: 4px solid var(--ol); border-radius: 14px; background: linear-gradient(180deg, #ff9aa2, #ef6b78);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; padding: 0 5px 9px; overflow: hidden; }
.ucard.r-rare { background: linear-gradient(180deg, #93c6ff, #5f95ee); }
.ucard.r-epic { background: linear-gradient(180deg, #d3a1ff, #a165e6); }
.ucard.r-legendary { background: linear-gradient(180deg, #ffe08a, #f0b13c); }
.ucard.locked { background: linear-gradient(180deg, #8d8296, #6a6076); }
.ucard .art { position: absolute; top: 9%; left: 50%; transform: translateX(-50%); width: 72%; height: auto; aspect-ratio: 1; }
.grid .ucard:not(.spellcard) .art { top: 6%; }
.ucard .nm { font-size: 15px; font-weight: 800; line-height: 1.1; color: #fff; -webkit-text-stroke: 4px var(--ol); paint-order: stroke fill; }
.ucard .lvl { position: absolute; top: 4px; left: 4px; padding: 0 6px; font-size: 13px; font-weight: 800; color: #4a3a18; background: #ffd98a; border: 3px solid var(--ol); border-radius: 9px; z-index: 2; }
.ucard .bits { position: relative; width: 90%; height: 20px; border: 3px solid var(--ol); border-radius: 7px; background: #4b3f57; overflow: hidden; }
.ucard .bits i { position: absolute; inset: 0; transform-origin: left center; background: linear-gradient(180deg, #9fd0ff, #5b9de8); }
.ucard .bits span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; -webkit-text-stroke: 3px var(--ol); paint-order: stroke fill; }
.ucard .up-arrow { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; color: #1e3d12;
  background: linear-gradient(180deg, #b9f08a, #6fcf4a); border: 3px solid var(--ol); border-radius: 8px; z-index: 2; }
.ucard .chains { position: absolute; inset: 0; display: grid; place-items: center; }
.ucard .chains .icon { width: 42px; height: 42px; }
.ucard.indeck { box-shadow: 0 0 0 4px #ffd24a; }

.modal-wrap { position: absolute; inset: 0; background: rgba(24, 18, 36, 0.6); display: grid; place-items: center; z-index: 40; }
.modal { width: 396px; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: linear-gradient(180deg, #bcd6ff, #8fb5f5); border: 5px solid var(--ol); border-radius: 26px; position: relative; }
.modal.wide { width: 440px; }
.modal .x { position: absolute; right: -10px; top: -12px; width: 46px; height: 46px; border: 4px solid var(--ol); border-radius: 50%; background: linear-gradient(180deg, #ff8a8a, #e2505c); color: #fff; font-size: 22px; font-weight: 800; }
.modal .big { width: 170px; height: 170px; }
.modal .title { font-size: 30px; font-weight: 800; }
.modal .stats { width: 84%; padding: 10px 14px; background: #fff; border: 4px solid var(--ol); border-radius: 16px; color: #3b3350; }
.modal .stats .row { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; }
.modal .stats .row.small { font-size: 18px; opacity: .8; }
.modal .stats .row i { font-style: normal; font-size: 17px; color: #2f9b4a; }
.modal .skills { width: 92%; display: flex; flex-direction: column; gap: 8px; }
.modal .skill { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; background: #fff; border: 4px solid var(--ol); border-radius: 14px; color: #3b3350; }
.modal .skill.on { background: linear-gradient(180deg, #f4ffe4, #d4f5a8); }
.modal .skill .what { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; text-align: left; }
.modal .skill .what b { font-size: 19px; font-weight: 800; line-height: 1.1; }
.modal .skill .what span { font-size: 14px; font-weight: 600; line-height: 1.2; opacity: .85; }
.modal .skill .learn { flex: none; display: flex; align-items: center; gap: 3px; height: 40px; padding: 0 10px; border: 4px solid var(--ol); border-radius: 12px; background: linear-gradient(180deg, #ffd98a, #f0a93e); color: #4a3a18; font-family: var(--font); font-size: 20px; font-weight: 800; }
.modal .skill .learn .icon { width: 20px; height: 20px; }
.modal .skill .learn.off { filter: grayscale(.6) brightness(.9); }
.modal .skill .got { flex: none; width: 40px; text-align: center; font-size: 24px; font-weight: 800; color: #2f9b4a; }
.pill.sp { background: linear-gradient(180deg, #6b4a2a, #523619); }
.modal .lvbar { position: relative; width: 84%; height: 30px; border: 4px solid var(--ol); border-radius: 15px; background: #4b3f57; overflow: hidden; }
.modal .lvbar i { position: absolute; inset: 0; transform-origin: left center; background: linear-gradient(180deg, #9fd0ff, #5b9de8); }
.modal .lvbar .l, .modal .lvbar .r { position: absolute; top: 0; bottom: 0; display: grid; place-items: center; font-size: 15px; font-weight: 800; color: #fff; }
.modal .lvbar .l { left: 8px; } .modal .lvbar .r { right: 10px; }
.modal .big-btn.up { height: 72px; font-size: 24px; gap: 2px; align-content: center; }
.modal .big-btn.up small { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 19px; }
.modal .big-btn.up small svg { width: 22px; height: 22px; vertical-align: 0; }
.name-input { width: 84%; height: 48px; border: 4px solid var(--ol); border-radius: 14px; font-family: var(--font); font-size: 24px; font-weight: 800; text-align: center; color: #3b3350; }

.big-btn { min-width: 230px; height: 62px; border: 4px solid var(--ol); border-radius: 18px; font-family: var(--font); font-size: 27px; font-weight: 800; color: #fff;
  -webkit-text-stroke: 5px var(--ol); paint-order: stroke fill; box-shadow: 0 6px 0 rgba(47,36,55,.3); display: grid; place-items: center; line-height: 1; }
.big-btn small { display: block; font-size: 17px; -webkit-text-stroke: 4px var(--ol); }
.big-btn small svg { width: 16px; height: 16px; vertical-align: -2px; }
.big-btn.green { background: linear-gradient(180deg, #b4ef7d, #6cc93f); }
.big-btn.blue { background: linear-gradient(180deg, #8fc0ff, #5a8ce8); }
.big-btn.red { background: linear-gradient(180deg, #ff9a9a, #e05460); }
.big-btn.orange { background: linear-gradient(180deg, #ffbf7a, #e0782f); }
.big-btn.off { filter: grayscale(.55) brightness(.85); }

.opt-row { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 250px; column-gap: 12px; align-items: center; }
.opt-row > .toggle { justify-self: start; }
.opt-row .seg { width: 250px; }
.opt-row .seg.wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt-row .seg.wrap .segbtn { min-width: 0; padding: 0 4px; font-size: 16px; }
.opt-row .lbl { font-size: 21px; font-weight: 800; color: #2f2437; white-space: nowrap; }
.toggle { min-width: 86px; height: 46px; border: 4px solid var(--ol); border-radius: 14px; background: #9a93ab; color: #fff; font-family: var(--font); font-size: 20px; font-weight: 800; }
.toggle.on { background: linear-gradient(180deg, #b4ef7d, #6cc93f); color: #23401a; }
.seg { display: flex; gap: 6px; }
.seg.wrap { flex-wrap: wrap; }
.segbtn { flex: 1; height: 42px; padding: 0 8px; white-space: nowrap; border: 4px solid var(--ol); border-radius: 12px; background: #e7e3f2; color: #3b3350; font-family: var(--font); font-size: 18px; font-weight: 800; }
.segbtn.on { background: linear-gradient(180deg, #ffd98a, #f0a93e); }

.ladder { position: absolute; left: 14px; right: 14px; top: 162px; bottom: 140px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 12px 4px 18px 0;
  -webkit-mask-image: linear-gradient(transparent 0, #000 14px, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(transparent 0, #000 14px, #000 calc(100% - 18px), transparent); }
.lrow { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 12px; border: 4px solid var(--ol); border-radius: 14px; background: linear-gradient(180deg, #6f7cc9, #5a66aa); color: #fff; font-size: 21px; font-weight: 800; }
.lrow.you { background: linear-gradient(180deg, #ffd98a, #f0a93e); color: #4a3a18; }
.lrow .pos { width: 34px; text-align: center; }
.lrow .av { width: 34px; height: 34px; border-radius: 8px; border: 3px solid var(--ol); }
.lrow .nm { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.vs-intro { position: absolute; inset: 0; overflow: hidden; z-index: 25; }
.vs-intro .side { position: absolute; left: -12%; right: -12%; height: 62%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.vs-intro .side.red { top: -9%; padding-top: 7%; background: linear-gradient(180deg, #ea6771, #d9525c); transform: rotate(-4.5deg); animation: halfInTop .42s cubic-bezier(.2,.9,.3,1) both; }
.vs-intro .side.blue { bottom: -9%; padding-bottom: 7%; background: linear-gradient(180deg, #7c8bf6, #6472e8); transform: rotate(-4.5deg); animation: halfInBottom .42s cubic-bezier(.2,.9,.3,1) both; }
.vs-intro .av { width: 104px; height: 104px; border: 5px solid var(--ol); border-radius: 22px; background: rgba(255,255,255,.28); }
.vs-intro .nm { font-size: 34px; font-weight: 800; }
.vs-intro .tr { display: flex; align-items: center; gap: 7px; font-size: 24px; font-weight: 800; color: #fff6d0; }
.vs-intro .tr .icon { width: 22px; height: 22px; vertical-align: -4px; }
.vs-intro .vs-word { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-56%) rotate(-4.5deg); font-size: 84px; font-weight: 800; font-style: italic; -webkit-text-stroke: 12px var(--ol); animation: vsIn .45s cubic-bezier(.2,1.5,.4,1) .12s both; }
@keyframes vsIn { from { transform: translate(-50%,-56%) rotate(-4.5deg) scale(2.3); opacity: 0; } to { transform: translate(-50%,-56%) rotate(-4.5deg); opacity: 1; } }
.vs-intro.open .side.red { animation: halfOutTop .3s cubic-bezier(.6,0,.8,.4) both; }
.vs-intro.open .side.blue { animation: halfOutBottom .3s cubic-bezier(.6,0,.8,.4) both; }
.vs-intro.open .vs-word { animation: vsOut .16s ease-in both; }
@keyframes vsOut { from { transform: translate(-50%,-56%) rotate(-4.5deg); } to { transform: translate(-50%,-56%) rotate(-4.5deg) scale(0); } }
@keyframes sideIn { from { transform: translateX(120px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sideInLeft { from { transform: translateX(-120px); opacity: 0; } to { transform: none; opacity: 1; } }

.results { background: rgba(47,36,55,.35); }
.results .panel { position: absolute; left: 40px; right: 40px; top: 250px; padding: 26px 20px; display: flex; flex-direction: column; align-items: center; gap: 18px;
  background: linear-gradient(180deg, #bcd6ff, #8fb5f5); border: 5px solid var(--ol); border-radius: 26px; animation: bubbleIn .4s cubic-bezier(.2,1.3,.4,1) both; }
.results .panel.win { background: linear-gradient(180deg, #ffe6a0, #f7c057); }
.results .banner { font-size: 54px; font-weight: 800; }
.rewards { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.rrow { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: rgba(255,255,255,.85); border: 4px solid var(--ol); border-radius: 14px; color: #3b3350; font-size: 22px; font-weight: 800; }
.rrow span { flex: 1; }
.rrow b.up { color: #2f9b4a; } .rrow b.down { color: #d4453f; }
.rrow .icon { width: 24px; height: 24px; }
.rrow .av { width: 36px; height: 36px; margin: -4px 0 -4px -6px; border: 3px solid var(--ol); border-radius: 9px; overflow: hidden; display: flex; align-items: center; justify-content: center; flex: none; }
.rrow .av canvas { width: 48px; height: 48px; flex: none; }
.rrow.unlock { background: linear-gradient(180deg, #fff3c4, #ffd98a); }
.rrow .eq { flex: none; height: 38px; padding: 0 14px; border: 4px solid var(--ol); border-radius: 12px; background: linear-gradient(180deg, #8fc0ff, #5a8ce8); color: #fff; font-family: var(--font); font-size: 18px; font-weight: 800; -webkit-text-stroke: 4px var(--ol); paint-order: stroke fill; }
.nextunit { display: flex; align-items: center; gap: 8px; margin-top: 10px; height: 46px; padding: 0 14px 0 6px; border: 4px solid var(--ol); border-radius: 24px; background: linear-gradient(180deg, #fff3c4, #ffd98a); color: #3b3350; font-size: 20px; font-weight: 800; }
.nextunit .av { width: 34px; height: 34px; border: 3px solid var(--ol); border-radius: 9px; overflow: hidden; display: flex; align-items: center; justify-content: center; flex: none; background: #fff; }
.nextunit .av canvas { width: 46px; height: 46px; flex: none; }
.nextunit .tro { width: 24px; height: 24px; display: grid; place-items: center; }
.nextunit .tro .icon { width: 22px; height: 22px; }
.ucard.locked.next .art { filter: grayscale(1) brightness(0.72); }

.offer.dragging { opacity: .22; pointer-events: none; transition: opacity .12s ease; }

.quitbtn { position: absolute; left: 20px; bottom: 56px; width: 46px; height: 46px; border: 4px solid var(--ol); border-radius: 12px;
  background: linear-gradient(180deg, #8d86a8, #6b6484); color: #fff; font-family: var(--font); font-size: 20px; font-weight: 800; }

/* trophy road prizes */
.step { grid-template-columns: 52px 76px 1fr; }
.step-label { font-size: 20px; font-weight: 800; color: #fff; -webkit-text-stroke: 4px var(--ol); paint-order: stroke fill; }
.prize { display: flex; align-items: center; gap: 4px; width: 140px; height: 46px; padding: 0 8px; justify-content: center; justify-self: end;
  border: 4px solid var(--ol); border-radius: 14px; background: linear-gradient(180deg, #6a6288, #4d4767); color: #fff; font-size: 18px; font-weight: 800; }
.step.done .prize { background: linear-gradient(180deg, #8d84b5, #6a6288); }
.prize.ready { background: linear-gradient(180deg, #b9f07f, #6fcf4a); color: #21400f; animation: prizePulse 1.1s ease-in-out infinite; }
.prize .icon { width: 20px; height: 20px; }
.prize .bit { width: 18px; height: 18px; }
.prize .tick { color: #b9f07f; }
.step.claimed .prize { background: linear-gradient(180deg, #4d4767, #3b3652); }
.step .prize.ready { background: linear-gradient(180deg, #b9f07f, #6fcf4a); color: #21400f; }
.progress .max { margin-left: 8px; padding: 0 7px; font-size: 16px; color: #4a3a18; -webkit-text-stroke: 0; background: #ffd98a; border: 3px solid var(--ol); border-radius: 9px; vertical-align: 2px; }
@keyframes prizePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* army peek */
.army { width: 92%; max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.arow { display: flex; align-items: center; gap: 10px; padding: 5px 10px; background: rgba(255,255,255,.9); border: 3px solid var(--ol); border-radius: 12px; color: #3b3350; font-size: 20px; font-weight: 800; }
.arow .av { width: 38px; height: 38px; border: 3px solid var(--ol); border-radius: 9px; }
.arow .nm { flex: 1; }
.arow .tier { color: #8a5cc8; }
