.setting-row select[data-uiscale] { font: inherit; font-size: 13px; padding: 5px 8px; border-radius: 8px; background: #191f38; color: var(--ivory); border: 1px solid var(--gold); }

.arena.stage.packed .pack { right: 2%; }
.oath-banner { margin: 6px auto 12px; max-width: 560px; padding: 10px 14px; border-radius: 12px; background: linear-gradient(180deg, rgba(201,161,59,.22), rgba(201,161,59,.08));
  border: 1px solid var(--gold); text-align: left; display: grid; gap: 3px; animation: relicPop .6s cubic-bezier(.3,1.6,.5,1); }
.oath-banner b { font-family: var(--font-display); color: var(--gold-2); font-size: 17px; }
.oath-banner span { color: var(--ink-2, #e9e0cb); font-size: 13px; }
.oath-banner em { color: #bff0cb; font-style: normal; font-size: 13px; }

.event-scene.rolled { aspect-ratio: 1600 / 420; background-position: center 30%; }
/* v41 run unlocks */
.unlock-list { max-width: 620px; margin: 14px auto 0; text-align: left; }
.unlock-list h3 { margin: 0 0 8px; font-family: var(--font-display); color: var(--gold-2); font-size: 18px; text-align: center; }
.unlock-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.unlock-list li { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px;
  background: rgba(201,161,59,.08); border: 1px solid rgba(201,161,59,.35); }
.ul-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: #ede3ca; box-shadow: inset 0 0 0 2px #0b1127; overflow: hidden; }
.ul-ico img { width: 86%; height: 86%; object-fit: contain; }
.ul-txt { display: grid; gap: 2px; }
.ul-txt b { color: var(--ivory); font-size: 14px; }
.ul-gets { color: #bff0cb; font-size: 13px; }
.ul-txt small { color: var(--muted); font-size: 12px; line-height: 1.35; }
/* v41 gambler's dice */
.dice-table { position: relative; height: 170px; display: flex; justify-content: center; align-items: flex-end; gap: 46px; margin: 8px auto 4px; perspective: 700px; }
.die { position: relative; width: 84px; height: 84px; }
.die .cube { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--fx)) rotateY(var(--fy)); }
.df { position: absolute; inset: 0; background: #ede3ca; border: 3px solid #0b1127; border-radius: 14px; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 10px;
  box-shadow: inset 0 0 0 3px #e3ce99, inset 0 -6px 10px rgba(19,30,76,.25); backface-visibility: hidden; }
.df i { display: block; margin: auto; width: 15px; height: 15px; border-radius: 50%; }
.df i.p { background: #0b1127; box-shadow: inset 0 2px 0 rgba(255,255,255,.18); }
.df.f1 i.p { background: var(--claw); width: 19px; height: 19px; }
.df.f1 { transform: translateZ(42px); } .df.f6 { transform: rotateY(180deg) translateZ(42px); }
.df.f3 { transform: rotateY(90deg) translateZ(42px); } .df.f4 { transform: rotateY(-90deg) translateZ(42px); }
.df.f5 { transform: rotateX(90deg) translateZ(42px); } .df.f2 { transform: rotateX(-90deg) translateZ(42px); }
.die-shadow { position: absolute; left: 6%; right: 6%; bottom: -12px; height: 12px; border-radius: 50%; background: var(--shade-45); filter: blur(3px); }
.dice-table.rolling .die { animation: dieHop 1.45s cubic-bezier(.3,.6,.4,1) both; }
.dice-table.rolling .die.d1 { animation-delay: .08s; }
.dice-table.rolling .cube { animation: dieSpin 1.45s cubic-bezier(.2,.7,.3,1) both; }
.dice-table.rolling .d1 .cube { animation-name: dieSpin2; animation-delay: .08s; }
.dice-table.rolling .die-shadow { animation: dieShadow 1.45s cubic-bezier(.3,.6,.4,1) both; }
.dice-table.rolling .d1 .die-shadow { animation-delay: .08s; }
@keyframes dieHop { 0% { transform: translate(-190px, -110px); } 30% { transform: translate(-70px, 0); } 45% { transform: translate(-30px, -46px); }
  62% { transform: translate(-6px, 0); } 74% { transform: translate(0, -14px); } 86%, 100% { transform: translate(0, 0); } }
@keyframes dieSpin { 0% { transform: rotateX(calc(var(--fx) + 900deg)) rotateY(calc(var(--fy) + 540deg)) rotateZ(160deg); }
  62% { transform: rotateX(calc(var(--fx) + 180deg)) rotateY(calc(var(--fy) + 90deg)) rotateZ(20deg); } 100% { transform: rotateX(var(--fx)) rotateY(var(--fy)) rotateZ(0deg); } }
@keyframes dieSpin2 { 0% { transform: rotateX(calc(var(--fx) - 720deg)) rotateY(calc(var(--fy) + 720deg)) rotateZ(-140deg); }
  62% { transform: rotateX(calc(var(--fx) - 90deg)) rotateY(calc(var(--fy) + 180deg)) rotateZ(-16deg); } 100% { transform: rotateX(var(--fx)) rotateY(var(--fy)) rotateZ(0deg); } }
@keyframes dieShadow { 0% { opacity: 0; transform: scale(.5); } 30%, 62%, 100% { opacity: 1; transform: scale(1); } 45%, 74% { opacity: .5; transform: scale(.8); } }
.dice-result { text-align: center; display: grid; gap: 4px; margin: 10px auto 4px; opacity: 0; animation: diceSay .45s ease 1.5s forwards; }
.dice-result b { font-family: var(--font-display); font-size: 30px; letter-spacing: .02em; }
.dice-result.win b { color: var(--gold-2); text-shadow: 0 0 18px rgba(201,161,59,.55); }
.dice-result.lose b { color: #e8705a; }
.dice-result span { font-size: 15px; color: var(--ivory); }
.dice-result.lose span { color: #ff9b86; font-weight: 700; font-size: 18px; }
.dice-go { opacity: 0; pointer-events: none; animation: diceGo .3s ease 1.7s forwards; }
.dice-result.now, .dice-go.now { opacity: 1; animation: none; pointer-events: auto; }
@keyframes diceSay { from { opacity: 0; transform: translateY(8px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes diceGo { to { opacity: 1; pointer-events: auto; } }
@media (max-width: 680px) { .dice-table { height: 140px; gap: 34px; } .die { width: 64px; height: 64px; } .df { padding: 7px; border-radius: 11px; }
  .df i { width: 11px; height: 11px; } .df.f1 i.p { width: 15px; height: 15px; }
  .df.f1 { transform: translateZ(32px); } .df.f6 { transform: rotateY(180deg) translateZ(32px); } .df.f3 { transform: rotateY(90deg) translateZ(32px); }
  .df.f4 { transform: rotateY(-90deg) translateZ(32px); } .df.f5 { transform: rotateX(90deg) translateZ(32px); } .df.f2 { transform: rotateX(-90deg) translateZ(32px); } }
/* v41 leftover energy popup */
#endWarn { position: fixed; inset: 0; z-index: 9000; display: none; place-items: center; background: rgba(4,7,17,.45); }
#endWarn.show { display: grid; animation: ewIn .18s ease; }
.ew-box { position: relative; width: min(400px, calc(100% - 32px)); padding: 20px 20px 16px; border-radius: 14px; background: #131931; border: 2px solid var(--gold);
  box-shadow: 0 18px 50px var(--shade-60); color: var(--ivory); text-align: center; animation: ewPop .22s cubic-bezier(.3,1.5,.5,1); }
.ew-box b { display: block; font-family: var(--font-display); font-size: 20px; color: var(--gold-2); margin-bottom: 6px; }
.ew-box p { margin: 0 0 12px; font-size: 15px; line-height: 1.4; }
.ew-x { position: absolute; top: 6px; right: 8px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--ivory); font-size: 24px; line-height: 1; cursor: pointer; }
.ew-x:hover { background: rgba(255,255,255,.08); }
.ew-off { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); margin-bottom: 14px; cursor: pointer; }
.ew-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@keyframes ewIn { from { opacity: 0; } } @keyframes ewPop { from { transform: scale(.9); opacity: 0; } }

/* v42 shop packs: three full-size cards always fit their box, badges included */
.shop-grid:has(.shop-cards) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); }
.shop-cards { gap: 14px; padding: 12px 10px 4px 14px; }
@media (max-width: 480px) { .shop-cards { zoom: .8; gap: 12px; } }
@media (max-width: 360px) { .shop-cards { zoom: .7; } }
