/* Optional custom font: drop a .woff2 at assets/fonts/game.woff2 and rebuild the manifest (falls back to system fonts) */

:root {
  --font: "GameFont", "Baloo 2", "Fredoka", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --panel1: #322a5e; --panel2: #1c1638; --line: #5a4d9c; --ink: #0d0a1f;
  --gold: #ffd24a; --gem: #6fe3ff; --txt2: #cfc8ee;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%; overflow: hidden; background: #07050f; color: #fff; font-family: var(--font);
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; touch-action: none;
}
#stage { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0; overflow: hidden; background: #120e24; }
#cv { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; display: block; cursor: crosshair; }
.hidden { display: none !important; }
button { font-family: var(--font); }
.ico { display: inline-block; width: 1em; height: 1em; vertical-align: -0.16em; object-fit: contain; }
.ico.emo { width: auto; height: auto; line-height: 1; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; font-style: normal; font-weight: 400; vertical-align: -0.08em; }

/* rarity colours */
.r-common { --rc: #aab6cc; --rg: rgba(170,182,204,.45); }
.r-rare { --rc: #4aa8ff; --rg: rgba(74,168,255,.6); }
.r-epic { --rc: #b86bff; --rg: rgba(184,107,255,.7); }
.r-legendary { --rc: #ffb02e; --rg: rgba(255,176,46,.8); }
.r-mythic { --rc: #ff4d6d; --rg: rgba(255,77,109,.85); }

/* ---------- buttons ---------- */
.btn {
  font: 900 22px var(--font); color: #fff; border: none; border-radius: 14px; padding: 10px 24px; cursor: pointer; position: relative; white-space: nowrap;
  background: linear-gradient(#6a9bff, #3a5fd9); box-shadow: 0 5px 0 #22367c, 0 9px 14px rgba(0,0,0,.4); text-shadow: 0 2px 0 rgba(0,0,0,.35);
  transition: transform .06s, filter .1s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #22367c; }
.btn.green { background: linear-gradient(#7bea6e, #2fae3f); box-shadow: 0 5px 0 #1a6626, 0 9px 14px rgba(0,0,0,.4); }
.btn.green:active { box-shadow: 0 1px 0 #1a6626; }
.btn.gold { background: linear-gradient(#ffe07a, #f39c1c); box-shadow: 0 5px 0 #96560a, 0 9px 14px rgba(0,0,0,.4); color: #3b2100; text-shadow: 0 1px 0 rgba(255,255,255,.45); }
.btn.gold:active { box-shadow: 0 1px 0 #96560a; }
.btn.red { background: linear-gradient(#ff7a7a, #d43a4a); box-shadow: 0 5px 0 #7c1a28, 0 9px 14px rgba(0,0,0,.4); }
.btn.red:active { box-shadow: 0 1px 0 #7c1a28; }
.btn.purple { background: linear-gradient(#c58bff, #7a3fe0); box-shadow: 0 5px 0 #44208a, 0 9px 14px rgba(0,0,0,.4); }
.btn.purple:active { box-shadow: 0 1px 0 #44208a; }
.btn.off, .btn:disabled { filter: grayscale(.85) brightness(.62); cursor: default; }
.btn.big { font-size: 38px; padding: 16px 64px; border-radius: 20px; letter-spacing: 2px; }
.btn.sm { font-size: 18px; padding: 7px 16px; border-radius: 11px; }
.pulse { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.025); filter: brightness(1.1); } }
.hbtn {
  pointer-events: auto; width: 60px; height: 48px; border-radius: 12px; border: 3px solid #5a4d9c; background: linear-gradient(#3a3070, #221a48);
  color: #fff; font: 900 21px var(--font); cursor: pointer; box-shadow: 0 4px 0 var(--ink);
}
.hbtn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

.panel { background: linear-gradient(170deg, #372e6c, #1e1842); border: 4px solid #7566cf; border-radius: 20px; box-shadow: 0 0 0 3px var(--ink), 0 9px 0 var(--ink), 0 18px 30px rgba(0,0,0,.55), inset 0 3px 0 rgba(255,255,255,.14); }
.bar { position: relative; height: 30px; border-radius: 10px; background: #150f2c; border: 3px solid #0a0718; overflow: hidden; box-shadow: 0 3px 0 rgba(0,0,0,.4); }
.bar > div:first-child { height: 100%; width: 100%; transform-origin: 0 50%; }
.bar.sm { height: 14px; border-width: 2px; border-radius: 7px; }
.barTxt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 900 18px var(--font); text-shadow: 0 2px 0 #000, 0 0 4px #000; }

/* ================= HUD ================= */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
#hpBox { position: absolute; left: 16px; top: 12px; display: flex; align-items: center; gap: 8px; font-size: 36px; }
#hpBox .bar { width: 290px; }
#hpFill { background: linear-gradient(#ff7b7b, #e02f47); }
#frenzyBox { position: absolute; left: 60px; top: 50px; width: 290px; height: 18px; border-radius: 9px; background: #150f2c; border: 2px solid #0a0718; overflow: hidden; }
#frenzyFill { height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #ff8a2a, #ffd84a); }
#frenzyBox span { position: absolute; inset: 0; text-align: center; font: 900 13px var(--font); letter-spacing: 3px; line-height: 14px; text-shadow: 0 1px 0 #000; }
#frenzyBox.on { box-shadow: 0 0 18px #ff8a2a; animation: pulse .4s infinite; }
#waveBox { position: absolute; left: calc(50% - 150px); top: 8px; width: 300px; text-align: center; }
#waveTxt { font: 900 30px var(--font); text-shadow: 0 3px 0 #000, 0 0 8px rgba(0,0,0,.8); letter-spacing: 1px; }
#waveFill { background: linear-gradient(90deg, #7bea6e, #d6ff7a); }
#stageTxt { font: 800 16px var(--font); color: var(--txt2); text-shadow: 0 2px 0 #000; margin-top: 3px; }
#bossBox { position: absolute; left: calc(50% - 260px); top: 96px; width: 520px; text-align: center; }
#bossName { font: 900 22px var(--font); color: #ff8fa3; text-shadow: 0 2px 0 #000; }
.bar.boss { height: 22px; border-color: #3a0a18; }
#bossFill { background: linear-gradient(#ff5c8a, #b3123f); }
#goldBox { position: absolute; right: 156px; top: 12px; min-width: 150px; height: 48px; padding: 0 16px 0 10px; display: flex; align-items: center; gap: 8px; font: 900 26px var(--font); color: var(--gold);
  background: rgba(13,10,31,.75); border: 3px solid #5a4d9c; border-radius: 12px; text-shadow: 0 2px 0 #000; }
#goldBox .ico { font-size: 30px; }
#btnSpeed { position: absolute; right: 84px; top: 12px; }
#btnPause { position: absolute; right: 14px; top: 12px; }
#comboBox { position: absolute; right: 24px; top: 84px; text-align: right; opacity: 0; transition: opacity .25s; }
#comboBox.on { opacity: 1; }
#comboN { font: 900 62px var(--font); line-height: 1; color: #ffd84a; text-shadow: 0 4px 0 #a34b00, 0 0 22px rgba(255,170,40,.8); }
#comboN.pop { animation: comboPop .18s; }
@keyframes comboPop { 0% { transform: scale(1.5) rotate(-6deg); } 100% { transform: scale(1); } }
#comboL { font: 900 20px var(--font); letter-spacing: 4px; text-shadow: 0 2px 0 #000; }
#spellBar { position: absolute; left: 16px; bottom: 12px; display: flex; gap: 10px; }
.slot { width: 72px; height: 72px; border-radius: 14px; border: 3px solid #5a4d9c; background: rgba(13,10,31,.8); position: relative; display: flex; align-items: center; justify-content: center; font-size: 42px; box-shadow: 0 4px 0 var(--ink); overflow: hidden; }
.slot.empty { opacity: .45; font-size: 26px; color: #6d62a8; font-weight: 900; }
.slot .cdm { position: absolute; inset: 0; background: conic-gradient(rgba(8,5,20,.72) calc(var(--cd, 0) * 360deg), transparent 0); }
.slot .lvl { position: absolute; right: 3px; bottom: 0; font: 900 17px var(--font); text-shadow: 0 2px 0 #000, 0 0 4px #000; }
.slot.ready { border-color: #fff; }
#smiteBox { position: absolute; right: 18px; bottom: 14px; width: 96px; height: 96px; border-radius: 50%; border: 4px solid #ffe45c; background: rgba(13,10,31,.8); display: flex; align-items: center; justify-content: center; font-size: 50px; box-shadow: 0 0 20px rgba(255,228,92,.6); overflow: hidden; }
#smiteBox.cd { border-color: #5a4d9c; box-shadow: none; }
#smiteBox.cd #smiteIco { opacity: .4; }
#smiteCd { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(rgba(8,5,20,.75) calc(var(--cd, 0) * 360deg), transparent 0); }
#smiteLbl { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font: 900 15px var(--font); letter-spacing: 1px; text-shadow: 0 2px 0 #000, 0 0 4px #000; }
#banner, #banner2 { position: absolute; left: 0; right: 0; text-align: center; font: 900 76px var(--font); letter-spacing: 4px; opacity: 0; pointer-events: none; white-space: nowrap; }
#banner { top: 170px; }
#banner2 { top: 268px; font-size: 56px; }
#banner.show, #banner2.show { animation: bannerIn 1.5s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes bannerIn { 0% { opacity: 0; transform: scale(2.4); } 14% { opacity: 1; transform: scale(1); } 75% { opacity: 1; transform: scale(1.04); } 100% { opacity: 0; transform: scale(1.1) translateY(-26px); } }
.b-wave { color: #fff; text-shadow: 0 5px 0 #2a1f66, 0 0 26px rgba(120,110,255,.9); }
.b-boss { color: #ff5c6e; text-shadow: 0 5px 0 #5a0a18, 0 0 30px rgba(255,40,60,.95); }
.b-horde { color: #ffb347; text-shadow: 0 5px 0 #6a2a00, 0 0 30px rgba(255,140,40,.9); }
.b-combo { color: #ffd84a; text-shadow: 0 4px 0 #a34b00, 0 0 26px rgba(255,190,40,.95); }
.b-frenzy { color: #ff8a2a; text-shadow: 0 5px 0 #6a1a00, 0 0 34px rgba(255,120,20,1); font-size: 84px !important; }
.b-win { color: #8affc1; text-shadow: 0 5px 0 #0a5a34, 0 0 30px rgba(80,255,170,.9); }
#hint { position: absolute; left: 340px; right: 140px; bottom: 26px; text-align: center; font: 800 24px var(--font); text-shadow: 0 2px 0 #000, 0 0 10px #000; animation: pulse 1.4s infinite; }

/* ================= MENU ================= */
#menu { position: absolute; inset: 0; z-index: 10; }
#topbar { position: absolute; left: 0; right: 0; top: 0; height: 70px; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: linear-gradient(rgba(13,10,31,.92), rgba(13,10,31,0)); }
#logoBox { flex: 1; font: 900 38px var(--font); letter-spacing: 4px; color: #f0dcff; text-shadow: 0 4px 0 #44208a, 0 0 22px rgba(192,123,255,.9); height: 60px; display: flex; align-items: center; }
#logoBox img { height: 58px; }
.cur { min-width: 150px; height: 46px; padding: 0 16px 0 10px; display: flex; align-items: center; gap: 8px; font: 900 25px var(--font); background: rgba(13,10,31,.8); border: 3px solid #5a4d9c; border-radius: 12px; text-shadow: 0 2px 0 #000; }
.cur .ico { font-size: 28px; }
#curGold { color: var(--gold); } #curGem { color: var(--gem); }
#page { position: absolute; left: 0; right: 0; top: calc(74px + (100% - 720px) / 2); bottom: calc(100px + (100% - 720px) / 2); }
#nav { position: absolute; left: 0; right: 0; bottom: 0; height: 96px; display: flex; justify-content: center; gap: 10px; padding: 27px 16px 11px; background: linear-gradient(rgba(13,10,31,0), rgba(13,10,31,.95) 40%); }
.navb { position: relative; width: 190px; height: 58px; border-radius: 16px; border: 3px solid #5a4d9c; background: linear-gradient(#3a3070, #221a48); color: #cfc8ee; font: 900 20px var(--font); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 5px 0 var(--ink); }
.navb .ni { font-size: 32px; }
.navb.on { background: linear-gradient(#ffd45c, #f09a1a); color: #3b2100; border-color: #fff3b0; transform: translateY(-3px); }
.badge { position: absolute; right: -6px; top: -8px; width: 26px; height: 26px; border-radius: 50%; background: #ff3b4e; border: 3px solid #fff; box-shadow: 0 0 12px #ff3b4e; animation: pulse .9s infinite; }
h2 { font: 900 28px var(--font); letter-spacing: 1px; text-shadow: 0 3px 0 rgba(0,0,0,.5); }
.sub { font: 700 18px var(--font); color: var(--txt2); }

/* --- home --- */
#homeWrap { position: absolute; left: 352px; right: 20px; top: 6px; bottom: 6px; display: flex; gap: 16px; }
#stageCard { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 34px 34px 32px; text-align: center; }
.stRow { display: flex; align-items: center; gap: 16px; width: 100%; justify-content: center; }
.stArrow { width: 56px; height: 56px; font-size: 28px; }
.stArrow.off { opacity: .25; pointer-events: none; }
#stName { font: 900 36px var(--font); text-shadow: 0 4px 0 rgba(0,0,0,.5); line-height: 1.05; }
#stNum { font: 900 19px var(--font); letter-spacing: 4px; color: var(--gold); }
#stPrev { width: 368px; height: 150px; border-radius: 14px; border: 3px solid #0a0718; background-size: cover; background-position: 60% 62%; position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
#stPrev .bossIco { font-size: 96px; filter: drop-shadow(0 6px 6px rgba(0,0,0,.6)); margin-bottom: 4px; }
#stPrev .lock { position: absolute; inset: 0; background: rgba(8,5,20,.8); display: flex; align-items: center; justify-content: center; font: 900 24px var(--font); gap: 10px; }
.best { font: 800 21px var(--font); color: var(--txt2); }
.best b { color: #fff; }
.prog { width: 368px; }
.prog > div:first-child { background: linear-gradient(90deg, #6a9bff, #c58bff); }
#homeSide { flex: 1.14; display: flex; flex-direction: column; gap: 12px; }
.sideCard { padding: 10px 34px; display: flex; align-items: center; gap: 14px; flex: 1; min-height: 0; }
.sideCard .big { font-size: 48px; width: 56px; text-align: center; flex: none; }
.sideCard .mid { flex: 1; min-width: 0; }
.sideCard .t { font: 900 21px var(--font); }
.sideCard .d { font: 700 16px var(--font); color: var(--txt2); line-height: 1.2; }
.sideCard .d b { color: var(--gold); }

/* --- generic page panel --- */
.pg { position: absolute; left: 20px; right: 20px; top: 2px; bottom: 4px; padding: 32px 34px 26px; display: flex; flex-direction: column; }
.pgHead { display: flex; align-items: baseline; gap: 16px; margin-bottom: 8px; }
/* --- upgrades --- */
#upGrid { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr); gap: 10px; min-height: 0; }
.upCard { background: rgba(13,10,31,.62); border: 3px solid #44397e; border-radius: 14px; padding: 8px 12px; display: flex; flex-direction: column; justify-content: space-between; min-height: 0; }
.upCard.can { border-color: #7bea6e; box-shadow: 0 0 14px rgba(123,234,110,.35); }
.upTop { display: flex; align-items: center; gap: 10px; }
.upTop .ic { font-size: 40px; width: 46px; text-align: center; }
.upTop .nm { font: 900 20px var(--font); line-height: 1.05; }
.upTop .lv { font: 800 16px var(--font); color: var(--gold); }
.upVal { font: 700 17px var(--font); color: var(--txt2); }
.upVal b { color: #8affc1; }
.upCard .btn { width: 100%; padding: 6px 8px; font-size: 20px; }
.bump { animation: bump .25s; }
@keyframes bump { 40% { transform: scale(1.07); filter: brightness(1.5); } }

/* --- gear --- */
#gearWrap { flex: 1; display: flex; gap: 14px; min-height: 0; }
#gearLeft { width: 300px; display: flex; flex-direction: column; gap: 8px; }
#slotGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gslot { height: 104px; border-radius: 14px; border: 3px solid var(--rc, #44397e); background: rgba(13,10,31,.62); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; position: relative; box-shadow: 0 0 12px var(--rg, transparent); }
.gslot .ic { font-size: 50px; line-height: 1.1; }
.gslot .sl { font: 800 15px var(--font); color: var(--txt2); letter-spacing: 1px; }
.gslot.empty .ic { opacity: .3; }
#gearStats { flex: 1; background: rgba(13,10,31,.62); border-radius: 14px; padding: 8px 12px; font: 700 16px var(--font); color: var(--txt2); overflow: hidden; line-height: 1.32; }
#gearStats b { color: #fff; float: right; }
#invGrid { flex: 1; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(4, 1fr); gap: 8px; min-height: 0; }
.tile { border-radius: 12px; border: 3px solid var(--rc); background: radial-gradient(circle at 50% 40%, var(--rg), rgba(13,10,31,.8) 75%); display: flex; align-items: center; justify-content: center; font-size: 48px; position: relative; cursor: pointer; min-height: 0; }
.tile.none { filter: grayscale(1) brightness(.45); }
.tile.sel { outline: 4px solid #fff; outline-offset: 1px; }
.tile .lv { position: absolute; left: 5px; bottom: 1px; font: 900 15px var(--font); text-shadow: 0 2px 0 #000, 0 0 4px #000; }
.tile .eq { position: absolute; right: 3px; top: 1px; font: 900 14px var(--font); color: #8affc1; text-shadow: 0 2px 0 #000; }
.tile .nw { position: absolute; left: 3px; top: 1px; font: 900 13px var(--font); color: #fff; background: #ff3b4e; border-radius: 6px; padding: 0 5px; }
.tile .up { position: absolute; right: 3px; bottom: 1px; font: 900 18px var(--font); color: #7bea6e; text-shadow: 0 2px 0 #000; animation: pulse .8s infinite; }
#gearDet { width: 300px; background: rgba(13,10,31,.62); border: 3px solid var(--rc, #44397e); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; text-align: center; }
#gearDet .ic { font-size: 76px; line-height: 1.05; filter: drop-shadow(0 0 16px var(--rg)); }
#gearDet .nm { font: 900 23px var(--font); line-height: 1.05; }
#gearDet .rr { font: 900 15px var(--font); letter-spacing: 3px; color: var(--rc); }
#gearDet .sts { flex: 1; font: 700 17px var(--font); color: var(--txt2); text-align: left; line-height: 1.3; }
#gearDet .sts b { color: #8affc1; float: right; }
#gearDet .cp { font: 800 16px var(--font); color: var(--txt2); }

/* --- chests --- */
#chestRow { flex: 1; display: flex; gap: 16px; min-height: 0; }
.chCard { flex: 1; background: rgba(13,10,31,.62); border: 3px solid #44397e; border-radius: 16px; padding: 12px 16px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; }
.chCard .ic { font-size: 150px; line-height: 1.1; filter: drop-shadow(0 8px 10px rgba(0,0,0,.6)); }
.chCard.ready .ic { animation: wobble 1.2s infinite; }
@keyframes wobble { 0%,60%,100% { transform: rotate(0) scale(1); } 70% { transform: rotate(-7deg) scale(1.07); } 80% { transform: rotate(7deg) scale(1.07); } 90% { transform: rotate(-4deg) scale(1.03); } }
.chCard .nm { font: 900 26px var(--font); }
.odds { font: 800 15px var(--font); display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.odds span { color: var(--rc); }
.chBtns { display: flex; flex-direction: column; gap: 9px; width: 100%; }
.chBtns .btn { width: 100%; }

/* --- quests --- */
#loginRow { display: flex; gap: 8px; margin-bottom: 12px; }
.lg { flex: 1; height: 124px; border-radius: 14px; border: 3px solid #44397e; background: rgba(13,10,31,.62); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 800 16px var(--font); position: relative; }
.lg .ic { font-size: 44px; line-height: 1.1; }
.lg.done { opacity: .45; }
.lg .dn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 64px; filter: drop-shadow(0 3px 0 #000); }
.lg.done:has(.dn) { opacity: 1; }
.lg.done:has(.dn) > :not(.dn) { opacity: .4; }
.lg.done:has(.dn)::after { content: none; }
.lg.done::after { content: "✔"; position: absolute; font-size: 60px; color: #7bea6e; text-shadow: 0 3px 0 #000; }
.lg.today { border-color: #ffd24a; box-shadow: 0 0 18px rgba(255,210,74,.6); cursor: pointer; animation: pulse 1s infinite; }
.qrow { display: flex; align-items: center; gap: 16px; background: rgba(13,10,31,.62); border: 3px solid #44397e; border-radius: 14px; padding: 9px 16px; margin-bottom: 9px; }
.qrow .qt { flex: 1; }
.qrow .t { font: 900 21px var(--font); }
.qrow .bar { height: 20px; margin-top: 5px; }
.qrow .bar > div:first-child { background: linear-gradient(90deg, #6a9bff, #c58bff); }
.qrow .barTxt { font-size: 14px; }
.qrow .rw { font: 900 22px var(--font); color: var(--gem); width: 90px; text-align: center; }

/* ================= OVERLAYS ================= */
.ov { position: absolute; inset: 0; z-index: 30; background: rgba(6,4,16,.86); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.ovTitle { font: 900 50px var(--font); letter-spacing: 3px; text-shadow: 0 5px 0 #2a1f66, 0 0 26px rgba(120,110,255,.9); }
.ovSub { font: 800 21px var(--font); color: var(--txt2); margin-top: -12px; }
/* cards */
.cardRow { display: flex; gap: 28px; perspective: 1400px; }
.card { width: 286px; height: 392px; border-radius: 22px; border: 5px solid var(--rc); background: linear-gradient(160deg, #3a2f6c, #171130); box-shadow: 0 0 34px var(--rg), 0 10px 0 #0a0718;
  display: flex; flex-direction: column; align-items: center; padding: 14px 18px 16px; cursor: pointer; position: relative; overflow: hidden;
  animation: cardIn .5s cubic-bezier(.2, 1.3, .4, 1) backwards; transition: transform .12s, box-shadow .12s; }
.card:nth-child(2) { animation-delay: .1s; } .card:nth-child(3) { animation-delay: .2s; }
.card:hover { transform: translateY(-14px) scale(1.04); box-shadow: 0 0 60px var(--rc), 0 10px 0 #0a0718; }
@keyframes cardIn { from { transform: translateY(160px) rotateY(100deg) scale(.5); opacity: 0; } }
.card .rar { font: 900 16px var(--font); color: var(--rc); letter-spacing: 3px; }
.card .art { font-size: 104px; height: 136px; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 0 20px var(--rc)); }
.card .nm { font: 900 27px var(--font); text-align: center; line-height: 1.05; text-shadow: 0 3px 0 rgba(0,0,0,.5); }
.card .tag { font: 900 15px var(--font); background: var(--rc); color: #120e24; border-radius: 10px; padding: 2px 12px; margin: 7px 0 9px; letter-spacing: 1px; }
.card .ds { font: 700 19px var(--font); color: #e3ddfb; text-align: center; line-height: 1.24; }
.card .el { position: absolute; left: 12px; top: 10px; font: 900 14px var(--font); padding: 1px 9px; border-radius: 9px; color: #120e24; }
.card::after { content: ""; position: absolute; top: -60%; left: -80%; width: 50%; height: 220%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent); transform: rotate(22deg); animation: shine 2.8s infinite; pointer-events: none; }
.card.r-common::after { display: none; }
@keyframes shine { 0%, 55% { left: -80%; } 100% { left: 140%; } }
.card.picked { animation: cardPick .42s forwards; z-index: 2; }
@keyframes cardPick { 40% { transform: scale(1.2); filter: brightness(1.8); } 100% { transform: scale(1.35) translateY(-30px); opacity: 0; filter: brightness(2.4); } }
.card.gone { transition: .25s; opacity: 0; transform: scale(.75) translateY(40px); pointer-events: none; }
.buildRow { display: flex; gap: 10px; align-items: center; font: 800 18px var(--font); color: var(--txt2); min-height: 44px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: rgba(13,10,31,.8); border: 2px solid #5a4d9c; border-radius: 10px; padding: 3px 10px; font: 900 19px var(--font); color: #fff; }
/* end */
.endPanel { width: 760px; padding: 20px 30px 24px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; animation: popIn .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes popIn { from { transform: scale(.6); opacity: 0; } }
.endTitle { font: 900 62px var(--font); letter-spacing: 4px; line-height: 1.05; }
.endTitle.win { color: #ffd84a; text-shadow: 0 5px 0 #a34b00, 0 0 30px rgba(255,190,40,.95); }
.endTitle.lose { color: #ff7b8a; text-shadow: 0 5px 0 #5a0a18, 0 0 26px rgba(255,40,60,.8); }
.endStats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; }
.endStats div { background: rgba(13,10,31,.62); border-radius: 12px; padding: 7px 4px; font: 700 16px var(--font); color: var(--txt2); }
.endStats b { display: block; font: 900 27px var(--font); color: #fff; }
.rewards { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.rw { min-width: 104px; padding: 8px 12px; border-radius: 14px; border: 3px solid var(--rc, #5a4d9c); background: rgba(13,10,31,.7); font: 900 21px var(--font); display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 0 16px var(--rg, transparent); }
.rw .ic { font-size: 44px; line-height: 1.1; }
.rw small { font: 800 14px var(--font); color: var(--txt2); }
.newBest { color: #8affc1; font: 900 22px var(--font); animation: pulse .8s infinite; }
.unlock { font: 900 22px var(--font); color: #ffd84a; background: rgba(255,216,74,.12); border: 2px dashed #ffd84a; border-radius: 12px; padding: 6px 18px; }
.tip { font: 700 18px var(--font); color: var(--txt2); }
.row { display: flex; gap: 16px; justify-content: center; align-items: center; }
/* pause */
.pausePanel { width: 620px; padding: 22px 30px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.cardList { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-height: 190px; overflow: hidden; }
/* chest opening */
#chestOv { background: rgba(8,5,20,.9); z-index: 40; }
.rays { position: absolute; left: 50%; top: 44%; width: 1100px; height: 1100px; margin: -550px 0 0 -550px; border-radius: 50%; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(var(--rc, #ffd24a) 0 8deg, transparent 8deg 20deg); -webkit-mask-image: radial-gradient(circle, #000 0, transparent 68%); mask-image: radial-gradient(circle, #000 0, transparent 68%);
  animation: spin 14s linear infinite; transition: opacity .4s; }
.rays.on { opacity: .34; }
@keyframes spin { to { transform: rotate(360deg); } }
.chBig { font-size: 210px; line-height: 1; cursor: pointer; filter: drop-shadow(0 14px 18px rgba(0,0,0,.7)); animation: chestIdle 1s ease-in-out infinite; position: relative; z-index: 1; }
.chBig img { width: 260px; height: 260px; }
@keyframes chestIdle { 50% { transform: translateY(-12px) scale(1.04); } }
.chBig.shake { animation: chestShake .6s linear; }
@keyframes chestShake { 0%,100% { transform: rotate(0); } 10%,30%,50%,70%,90% { transform: rotate(-9deg) scale(1.08); } 20%,40%,60%,80% { transform: rotate(9deg) scale(1.12); } }
.chBig.open { animation: chestPop .4s cubic-bezier(.2, 1.6, .4, 1); font-size: 130px; }
.chBig.open img { width: 170px; height: 170px; }
@keyframes chestPop { from { transform: scale(1.7); filter: brightness(3); } }
.loot { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; max-width: 1100px; min-height: 150px; position: relative; z-index: 1; }
.loot .rw { min-width: 132px; animation: lootIn .45s cubic-bezier(.2, 1.5, .4, 1) backwards; }
.loot .rw .ic { font-size: 62px; }
@keyframes lootIn { from { transform: translateY(-140px) scale(.2) rotate(-25deg); opacity: 0; filter: brightness(3); } }
.loot .rw.r-legendary, .loot .rw.r-mythic { animation: lootIn .45s cubic-bezier(.2, 1.5, .4, 1) backwards, pulse 1s .5s infinite; }
.spark { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--rc, #ffd24a); box-shadow: 0 0 12px var(--rc, #ffd24a); pointer-events: none; z-index: 2; animation: sparkFly .8s ease-out forwards; }
@keyframes sparkFly { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
/* popup + toast */
#popOv { z-index: 50; }
.popPanel { min-width: 480px; max-width: 760px; padding: 24px 34px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; animation: popIn .35s cubic-bezier(.2, 1.4, .4, 1); }
.popPanel .bigIc { font-size: 90px; line-height: 1; }
.popPanel p { font: 700 21px var(--font); color: var(--txt2); line-height: 1.3; }
.popPanel p b { color: var(--gold); }
#toast { position: absolute; left: 50%; top: 96px; transform: translateX(-50%); z-index: 60; background: rgba(13,10,31,.95); border: 3px solid #ffd24a; border-radius: 14px; padding: 10px 26px; font: 800 21px var(--font); box-shadow: 0 6px 20px rgba(0,0,0,.6); animation: toastIn 2.8s forwards; pointer-events: none; white-space: nowrap; }
@keyframes toastIn { 0% { opacity: 0; margin-top: -30px; } 8%, 85% { opacity: 1; margin-top: 0; } 100% { opacity: 0; margin-top: -14px; } }
/* loading */
#loading { position: absolute; inset: 0; z-index: 100; background: radial-gradient(circle at 50% 40%, #3a2a7a, #0b0816 75%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.ldTitle { font: 900 96px var(--font); letter-spacing: 10px; color: #f0dcff; text-shadow: 0 7px 0 #44208a, 0 0 40px rgba(192,123,255,.9); }
.ldSub { font: 800 26px var(--font); letter-spacing: 6px; color: var(--txt2); margin-bottom: 30px; }
.ldBar { width: 420px; height: 20px; border-radius: 10px; background: #150f2c; border: 3px solid #0a0718; overflow: hidden; }
#ldFill { height: 100%; width: 0; background: linear-gradient(90deg, #6a9bff, #c58bff); transition: width .15s; }

/* ================= v2: clearer windows, skill tree, gear rows, tutorial ================= */
.winHead { align-self: stretch; margin: -24px -34px 6px; padding: 10px 20px 12px; text-align: center; font: 400 46px var(--font); letter-spacing: 3px; color: #fff;
  background: linear-gradient(#6c5bd0, #43349a); border-bottom: 4px solid var(--ink); border-radius: 15px 15px 0 0; text-shadow: 0 4px 0 rgba(0,0,0,.45); }
.winHead.win { background: linear-gradient(#ffcf4a, #e58a12); color: #3b2100; text-shadow: 0 2px 0 rgba(255,255,255,.5); }
.winHead.lose { background: linear-gradient(#e0566a, #9c2440); }
.endPanel { padding: 24px 34px 26px; width: 800px; }
.pausePanel { padding: 24px 34px 26px; }
.popPanel { padding: 24px 34px 26px; }
.secLbl { font: 400 16px var(--font); letter-spacing: 4px; color: #a99fe6; margin-bottom: -4px; }
.bigAmt { font: 400 46px var(--font); color: var(--gold); text-shadow: 0 3px 0 #000; }
.bigAmt .ico { font-size: 46px; }
.popPanel .bigIc { font-size: 110px; }
.tutNote { font: 400 26px var(--font); color: #3b2100; background: linear-gradient(#ffe07a, #f3a51c); border: 4px solid var(--ink); border-radius: 14px; padding: 8px 26px; margin-top: -8px; box-shadow: 0 5px 0 var(--ink); animation: pulse 1.2s infinite; }
.navb .ni { font-size: 40px; display: flex; }
.pgHead h2 .ico { font-size: 34px; }
.pgHead .sub { font-size: 19px; color: #ded8fb; }
.rw { font-size: 22px; }

/* --- skill tree --- */
#treeBox { display: contents; }
#treeWrap { flex: 1; display: flex; gap: 14px; min-height: 0; }
#tree { position: relative; width: 882px; height: 418px; flex: none; margin-top: 6px; }
#tree svg { position: absolute; left: 0; top: 0; width: 882px; height: 418px; pointer-events: none; }
#tree path { fill: none; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 2 12; opacity: .6; }
#tree path.on { stroke-dasharray: none; opacity: 1; }
.trunkIc { position: absolute; left: 4px; top: 162px; width: 72px; height: 96px; font-size: 90px; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 4px 4px rgba(0,0,0,.6)); }
.trunkIc img { width: 72px; height: 96px; }
.brLbl { position: absolute; font: 400 15px var(--font); letter-spacing: 3px; text-shadow: 0 2px 0 #000; }
.node { position: absolute; width: 190px; height: 60px; border-radius: 16px; border: 4px solid var(--bc); background: linear-gradient(#3a3074, #1c1640); display: flex; align-items: center; gap: 8px; padding: 0 8px 0 6px; cursor: pointer; box-shadow: 0 5px 0 var(--ink); transition: transform .08s; }
.node:hover { transform: translateY(-2px); }
.node .nic { font-size: 46px; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; flex: none; position: relative; }
.node .nlock { position: absolute; right: -6px; bottom: -6px; font-size: 26px; display: flex; }
.node .ntx { flex: 1; min-width: 0; }
.node .nnm { font: 400 18px var(--font); line-height: 1.02; }
.node .nlv { font: 400 16px var(--font); color: var(--gold); }
.node.locked { border-color: #4a4470; background: linear-gradient(#2a2748, #17142c); }
.node.locked .nic > .ico:first-child { filter: grayscale(1) brightness(.55); }
.node.locked .nnm { color: #9b95bd; } .node.locked .nlv { color: #8a84ad; }
.node.can { box-shadow: 0 5px 0 var(--ink), 0 0 0 3px #7bea6e, 0 0 20px #7bea6e; }
.node.max { border-color: #ffd24a; }
.node.max .nlv { color: #7bea6e; }
.node.sel { outline: 4px solid #fff; outline-offset: 3px; }
#upDet { flex: 1; min-width: 0; background: rgba(13,10,31,.6); border: 4px solid var(--bc); border-radius: 16px; padding: 12px 14px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin-top: 6px; }
#upDet .brTag { font: 400 15px var(--font); letter-spacing: 4px; color: #120e24; background: var(--bc); border-radius: 9px; padding: 1px 14px; }
#upDet .ic { font-size: 96px; line-height: 1; height: 100px; display: flex; align-items: center; filter: drop-shadow(0 0 16px var(--bc)); }
#upDet .nm { font: 400 28px var(--font); line-height: 1; }
#upDet .inf { font: 400 18px var(--font); color: #ded8fb; line-height: 1.2; min-height: 44px; }
#upDet .val { width: 100%; background: rgba(0,0,0,.35); border-radius: 12px; padding: 7px 6px; font: 400 24px var(--font); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 8px; }
#upDet .val span { width: 100%; font-size: 16px; color: #a99fe6; letter-spacing: 1px; }
#upDet .val i { font-style: normal; color: #a99fe6; }
#upDet .val .nx { color: #7bea6e; }
#upDet .lvl { font: 400 17px var(--font); color: var(--gold); }
#upDet .btn { width: 100%; margin-top: auto; font-size: 24px; padding: 12px 8px; }
#upDet .need { font: 400 15px var(--font); color: #ff9aa6; }
#upDet .lockMsg { margin-top: auto; width: 100%; background: rgba(0,0,0,.4); border: 3px dashed #6a629a; border-radius: 12px; padding: 10px; font: 400 18px var(--font); color: #ded8fb; line-height: 1.25; }
#upDet .lockMsg b { color: var(--gold); } #upDet .lockMsg span { color: #a99fe6; font-size: 15px; }

/* --- gear rows --- */
#gearRows { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.grow { flex: 1; display: flex; gap: 10px; align-items: stretch; background: rgba(13,10,31,.5); border-radius: 14px; padding: 6px 8px; min-height: 0; }
.glabel { width: 196px; display: flex; align-items: center; gap: 10px; flex: none; }
.glabel .gic { font-size: 50px; width: 56px; display: flex; justify-content: center; }
.grole { font: 400 21px var(--font); color: var(--gold); line-height: 1; }
.gname { font: 400 16px var(--font); color: #ded8fb; }
.gtiles { flex: 1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; min-height: 0; }
.tile { font-size: 62px; }
.tile.none .ico { opacity: .55; }
.tile .qm { position: absolute; right: 6px; bottom: 0; font: 400 22px var(--font); color: #fff; }
.tile.eqd { box-shadow: 0 0 0 3px #7bea6e, 0 0 16px #7bea6e; }
.tile .eq { position: absolute; left: 0; right: 0; top: 0; text-align: center; font: 400 12px var(--font); letter-spacing: 1px; color: #0c2a10; background: #7bea6e; border-radius: 8px 8px 0 0; text-shadow: none; }
.tile .nw { top: auto; bottom: 20px; }
#gearDet { width: 310px; }
#gearDet .ic { font-size: 92px; height: 96px; display: flex; align-items: center; justify-content: center; }
#gearDet .slotInfo { font: 400 15px var(--font); color: #ded8fb; background: rgba(0,0,0,.35); border-radius: 10px; padding: 6px 8px; line-height: 1.2; text-align: left; }
#gearDet .slotInfo b { color: var(--gold); }
#gearDet .sts { font-size: 18px; }

/* --- tutorial pointer --- */
#tut { position: absolute; inset: 0; z-index: 70; pointer-events: none; }
#tutRing { position: absolute; border-radius: 50%; border: 6px solid #ffe45c; transform: translate(-50%, -50%); box-shadow: 0 0 24px #ffe45c, inset 0 0 18px rgba(255,228,92,.6); animation: tutRing 1s ease-in-out infinite; }
@keyframes tutRing { 50% { transform: translate(-50%, -50%) scale(1.18); opacity: .65; } }
#tutHand { position: absolute; font-size: 84px; line-height: 1; filter: drop-shadow(0 5px 4px rgba(0,0,0,.7)); animation: tutHand .7s ease-in-out infinite; transform-origin: 0 0; }
#tutHand img { width: 96px; height: 96px; }
@keyframes tutHand { 50% { transform: translate(14px, 16px); } }
#tutBox { position: absolute; width: 480px; background: linear-gradient(#fff6d6, #ffe08a); border: 5px solid var(--ink); border-radius: 18px; padding: 12px 18px 10px; text-align: center; box-shadow: 0 7px 0 var(--ink), 0 14px 24px rgba(0,0,0,.5); }
#tutTxt { font: 400 27px var(--font); color: #2b1a00; line-height: 1.15; }
#tutSkip { pointer-events: auto; margin-top: 4px; background: none; border: none; font: 400 16px var(--font); color: #8a6a2a; text-decoration: underline; cursor: pointer; padding: 4px 10px; }

/* ================= small screens (phones, 800x450 iframes): raise the smallest text ================= */
body.small #stageTxt { font-size: 19px; }
body.small #smiteLbl { font-size: 18px; }
body.small .sub, body.small .pgHead .sub { font-size: 20px; }
body.small .sideCard .d { font-size: 18px; }
body.small .tile .lv { font-size: 19px; }
body.small .tile .eq { font-size: 15px; }
body.small .tile .nw { font-size: 16px; }
body.small #gearDet .rr, body.small #gearDet .slotInfo { font-size: 18px; }
body.small #gearDet .cp { font-size: 19px; }
body.small .odds { font-size: 18px; }
body.small .lg { font-size: 19px; }
body.small .qrow .barTxt { font-size: 17px; }
body.small .card .rar { font-size: 19px; }
body.small .card .tag { font-size: 17px; }
body.small .card .ds { font-size: 21px; }
body.small .rw small { font-size: 17px; }
body.small .endStats div { font-size: 19px; }
body.small .secLbl { font-size: 19px; }
body.small .tip { font-size: 20px; }
body.small .brLbl { font-size: 19px; }
body.small .node .nnm { font-size: 19px; }
body.small .node .nlv { font-size: 18px; }
body.small #upDet .brTag, body.small #upDet .val span, body.small #upDet .need, body.small #upDet .lockMsg span { font-size: 18px; }
body.small #upDet .lvl { font-size: 19px; }
body.small .gname { font-size: 18px; }
body.small #tutSkip { font-size: 19px; }
body.small .ovSub { font-size: 23px; }
.sideCard .opt { display: none; }   /* no room for a third line inside the painted frame */
body.small .node .nnm { font-size: 18px; line-height: 1; }

/* ================= full launch: ads, glyphs ================= */
.gl { font-family: "Segoe UI Symbol", "Apple Symbols", "DejaVu Sans", sans-serif; font-weight: 700; }
.ico.flip { transform: scaleX(-1); }
.adSvg { width: 1.25em; height: 1.25em; vertical-align: -0.28em; }
#adOv { z-index: 90; background: rgba(6,4,16,.92); }
.adSpin { width: 72px; height: 72px; border-radius: 50%; border: 8px solid rgba(255,255,255,.15); border-top-color: #c58bff; animation: spin .8s linear infinite; }
.btn.pair { min-width: 230px; }
.offerT { position: relative; width: 74px; height: 74px; }
.offerT svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.offerT circle { fill: none; stroke: rgba(255,255,255,.15); stroke-width: 4; }
#offerRing { stroke: #ffd24a; stroke-dasharray: 107; stroke-dashoffset: 0; animation: offerRing linear forwards; }
@keyframes offerRing { to { stroke-dashoffset: 107; } }
.offerT span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 400 30px var(--font); }
.ftime { font: 400 17px var(--font); color: var(--txt2); margin-bottom: -4px; }
.adNote { font-style: normal; color: #ff9aa6; }
#adX2 { margin-top: 2px; }
/* reward / loot tiles: keep text inside the painted frame */
.rw { min-width: 124px; padding: 12px 18px 14px; text-align: center; line-height: 1.08; }
.rw small { white-space: nowrap; }
.loot .rw { width: 168px; min-width: 0; padding: 12px 14px 14px; font-size: 20px; }
.loot .rw small { white-space: normal; line-height: 1.1; }
/* single-line labels that app.js shrinks until they fit (fitText) */
.fit { white-space: nowrap; }
/* battle cursor: always a clear reticle (white = Smite recharging); when Smite is ready it turns into a bigger glowing gold one */
#cv { cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'52'%20height%3D'52'%20viewBox%3D'0%200%2052%2052'%3E%3Cdefs%3E%3CradialGradient%20id%3D'g'%3E%3Cstop%20offset%3D'.55'%20stop-color%3D'%23ffd84a'%20stop-opacity%3D'.55'%2F%3E%3Cstop%20offset%3D'1'%20stop-color%3D'%23ffd84a'%20stop-opacity%3D'0'%2F%3E%3C%2FradialGradient%3E%3C%2Fdefs%3E%3Ccircle%20cx%3D'26'%20cy%3D'26'%20r%3D'25'%20fill%3D'url(%23g)'%2F%3E%3Cg%20fill%3D'none'%20stroke-linecap%3D'round'%3E%3Ccircle%20cx%3D'26'%20cy%3D'26'%20r%3D'15'%20stroke%3D'%232a1400'%20stroke-width%3D'6'%2F%3E%3Cpath%20d%3D'M26%203v10M26%2039v10M3%2026h10M39%2026h10'%20stroke%3D'%232a1400'%20stroke-width%3D'6'%2F%3E%3Ccircle%20cx%3D'26'%20cy%3D'26'%20r%3D'15'%20stroke%3D'%23ffd84a'%20stroke-width%3D'3.2'%2F%3E%3Cpath%20d%3D'M26%204v8M26%2040v8M4%2026h8M40%2026h8'%20stroke%3D'%23fff3b0'%20stroke-width%3D'3.2'%2F%3E%3C%2Fg%3E%3Cpath%20d%3D'M28.5%2016%2020%2028h6l-2.5%208%208.5-12h-6z'%20fill%3D'%23fff3b0'%20stroke%3D'%232a1400'%20stroke-width%3D'1.6'%20stroke-linejoin%3D'round'%2F%3E%3C%2Fsvg%3E") 26 26, crosshair; }
#cv.cd { cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'36'%20height%3D'36'%20viewBox%3D'0%200%2032%2032'%3E%3Cg%20fill%3D'none'%20stroke-linecap%3D'round'%3E%3Ccircle%20cx%3D'16'%20cy%3D'16'%20r%3D'10'%20stroke%3D'%230d0a1f'%20stroke-width%3D'5'%2F%3E%3Cpath%20d%3D'M16%201v7M16%2024v7M1%2016h7M24%2016h7'%20stroke%3D'%230d0a1f'%20stroke-width%3D'5'%2F%3E%3Ccircle%20cx%3D'16'%20cy%3D'16'%20r%3D'10'%20stroke%3D'%23ffffff'%20stroke-width%3D'2.5'%2F%3E%3Cpath%20d%3D'M16%202v6M16%2024v6M2%2016h6M24%2016h6'%20stroke%3D'%23ffffff'%20stroke-width%3D'2.5'%2F%3E%3C%2Fg%3E%3Ccircle%20cx%3D'16'%20cy%3D'16'%20r%3D'2.5'%20fill%3D'%23ffffff'%20stroke%3D'%230d0a1f'%20stroke-width%3D'1.5'%2F%3E%3C%2Fsvg%3E") 18 18, crosshair; }

/* QA pass 2: room between text and the painted frames (card frame 24px, tile frame 14px, panel frame 30px) */
.card { padding: 32px 28px 26px; }
.card .art { height: 118px; font-size: 92px; }
.rw { padding: 16px 18px 16px; }
.loot .rw { padding: 16px 16px 16px; }
.endPanel, .pausePanel, .popPanel { padding: 24px 38px 34px; }
.winHead { margin: -24px -38px 6px; }
/* HUD text over bright skies: dark outline all around */
#waveTxt, #stageTxt, #bossName, #comboL, #smiteLbl, #hint, #frenzyBox span { text-shadow: -2px -2px 0 #120612, 2px -2px 0 #120612, -2px 2px 0 #120612, 2px 2px 0 #120612, 0 -2px 0 #120612, 0 2px 0 #120612, -2px 0 0 #120612, 2px 0 0 #120612, 0 4px 6px rgba(0,0,0,.6); }
#bossName { color: #ffb3c1; letter-spacing: 1px; }
#adOv { animation: fadeIn .45s; }
#adTitle { margin-bottom: 6px; }
/* gear tiles: corner labels inside the painted 14px frame */
.gtiles .tile { font-size: 48px; }
.tile .lv { left: 13px; bottom: 14px; font-size: 14px; line-height: 1; }
.tile .qm, .tile .up { right: 13px; bottom: 14px; line-height: 1; }
.tile .qm { font-size: 18px; }
.tile .up { font-size: 16px; }
.tile .nw { left: 12px; top: 12px; bottom: auto; font-size: 11px; line-height: 1.3; }
.tile .eq { left: 12px; right: 12px; top: 12px; border-radius: 6px; font-size: 10px; line-height: 1.4; }
body.small .tile .lv { font-size: 16px; }
body.small .tile .eq { font-size: 12px; left: 10px; right: 10px; }
body.small .tile .nw { font-size: 13px; }
/* bars: room for the label */
.qrow .bar { height: 26px; }
#frenzyBox { height: 20px; }
#frenzyBox span { line-height: 16px; }
/* card offer: room above the row so a hovered (lifted) card never touches the subtitle */
.cardRow { margin-top: 26px; }
.card:hover { transform: translateY(-8px) scale(1.025); }
/* grey (unusable) buttons stay grey: no hover glow, no press colour, no press movement, whatever their colour class
   (doubled class beats the painted-kit rules that app.js adds later, e.g. .btn.purple:active) */
.btn.btn.off, .btn.btn.off:hover, .btn.btn.off:active, .btn.btn:disabled, .btn.btn:disabled:hover, .btn.btn:disabled:active {
  filter: grayscale(.85) brightness(.62) drop-shadow(0 5px 0 rgba(10,6,24,.85)); transform: none; animation: none; cursor: default;
}

/* ================= phones (body.small = the stage is drawn below 75% size): bigger touch UI (QA) ================= */
/* home side cards: use the empty space for bigger text and icons */
/* the panels take the whole width (over the decorative tower) and the cards column gets the larger share */
body.small #homeWrap { left: 20px; }
body.small #homeSide { flex: 1.55; }
body.small .sideCard { gap: 14px; padding: 4px 34px; }
body.small .sideCard .big { font-size: 58px; width: 64px; }
body.small .sideCard .t { font-size: 29px; line-height: 1.05; }
body.small .sideCard .d { font-size: 23px; line-height: 1.12; }
body.small .sideCard .btn.sm { font-size: 22px; }
/* pause menu and popups: bigger panel and buttons (they scale around the screen centre, the overlay centres them) */
body.small .pausePanel { transform: scale(1.45); }
body.small .popPanel { transform: scale(1.2); }
/* battle HUD: each corner group grows from its own screen corner */
body.small #hpBox { transform: scale(1.4); transform-origin: 0 0; }
body.small #frenzyBox { transform: scale(1.4); transform-origin: -44px -38px; }   /* same anchor as #hpBox (left 16, top 12) */
body.small #btnPause { transform: scale(1.4); transform-origin: 100% 0; }
body.small #btnSpeed { transform: scale(1.4); transform-origin: calc(100% + 70px) 0; }   /* anchor: right edge of #btnPause */
body.small #goldBox { transform: scale(1.4); transform-origin: calc(100% + 142px) 0; }
body.small #comboBox { top: 112px; }
body.small #waveBox { transform: scale(1.2); transform-origin: 50% 0; }
body.small #bossBox { top: 112px; }
body.small #spellBar { transform: scale(1.3); transform-origin: 0 100%; }
body.small #smiteBox { transform: scale(1.3); transform-origin: 100% 100%; }
body.small #hint { left: 460px; right: 190px; }   /* clear of the bigger spell bar and Smite button */
body.small #hpBox .bar, body.small #frenzyBox { width: 260px; }   /* the enlarged bars end before the wave box */

/* ---------------- portrait: phones held upright ---------------- */
body.portrait #hud::before { content: ''; position: absolute; left: 0; right: 0; top: var(--pt); bottom: 0; background: linear-gradient(#2a2150, #120e24 70%); border-top: 8px solid #c79a3e; box-shadow: 0 -6px 18px rgba(0,0,0,.6); }
body.portrait #hpBox { left: 14px; top: 16px; font-size: 44px; }
body.portrait #hpBox .bar { width: 420px; height: 42px; }
body.portrait #hpBox .barTxt { font-size: 26px; }
body.portrait #frenzyBox { left: 66px; top: 70px; width: 420px; height: 26px; }
body.portrait #frenzyBox span { font-size: 18px; line-height: 22px; }
body.portrait #btnPause, body.portrait #btnSpeed { top: 16px; transform: scale(1.3); transform-origin: 100% 0; }
body.portrait #btnPause { right: 14px; }
body.portrait #btnSpeed { right: 104px; }
body.portrait #goldBox { right: 14px; top: 110px; height: 58px; font-size: 34px; }
body.portrait #waveBox { left: 14px; top: 112px; width: 340px; }
body.portrait #waveTxt { font-size: 36px; }
body.portrait #stageTxt { font-size: 22px; }
body.portrait #bossBox { left: 30px; width: 660px; top: 196px; }
body.portrait #bossName { font-size: 30px; }
body.portrait .bar.boss { height: 30px; }
body.portrait #comboBox { right: 18px; top: 180px; }
body.portrait #banner { top: 300px; font-size: 58px; letter-spacing: 2px; }
body.portrait #banner2 { top: 376px; font-size: 44px; letter-spacing: 2px; }
body.portrait #spellBar { left: 24px; right: 24px; top: calc(var(--pt) + 30px); bottom: auto; justify-content: space-between; gap: 0; }
body.portrait .slot { width: 150px; height: 150px; font-size: 96px; border-radius: 22px; }
body.portrait .slot.empty { font-size: 48px; }
body.portrait .slot .lvl { font-size: 30px; right: 7px; }
body.portrait #smiteBox { left: calc(50% - 98px); right: auto; top: calc(var(--pt) + 204px); bottom: auto; width: 196px; height: 196px; font-size: 96px; }
body.portrait #smiteLbl { font-size: 28px; bottom: 16px; }
body.portrait #hint { left: 24px; right: 24px; top: auto; bottom: 14px; font-size: 28px; }
body.portrait .ovTitle { font-size: 54px; text-align: center; }
body.portrait .ovSub { font-size: 26px; text-align: center; margin-top: -8px; padding: 0 24px; }
body.portrait .cardRow { flex-direction: column; gap: 14px; margin-top: 8px; }
body.portrait .card { width: 660px; height: 204px; display: grid; grid-template-columns: 132px 1fr; grid-template-rows: auto auto auto 1fr; column-gap: 12px; justify-items: start; padding: 24px 32px; }
body.portrait .card:hover { transform: none; }
body.portrait .card .art { grid-column: 1; grid-row: 1 / 5; height: 100%; width: 132px; font-size: 100px; }
body.portrait .card .rar { grid-column: 2; font-size: 18px; }
body.portrait .card .nm { grid-column: 2; font-size: 31px; text-align: left; }
body.portrait .card .tag { grid-column: 2; font-size: 16px; margin: 3px 0 4px; }
body.portrait .card .ds { grid-column: 2; font-size: 22px; text-align: left; line-height: 1.12; }
body.portrait .buildRow { flex-wrap: wrap; justify-content: center; padding: 0 20px; }
body.portrait .pausePanel { width: 660px; gap: 18px; }
body.portrait .endPanel { width: 690px; }
body.portrait .buildRow { margin-top: 8px; gap: 12px; }
body.portrait .buildRow .btn[data-act=reroll] { flex: 0 0 auto; width: 520px; height: 84px; font-size: 34px; order: -1; }
body.portrait .chip { font-size: 24px; }

/* portrait menus */
body.portrait #menu::before { content: ''; position: absolute; left: 0; right: 0; top: var(--pt); bottom: 0; z-index: -1; background: linear-gradient(#2a2150, #120e24 40%); }
body.portrait #topbar { height: 78px; gap: 10px; padding: 0 12px; }
body.portrait #logoBox img { height: 50px; }
body.portrait .cur { min-width: 124px; height: 52px; font-size: 28px; padding: 0 10px 0 8px; }
body.portrait #page { left: 0; right: 0; top: 80px; bottom: 104px; }
body.portrait #nav { height: 102px; gap: 6px; padding: 9px 10px; background: #120e24; border-top: 4px solid #c79a3e; }
body.portrait .navb { flex: 1; width: auto; height: 84px; flex-direction: column; gap: 0; padding: 0; font-size: 22px; }
body.portrait .navb .ni { font-size: 42px; line-height: 1; }
body.portrait .pg { left: 8px; right: 8px; top: 0; bottom: 2px; padding: 30px 32px 28px; }
body.portrait .pgHead { flex-wrap: wrap; gap: 0 12px; margin-bottom: 8px; }
body.portrait h2 { font-size: 34px; }
body.portrait .sub { font-size: 22px; }
body.portrait .pg:has(#treeWrap) .pgHead .sub, body.portrait .pg:has(#gearWrap) .pgHead .sub { display: none; }
/* home */
body.portrait #homeWrap { left: 8px; right: 8px; top: auto; bottom: 2px; flex-direction: column; gap: 8px; }
body.portrait #stageCard { flex: none; gap: 12px; padding: 32px 38px 34px; }
body.portrait #stName { font-size: 44px; }
body.portrait #stNum { font-size: 22px; }
body.portrait .stRow > div { width: 400px !important; }
body.portrait .stArrow { width: 72px; height: 72px; font-size: 36px; }
body.portrait #stPrev, body.portrait .prog { width: 100%; }
body.portrait #stageCard > div:nth-child(3) { width: 100%; }
body.portrait #stPrev { height: 170px; }
body.portrait .best { font-size: 25px; }
body.portrait #stageCard .btn.big { font-size: 44px; width: 100%; }
body.portrait #homeSide { flex: none; gap: 6px; }
body.portrait .sideCard { flex: none; height: 118px; gap: 12px; padding: 4px 34px; }
body.portrait .sideCard .big { font-size: 56px; width: 62px; }
body.portrait .sideCard .t { font-size: 28px; line-height: 1.05; }
body.portrait .sideCard .d { font-size: 22px; line-height: 1.1; }
body.portrait .sideCard .btn.sm { font-size: 24px; }
/* skill tree */
body.portrait #treeWrap { flex-direction: column; gap: 10px; }
body.portrait #treeBox { display: block; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; }
body.portrait #tree { width: 620px; height: 800px; margin: 0 auto; }
body.portrait #tree svg { width: 620px; height: 800px; }
body.portrait .trunkIc { display: none; }
body.portrait .brLbl { font-size: 18px; letter-spacing: 1px; transform: translateY(-6px); }
body.portrait .node { width: 136px; height: 106px; flex-direction: column; justify-content: center; gap: 0; padding: 2px 6px; text-align: center; }
body.portrait .node .nic { font-size: 44px; height: 46px; }
body.portrait .node .ntx { flex: none; width: 100%; }
body.portrait .node .nnm { font-size: 21px; }
body.portrait .node .nlv { font-size: 19px; }
body.portrait #upDet { flex: none; margin: 0; display: grid; grid-template-columns: 110px 1fr; column-gap: 12px; row-gap: 4px; align-items: center; text-align: left; justify-items: start; }
body.portrait #upDet .brTag { grid-column: 1 / 3; font-size: 18px; }
body.portrait #upDet .ic { grid-column: 1; grid-row: 2 / 4; font-size: 96px; }
body.portrait #upDet .nm { grid-column: 2; font-size: 32px; }
body.portrait #upDet .inf { grid-column: 2; font-size: 22px; min-height: 0; }
body.portrait #upDet .val { grid-column: 1 / 3; font-size: 28px; }
body.portrait #upDet .val span { font-size: 20px; }
body.portrait #upDet .lvl { grid-column: 1 / 3; font-size: 22px; justify-self: center; }
body.portrait #upDet .btn { grid-column: 1 / 3; font-size: 30px; }
body.portrait #upDet .need, body.portrait #upDet .lockMsg { grid-column: 1 / 3; justify-self: stretch; text-align: center; font-size: 20px; }
/* gear */
body.portrait #gearWrap { flex-direction: column; gap: 8px; }
body.portrait #gearRows { flex: 1; width: 100%; min-height: 0; display: flex; flex-direction: column; gap: 4px; }
body.portrait .grow { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2px; width: 100%; }
body.portrait .glabel { width: auto; flex: none; display: flex; align-items: center; gap: 6px; }
body.portrait .glabel > div:last-child { display: flex; gap: 8px; align-items: baseline; }
body.portrait .gic { font-size: 26px; }
body.portrait .grole { font-size: 20px; }
body.portrait .gname { font-size: 18px; }
body.portrait .gtiles { flex: 1; gap: 6px; }
body.portrait .gtiles .tile { font-size: 46px; min-height: 76px; }
body.portrait .tile .lv { font-size: 18px; left: 10px; bottom: 10px; }
body.portrait .tile .eq { display: none; }   /* the equipped tile has its green frame; the detail panel says EQUIPPED */
body.portrait .tile .nw { font-size: 14px; }
body.portrait #gearDet { flex: none; width: 100%; height: 392px; align-content: start; display: grid; grid-template-columns: 120px 1fr 1fr; column-gap: 12px; row-gap: 4px; text-align: left; align-items: center; }
body.portrait #gearDet .rr { grid-column: 1 / 4; font-size: 18px; letter-spacing: 1px; }
body.portrait #gearDet .ic { grid-column: 1; grid-row: 2 / 5; font-size: 92px; }
body.portrait #gearDet .nm { grid-column: 2 / 4; font-size: 30px; }
body.portrait #gearDet .slotInfo { grid-column: 2 / 4; font-size: 19px; }
body.portrait #gearDet .sts { grid-column: 2 / 4; font-size: 21px; }
body.portrait #gearDet .cp { grid-column: 1 / 4; font-size: 20px; }
body.portrait #gearDet .btn { grid-column: 1 / 4; font-size: 28px; }
/* chests */
body.portrait #chestRow { flex-direction: column; gap: 8px; }
body.portrait .chCard { min-height: 0; display: grid; grid-template-columns: 160px 1fr; grid-template-rows: auto auto 1fr; column-gap: 12px; row-gap: 4px; align-items: center; text-align: left; padding: 10px 14px; }
body.portrait .chCard .ic { grid-column: 1; grid-row: 1 / 4; font-size: 130px; }
body.portrait .chCard .nm { grid-column: 2; font-size: 32px; }
body.portrait .chCard > div:nth-child(3) { grid-column: 2; }
body.portrait .chBtns { grid-column: 2; }
body.portrait .chBtns .btn { font-size: 26px; padding: 8px; }
body.portrait .odds { font-size: 20px; justify-content: flex-start; gap: 2px 8px; }
body.portrait .ftime { font-size: 20px; }
/* quests */
body.portrait #loginRow { gap: 4px; }
body.portrait .lg { font-size: 17px; height: 118px; min-width: 0; }
body.portrait .lg .ic { font-size: 42px; }
body.portrait .qrow { flex-wrap: wrap; gap: 8px 12px; }
body.portrait .qrow .qt { flex: 1 1 100%; }
body.portrait .qrow .t { font-size: 25px; }
body.portrait .qrow .bar { height: 28px; }
body.portrait .qrow .barTxt { font-size: 20px; }
body.portrait .qrow .rw { flex: 1; font-size: 26px; }
body.portrait .qrow .btn { font-size: 26px; min-width: 200px; }
/* popups */
body.portrait .popPanel { max-width: 690px; min-width: 0; }
body.portrait .popPanel p { font-size: 25px; }
body.portrait .loot { max-width: 690px; }
/* pause and end panels: stacked, thumb-sized buttons */
body.portrait .pausePanel .row, body.portrait .endPanel .row, body.portrait .popPanel .row { flex-direction: column; width: 100%; gap: 14px; }
body.portrait .pausePanel .row .btn, body.portrait .endPanel .row .btn, body.portrait .popPanel .row .btn { width: 100%; font-size: 34px; min-height: 84px; }
body.portrait .winHead { font-size: 44px; }
body.portrait .secLbl { font-size: 22px; }
body.portrait .endPanel { gap: 14px; }
body.portrait .endStats { grid-template-columns: repeat(2, 1fr); }
body.portrait .endStats div { font-size: 22px; }
body.portrait .endStats b { font-size: 36px; }
body.portrait .rw { font-size: 28px; }
body.portrait .rw .ic { font-size: 60px; }
body.portrait .rw small { font-size: 20px; }
body.portrait .tip { font-size: 24px; line-height: 1.15; }
body.portrait .newBest, body.portrait .unlock { font-size: 26px; }
body.portrait #endOv { overflow-y: auto; justify-content: center; touch-action: pan-y; }
body.portrait .loot .rw { width: 200px; font-size: 24px; }
body.portrait .rays { width: 900px; height: 900px; margin: -450px 0 0 -450px; }
body.portrait #tutTxt { font-size: 32px; }
body.portrait #tutSkip { font-size: 24px; }
/* big wave banners stay readable over any background on small screens: dark outline and a dark band behind */
body.small #banner, body.small #banner2, body.portrait #banner, body.portrait #banner2 { background: linear-gradient(90deg, transparent, rgba(10,6,24,.78) 18%, rgba(10,6,24,.78) 82%, transparent); padding: 4px 0 8px; }
body.small #banner[class*="b-"], body.small #banner2[class*="b-"], body.portrait #banner[class*="b-"], body.portrait #banner2[class*="b-"] { text-shadow: -3px -3px 0 #120612, 3px -3px 0 #120612, -3px 3px 0 #120612, 3px 3px 0 #120612, 0 -3px 0 #120612, 0 3px 0 #120612, -3px 0 0 #120612, 3px 0 0 #120612, 0 6px 0 #120612; }
body.portrait .loot .rw small { font-size: 16px; line-height: 1; }
body.portrait .loot .rw { width: 214px; padding: 14px 16px 24px; }
/* the shortest portrait screens: tighter home and chest pages */
@media (min-aspect-ratio: 10/17) {
  body.portrait #stPrev { height: 110px; }
  body.portrait .sideCard { height: 106px; padding: 2px 34px; }
  body.portrait .sideCard .t { font-size: 25px; line-height: 1; }
  body.portrait .sideCard .d { font-size: 19px; line-height: 1.05; }
  body.portrait .pg:has(#chestRow) .pgHead .sub { display: none; }
  body.portrait .glabel { display: none; }
}
body.portrait #homeSide { box-shadow: 0 -8px 0 #120e24; background: #120e24; }

/* ---------------- big update: tabs, spellbook, combos, ascension, achievements, daily battle ---------------- */
.tabs { display: flex; gap: 8px; margin: -8px 0 10px; flex: none; }
.tab { font: 400 17px var(--font); letter-spacing: 1px; color: #cfc6f5; background: rgba(13,10,31,.65); border: 3px solid #44397e; border-radius: 12px; padding: 6px 16px; cursor: pointer; }
.tab.on { color: #120e24; background: linear-gradient(#ffe07a, #f39c1c); border-color: #96560a; }
.tab.glow:not(.on) { box-shadow: 0 0 0 2px #7bea6e, 0 0 14px #7bea6e; animation: pulse 1s infinite; }
.pgHead .sub .dustN { color: #c9a8ff; }
/* element chip: dark text on the bright element colour (higher specificity than ".cmb span", which used to fade it) */
span.elc, .cmb span.elc, .rct span.elc { display: inline-block; font: 400 15px var(--font); letter-spacing: .5px; color: #120e24; background: var(--ec); border-radius: 8px; padding: 1px 9px; vertical-align: middle; line-height: 1.25; text-shadow: none; box-shadow: 0 2px 0 rgba(0,0,0,.45); }
/* spellbook */
#spWrap { flex: 1; display: flex; gap: 14px; min-height: 0; }
#spGrid { flex: 1.35; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: 10px; min-height: 0; }
.spt { position: relative; border-radius: 14px; border: 3px solid var(--ec); background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.12), rgba(13,10,31,.85) 72%); display: flex; align-items: center; justify-content: center; font-size: 56px; cursor: pointer; min-height: 0; }
.spt .ico { width: 64%; height: 64%; }
.spt.sel { outline: 4px solid #fff; outline-offset: 2px; }
.spt.locked { filter: grayscale(.9) brightness(.5); }
.spt .lv { position: absolute; right: 8px; bottom: 4px; font: 400 17px var(--font); color: #ffd36b; text-shadow: 0 2px 0 #000; display: flex; }
.spt .lv .ico { width: 22px; height: 22px; }
#spDet { flex: 1; min-width: 0; background: rgba(13,10,31,.6); border: 4px solid var(--ec); border-radius: 16px; padding: 10px 14px 12px; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; overflow: hidden; }
#spDet .ic { font-size: 70px; height: 76px; display: flex; align-items: center; filter: drop-shadow(0 0 14px var(--ec)); }
#spDet .ic .ico { width: 76px; height: 76px; }
#spDet .nm { font: 400 25px var(--font); line-height: 1; }
#spDet .inf { font: 400 16px var(--font); color: #ded8fb; line-height: 1.2; }
#spDet .mlv { font: 400 17px var(--font); color: var(--gold); }
#spDet .perks { width: 100%; background: rgba(0,0,0,.35); border-radius: 12px; padding: 6px 8px; font: 400 15px var(--font); color: #8a84ad; display: flex; flex-direction: column; gap: 2px; }
#spDet .perks .on { color: #7bea6e; } #spDet .perks i { font-style: normal; color: #ffd36b; }
.cmbs { width: 100%; display: flex; flex-direction: column; gap: 3px; }
.cmbH { font: 400 15px var(--font); color: #ffd36b; letter-spacing: 2px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.cmbH .ico { width: 22px; height: 22px; }
.cmb { font: 400 14px var(--font); color: #ded8fb; text-align: left; border-left: 4px solid var(--cc); padding-left: 8px; line-height: 1.25; }
.cmb b { color: var(--cc); } .cmb span { color: #a99fe6; }
#spDet .btn { width: 100%; margin-top: auto; font-size: 20px; padding: 10px 6px; }
#spDet .btn .ico { width: 1.1em; height: 1.1em; }
#spDet .lockMsg { margin-top: auto; width: 100%; background: rgba(0,0,0,.4); border: 3px dashed #6a629a; border-radius: 12px; padding: 8px; font: 400 17px var(--font); color: #ded8fb; }
#spDet .lockMsg b { color: var(--gold); }
/* combos list */
#rctList { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 12px; min-height: 0; }
.rct { background: rgba(13,10,31,.65); border: 3px solid var(--cc); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; box-shadow: inset 0 0 26px rgba(0,0,0,.4); min-height: 0; overflow: hidden; }
.rct .rn { font: 400 21px var(--font); color: var(--cc); letter-spacing: 1px; }
.rct .rf { font: 400 16px var(--font); color: #ded8fb; }
.rct .rd { font: 400 15px var(--font); color: #cfc6f5; line-height: 1.22; flex: 1; }
.rct .rs { display: flex; gap: 4px; font-size: 26px; flex-wrap: wrap; }
.rct .rs .ico { width: 34px; height: 34px; }
/* combo badge on a card */
/* combo badge on a card: inside the card, at the bottom, white text on a dark plate with a glowing reaction-coloured frame */
.card .combo { margin-top: auto; width: 100%; flex: none; display: flex; align-items: center; gap: 8px; background: rgba(8,5,20,.88); border: 3px solid var(--cc); border-radius: 12px; padding: 5px 8px; box-shadow: 0 0 14px var(--cc); text-align: left; line-height: 1.12; animation: comboGlow 1.1s infinite alternate; }
.card .combo .ico { width: 30px; height: 30px; flex: none; }
.card .combo b { display: block; font: 400 15px var(--font); color: var(--cc); letter-spacing: .5px; }
.card .combo span { display: block; font: 400 14px var(--font); color: #fff; }
.card.hasCombo .art { height: 100px; }
.card.hasCombo .tag { margin: 5px 0 6px; }
@keyframes comboGlow { from { box-shadow: 0 0 6px var(--cc); } to { box-shadow: 0 0 20px var(--cc); } }
/* ascension */
#ascWrap { flex: 1; display: flex; gap: 14px; min-height: 0; }
#ascGrid { flex: 1.3; display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(0, 1fr); gap: 10px; min-height: 0; }
#ascGrid .node { position: relative; width: auto; height: auto; min-height: 0; }
#ascSide { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
#ascSide #upDet { margin-top: 0; flex: 1; }
#ascSide #upDet .btn .ico { width: 1.1em; height: 1.1em; }
#ascBox { background: rgba(13,10,31,.7); border: 3px solid #c58bff; border-radius: 14px; padding: 10px 12px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
#ascBox .t { font: 400 19px var(--font); color: #ffd36b; display: flex; align-items: center; gap: 6px; }
#ascBox .d { font: 400 14px var(--font); color: #cfc6f5; line-height: 1.2; }
#ascBox .btn { width: 100%; font-size: 21px; }
/* achievements */
#achList { flex: 1; overflow-y: auto; min-height: 0; padding-right: 4px; touch-action: pan-y; }
.qrow.ach .aic { font-size: 40px; width: 50px; display: flex; justify-content: center; flex: none; }
.qrow.ach .aic .ico { width: 46px; height: 46px; }
.qrow.ach .ad { font-size: 15px; color: #a99fe6; }
.qrow.ach .arw { font: 400 17px var(--font); color: #ded8fb; width: 86px; text-align: center; line-height: 1.3; flex: none; }
.qrow.ach .arw .ico { width: 20px; height: 20px; vertical-align: -3px; }
.qrow.ach.done { opacity: .62; }
/* daily battle popup */
.twist { display: flex; align-items: center; gap: 12px; text-align: left; background: rgba(0,0,0,.35); border-radius: 12px; padding: 8px 12px; width: 100%; }
.twist > .ico, .twist > span:first-child { width: 46px; height: 46px; font-size: 40px; flex: none; }
.twist b { display: block; font: 400 20px var(--font); color: #ffd36b; }
.twist span { font: 400 16px var(--font); color: #ded8fb; }
.popPanel .dReward { font-size: 17px; }
.popPanel .dReward .ico { width: 1.2em; height: 1.2em; vertical-align: -4px; }
/* portrait */
body.portrait .tabs { margin: -14px 0 8px; gap: 6px; }
body.portrait .tab { flex: 1; font-size: 18px; padding: 8px 4px; }
body.portrait #spWrap, body.portrait #ascWrap { flex-direction: column; }
body.portrait #spGrid { flex: none; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 96px; }
body.portrait #spDet .inf { font-size: 18px; } body.portrait .cmb { font-size: 16px; } body.portrait #spDet .perks { font-size: 17px; }
body.portrait #spDet .btn { font-size: 24px; }
body.portrait #rctList { grid-template-columns: repeat(2, 1fr); }
body.portrait .rct .rd { font-size: 17px; }
body.portrait #ascGrid { flex: none; grid-auto-rows: 104px; }
body.portrait #ascGrid .node { flex-direction: row; text-align: left; justify-content: flex-start; padding: 4px 10px; }
body.portrait #ascGrid .node .ntx { width: auto; }
body.portrait #ascBox .d { font-size: 17px; } body.portrait #ascBox .t { font-size: 22px; }
body.portrait .qrow.ach { flex-wrap: nowrap; }
body.portrait .qrow.ach .qt { flex: 1; }
body.portrait .qrow.ach .ad { display: block; font-size: 17px; }
body.portrait .card.hasCombo { height: auto; min-height: 204px; grid-template-rows: auto auto auto auto auto; }
body.portrait .card .combo { grid-column: 2; margin-top: 6px; width: auto; max-width: 100%; }
body.portrait .card .combo b { font-size: 18px; } body.portrait .card .combo span { font-size: 17px; }
/* never squeeze a painted button in a column panel: its end caps are sized from its height */
#upDet .btn, #spDet .btn, #ascBox .btn, #gearDet .btn, .chBtns .btn { flex-shrink: 0; }
/* warnings and info popups */
.warnBox { width: 100%; background: rgba(120,20,40,.45); border: 3px solid #ff6b81; border-radius: 12px; padding: 10px 14px; font: 400 18px var(--font); color: #fff; line-height: 1.3; text-align: center; }
.warnBox b { color: #ffd36b; }
.popPanel .keep { font-size: 17px; }
.newBest.grey { color: #cfc6f5; animation: none; font-size: 19px; }
.infoBtn { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 3px solid #ffd36b; background: #2a2052; color: #ffd36b; font: 400 22px var(--font); line-height: 1; cursor: pointer; margin-left: auto; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 0 rgba(0,0,0,.5); }
.infoTxt { font-size: 19px; }
.infoList { width: 100%; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.infoList > div { background: rgba(0,0,0,.35); border-left: 4px solid #ffd36b; border-radius: 8px; padding: 8px 12px; font: 400 17px var(--font); color: #ded8fb; line-height: 1.3; }
.infoList b { color: #ffd36b; }
/* shards + ascension count in the top bar */
#curShard { color: #fff3c4; cursor: pointer; min-width: 0; }
#curShard .ascN { font: 400 17px var(--font); font-style: normal; color: #ffd36b; display: flex; align-items: center; gap: 2px; margin-left: 4px; padding-left: 8px; border-left: 2px solid #5a4d9c; }
#curShard .ascN .ico { width: 22px; height: 22px; }
body.portrait #curShard { min-width: 0; padding: 0 10px 0 6px; }
body.portrait .infoList > div { font-size: 20px; } body.portrait .warnBox { font-size: 21px; }
body.portrait .infoBtn { width: 46px; height: 46px; font-size: 26px; }

/* ascension side column on short screens (4:3): the detail shrinks its icon instead of pushing the box out of the panel */
body:not(.portrait) #ascSide { min-height: 0; }
body:not(.portrait) #ascSide #upDet { min-height: 0; overflow: hidden; gap: 4px; padding-top: 8px; padding-bottom: 10px; }
body:not(.portrait) #ascSide #upDet .ic { flex: 1 1 0; min-height: 34px; height: auto; max-height: 100px; }
body:not(.portrait) #ascSide #upDet .ic .ico { height: 100%; width: auto; max-height: 100px; }
body:not(.portrait) #ascBox { flex: none; }
/* daily quests scroll inside the panel when the screen is short */
#qList { flex: 1; min-height: 0; overflow-y: auto; touch-action: pan-y; padding-right: 4px; }
/* ascension in portrait (tall tablets too): compact detail (icon left, name + value right), the page scrolls if it must */
body.portrait #ascWrap { overflow-y: auto; touch-action: pan-y; }
body.portrait #ascGrid { grid-auto-rows: 88px; }
body.portrait #ascSide { flex: none; }
body.portrait #ascSide #upDet { flex: none; grid-template-columns: 96px 1fr; }
body.portrait #ascSide #upDet .ic { grid-column: 1; grid-row: 1 / 3; height: 88px; }
body.portrait #ascSide #upDet .ic .ico { width: 88px; height: 88px; }
body.portrait #ascSide #upDet .nm { grid-column: 2; grid-row: 1; align-self: end; }
body.portrait #ascSide #upDet .val { grid-column: 2; grid-row: 2; }
body.portrait #ascSide #upDet .btn { grid-column: 1 / 3; grid-row: 3; }
/* landscape home: the two columns share the width by their flex ratio only, a long title never widens them */
body:not(.portrait) #homeSide, body:not(.portrait) #stageCard { min-width: 0; flex-basis: 0; }

/* landscape: tabs + page note in one row, inside the painted frame */
.tabs { margin: 0 0 8px; align-items: center; }
.tab { padding: 5px 14px; }
.tabs .pgHead.inTabs { flex: 1; min-width: 0; margin: 0 0 0 10px; align-items: center; gap: 10px; }
.tabs .pgHead.inTabs .sub { font-size: 16px; line-height: 1.2; }
.tabs .pgHead.inTabs .infoBtn { width: 34px; height: 34px; font-size: 20px; }
#spDet { overflow-y: auto; }
/* sound switches */
.sndRow { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn.off2 { filter: grayscale(.85) brightness(.75) drop-shadow(0 5px 0 rgba(10,6,24,.85)); }
.noteIc { font-size: 1.15em; line-height: 1; }
body.portrait .sndRow .btn { font-size: 26px; min-height: 72px; flex: 1; }

/* challenges popup: daily + weekly rows with their own button */
.twist.chal { margin: 6px 0; }
.twist.chal > div { flex: 1; min-width: 0; }
.twist.chal .btn { flex-shrink: 0; }
/* portrait: daily / weekly twist rows and the challenge rows read at phone size */
body.portrait .twist { padding: 12px 16px; gap: 16px; }
body.portrait .twist > .ico, body.portrait .twist > span:first-child { width: 68px; height: 68px; font-size: 58px; }
body.portrait .twist b { font-size: 30px; }
body.portrait .twist span { font-size: 23px; line-height: 1.25; }
body.portrait .twist.chal .btn { font-size: 26px; min-height: 64px; padding: 0 22px; }
body.portrait .popPanel .dReward { font-size: 25px; }
body.portrait .popPanel .dReward small { font-size: 21px; }
/* landscape end screen: all rewards on one row (6 of them after a daily / weekly win with shards) so the panel never outgrows a phone */
body:not(.portrait) .endPanel .rewards { flex-wrap: nowrap; gap: 8px; width: 100%; }
body:not(.portrait) .endPanel .rw { min-width: 0; flex: 1 1 0; max-width: 132px; padding: 10px 6px 12px; font-size: 20px; }
body:not(.portrait) .endPanel .rw small { font-size: 14px; line-height: 1.05; }
/* portrait end screen: the 6 rewards of a daily / weekly win on one row too (two rows pushed the panel off a tablet) */
body.portrait .endPanel .rewards { flex-wrap: nowrap; gap: 8px; width: 100%; }
body.portrait .endPanel .rw { min-width: 0; flex: 1 1 0; max-width: 150px; padding: 10px 4px 12px; font-size: 24px; }
body.portrait .endPanel .rw .ic { font-size: 50px; }
body.portrait .endPanel .rw small { font-size: 16px; line-height: 1.05; }
