/* Material arenas – seven compact elemental challenge cards and loot feedback */
.materialStage{position:relative;isolation:isolate;overflow:hidden;min-height:148px;text-align:left;border:1px solid color-mix(in srgb,var(--arena-color) 48%,#41435a);background:#131728;color:#eef4ff;display:flex;flex-direction:column;justify-content:flex-end;align-items:stretch;gap:5px;padding:15px;border-radius:14px;cursor:pointer;box-shadow:inset 0 0 22px #111c32}
.materialStagePreview{position:absolute;z-index:-1;inset:0;background-position:center 55%;background-size:cover;opacity:.88;transition:transform .28s ease,opacity .28s ease}
.materialStage:hover .materialStagePreview,.materialChosen .materialStagePreview{transform:scale(1.065);opacity:1}
.materialStage:hover,.materialChosen{border:2px solid var(--arena-color);box-shadow:0 0 18px color-mix(in srgb,var(--arena-color) 27%,transparent),inset 0 -35px 38px #05091c}
.materialStage b{font-size:17px;letter-spacing:.5px;text-shadow:0 1px 6px #050514}
.materialStage .boss{color:#fff1c1;font-weight:800;font-size:13px;text-shadow:0 1px 5px #000}
.materialStage small{color:#e9e8f9;font-size:11px;text-shadow:0 1px 5px #000;line-height:1.3}
#materialRewardGrid:not([hidden]){display:block;max-width:510px;margin:14px auto 10px;text-align:left;border:1px solid #77b7d77d;border-radius:16px;padding:14px;background:linear-gradient(145deg,#121b36e8,#18162dcf);box-shadow:0 0 22px #98c6ff16}
#materialRewardGrid h3{font-size:16px;margin:0 0 11px;color:#fff6d8}
.materialLootRows{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.materialLootItem{display:flex;flex-direction:column;align-items:center;gap:5px;border:1px solid #4c5d7a;border-radius:11px;padding:10px 5px;text-align:center;background:#2432516b;font-size:11px}
.materialLootIcon{font-size:28px;text-shadow:0 0 13px #b3c3ff}
.materialLoot-mid .materialLootIcon{color:#8ae6ee}
.materialLoot-big{border-color:#f7ce7c;background:linear-gradient(160deg,#d79e2928,#382d4f)}
.materialLoot-big .materialLootIcon{color:#ffdc8b}
.materialLootItem b{font-size:12px;color:#f6f1f5}
.materialLootItem strong{font-size:20px;color:#fff;line-height:1}
.materialFirstClear,.materialPityNotice{color:#ffe3a5;font-size:13px;font-weight:800;text-align:center;margin:12px 0 4px}
.materialPityNotice{color:#bbffca}
.materialPityNote{color:#a2bdd5;font-size:11px;text-align:center;margin:10px 0 0;line-height:1.45}
@media(max-width:640px){.materialStage{min-height:126px;padding:10px}.materialStage b{font-size:15px}.materialLootRows{gap:5px}.materialLootItem{padding:8px 2px}.materialLootItem b{font-size:10px}#materialRewardGrid:not([hidden]){margin:9px auto;padding:10px}}
@media(prefers-reduced-motion:reduce){.materialStagePreview{transition:none}}

/* Material stage hub: one user-provided, pixel-art banner opens all 7 arenas.
   Original elemental cards and their button targets are rendered unchanged. */
.materialStageChooser{margin:17px 0 16px;max-width:100%;min-width:0}
.materialStageEntry{display:block;position:relative;overflow:hidden;isolation:isolate;
  box-sizing:border-box;width:min(100%,340px);padding:0;margin:0;
  text-align:left;background:#150d22;border:1px solid #ae6937;border-radius:15px;
  cursor:pointer;color:#fff8e5;box-shadow:0 7px 23px #0008}
.materialStageEntry:hover,.materialStageEntry:focus-visible{border-color:#ffbe55;box-shadow:0 0 0 1px #ec8a3c,0 8px 26px #0009}
.materialStageEntry:focus-visible{outline:2px solid #ffe7a5;outline-offset:3px}
.materialStageEntryArt{display:block;width:100%;height:auto;aspect-ratio:2048/682;
  object-fit:contain;image-rendering:auto;background:#110b1c}
.materialStageEntryFooter{display:flex;align-items:center;justify-content:space-between;
  gap:10px;padding:10px 15px;background:linear-gradient(100deg,#23162f,#142944);
  border-top:1px solid #7a4e54}
.materialStageEntryFooter b{display:block;font-size:16px;color:#fff0cc}
.materialStageEntryFooter small{display:block;font-size:11px;margin-top:2px;color:#c6d8e7}
.materialStageEntryOpen{flex:0 0 auto;display:inline-flex;align-items:center;
  padding:7px 10px;border-radius:9px;border:1px solid #ab8155;color:#ffe8af;
  background:#462532;font-weight:850;font-size:12px}
.materialStageChoices{margin-top:14px;border-top:1px solid #5b4d64;padding-top:12px}
.materialStageChoicesTitle{display:flex;justify-content:space-between;align-items:center;
  gap:9px;flex-wrap:wrap;margin-bottom:10px}
.materialStageChoicesTitle h3{margin:0;color:#f5d9bb;font-size:16px}
.materialStageBack{padding:7px 11px;font-size:11px;min-height:34px}
.materialStageChoices .stageGrid{margin-top:0}
@media(max-width:700px){
  .materialStageChooser{margin:12px 0}
  .materialStageEntry{width:100%;border-radius:10px}
  .materialStageEntryFooter{padding:8px 10px;gap:6px}
  .materialStageEntryFooter b{font-size:13px}
  .materialStageEntryFooter small{font-size:10px}
  .materialStageEntryOpen{font-size:10px;padding:6px 8px}
  .materialStageChoicesTitle h3{font-size:13px}
}
@media(prefers-reduced-motion:reduce){.materialStageEntry{transition:none}}

/* Opaque legacy banner: reveal the themed map only around its outer silhouette. */
.dsMaterialBannerBackdrop{display:block;width:100%;aspect-ratio:2048/682;overflow:hidden;background:linear-gradient(0deg,#32172326,#44200e12),url('../assets/images/material/fire.webp') center 32%/cover no-repeat}
.dsMaterialBannerBackdrop .materialStageEntryArt{width:100%;height:100%;background:transparent;clip-path:polygon(1.3% 19%,5.5% 5%,13% 5%,17% 3%,30% 3%,33% 0%,41% 0%,45% 7%,64% 7%,69% 3%,72% 1%,77% 3%,80% 7%,92% 7%,95% 5%,98.7% 13%,98.7% 79%,94% 96%,81% 96%,78% 98%,64% 98%,61% 96%,30% 96%,27% 98%,7% 98%,1.3% 85%)}

/* Adventure subcards are horizontal rows, not the global 3-column stage grid. */
.materialStageChoices .stageGrid{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;align-items:start;width:100%;min-width:0}
.materialStageChoices .stageGrid>.materialStageChooser{width:100%;min-width:0;margin:0;max-width:none}
.materialStageChoices .stageGrid .materialStage{box-sizing:border-box;width:100%;min-width:0;max-width:none;min-height:128px;justify-content:center;gap:3px;padding:12px 14px;line-height:1.35;overflow-wrap:break-word}
.materialStageChoices .stageGrid .materialStage b{margin:0 0 3px;font-size:16px;line-height:1.35}
.materialStageChoices .stageGrid .materialStage .boss{font-size:12px;line-height:1.4}
.materialStageChoices .stageGrid .materialStage small{font-size:11px;line-height:1.45}
.materialStageChoices .stageGrid .materialStagePreview{background-position:center 42%;opacity:.92}
.materialStageChoices .stageGrid .materialStage:not([data-action="bitArcadeOpen"])::before{content:"";position:absolute;z-index:-1;inset:0;background:linear-gradient(90deg,#080e20dc 0%,#101529a6 54%,#131b3026 100%);pointer-events:none}
.materialStageChoices .stageGrid .materialStage[data-action="bitArcadeOpen"]{padding-right:84px;background:linear-gradient(145deg,#31274d,#153a4b)}
.materialStageChoices .stageGrid .materialStage[data-action="bitArcadeOpen"] .materialStagePreview{inset:0 10px 0 auto;width:66px;background:none!important;opacity:1;transform:none}
#bitZoneChoices .dsAdminRow{flex-wrap:wrap;justify-content:flex-start;margin:6px 0 0!important}
#bitZoneChoices .dsAdminRow .hubBtn{flex:1 1 110px;min-width:0;padding:8px 10px}
@media(max-width:700px){.materialStageChoices .stageGrid{gap:8px}.materialStageChoices .stageGrid .materialStage{min-height:118px;padding:10px 12px}.materialStageChoices .stageGrid .materialStage b{font-size:14px}.materialStageChoices .stageGrid .materialStage[data-action="bitArcadeOpen"]{padding-right:76px}}

/* Bit cards: existing game walk art, static CSS arcade backdrop, no canvas. */
#bitZoneChoices .materialStage{min-height:128px;padding:14px 48% 14px 18px;position:relative;isolation:isolate}
#bitZoneChoices .materialStage .bitBannerTitle{font-size:clamp(18px,3vw,28px);font-weight:950;color:#ffedb0;letter-spacing:.04em;text-shadow:2px 2px #131226,0 0 8px #000;line-height:1.25;margin:0}
#bitZoneChoices .materialStage[data-action="bitArcadeOpen"]{padding:14px 50% 14px 18px;background:linear-gradient(90deg,#15152eeb,#25204d80 55%,#18294a44),repeating-linear-gradient(0deg,transparent 0 23px,#6d9cda28 24px 25px),repeating-linear-gradient(90deg,transparent 0 39px,#6d9cda28 40px 41px),linear-gradient(155deg,#30477b,#342251 65%,#1c4661)}
.bitBannerActors{position:absolute;right:2%;top:0;bottom:0;width:48%;display:flex;align-items:center;justify-content:center;pointer-events:none;z-index:0}
.bitPlatinumWalk{display:block;height:94%;aspect-ratio:1;background-image:url('../assets/images/bit/platinum_sheet.webp');background-size:300% 300%;background-repeat:no-repeat;animation:bitPlatinumSteps .66s step-end infinite}
@keyframes bitPlatinumSteps{0%{background-position:0 0}33.333%{background-position:50% 0}66.666%{background-position:100% 0}}
.bitWalkActor{position:relative;height:100%;flex:1;min-width:0;overflow:hidden}
.bitWalkFrame{position:absolute;left:50%;top:50%;height:100%;width:auto;max-width:none;transform:translate(-50%,-50%);opacity:0;animation:bitWalkFrames .66s step-end infinite}
.bitWalkActor1 .bitWalkFrame,.bitWalkActor2 .bitWalkFrame{transform:translate(-36%,-50%)}
.bitWalkFrame0{animation-delay:0s}.bitWalkFrame1{animation-delay:-.44s}.bitWalkFrame2{animation-delay:-.22s}
@keyframes bitWalkFrames{0%{opacity:1}33.333%{opacity:0}100%{opacity:0}}
@media(max-width:520px){#bitZoneChoices .materialStage,#bitZoneChoices .materialStage[data-action="bitArcadeOpen"]{min-height:105px;padding:10px 53% 10px 10px}.bitBannerActors{width:53%;right:0}.bitWalkFrame{height:76%}#bitZoneChoices .materialStage .bitBannerTitle{font-size:17px;letter-spacing:0}}
@media(prefers-reduced-motion:reduce){.bitPlatinumWalk,.bitWalkFrame{animation:none}.bitWalkFrame0{opacity:1}}

/* Daily Bit menu: fixed original walk frame, scenic arcade backdrop. */
#bitZoneChoices .bitPlatinumWalk{animation:none;background-position:0 0}
#bitZoneChoices .bitWalkFrame{animation:none;opacity:1}
#bitZoneChoices .bitWalkActor1 .bitWalkFrame,#bitZoneChoices .bitWalkActor2 .bitWalkFrame{transform:translate(-50%,-50%)}
#bitZoneChoices .materialStage[data-action="bitArcadeOpen"]{background:linear-gradient(90deg,#0a1934e8 0%,#10274377 45%,#10274312 75%),url('../assets/arcade/lobby-backdrop.svg') center/cover no-repeat}
#bitZoneChoices .bitBannerActors{z-index:0}
#bitZoneChoices .bitBannerTitle,#bitZoneChoices .materialStage small{position:relative;z-index:1}

/* Keep every original walk frame entirely within its own responsive cell. */
#bitZoneChoices .bitMiniActors{width:56%;right:2%;gap:clamp(2px,1vw,10px);padding:6px 0;box-sizing:border-box}
#bitZoneChoices .bitMiniActors .bitWalkActor{flex:1 1 0;min-width:0;height:100%;overflow:visible;display:flex;align-items:center;justify-content:center}
#bitZoneChoices .bitMiniActors .bitWalkFrame{position:static;display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center bottom;transform:none;opacity:1;animation:none;image-rendering:auto}
@media(max-width:520px){#bitZoneChoices .bitMiniActors{width:55%;right:1.5%;gap:2px;padding:8px 0}}
