/* v1.5.5d — Stone Forge uses the actual Rune Forge CSS classes from forge-menu.css.
   Only these location/Blue-animation overrides are stone-specific. */
#rpgStones .runeWindow{position:relative;width:min(1150px,99vw);height:min(94vh,760px);padding:0;gap:0;min-height:0;overflow:hidden;isolation:isolate}
#rpgStones .runeWindow>header{height:clamp(37px,7.5vh,58px);padding:7px 13px;gap:8px;flex:none;background:#10232d;border-bottom:1px solid #9db29e4f}
#rpgStones .runeWindow>header h2{font:700 clamp(14px,2.25vw,22px)/1.12 Georgia,serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#rpgStones .runeWindow>header button{flex:none;min-height:30px;padding:5px 11px}
#rpgStones .runeWindowBody{position:relative;flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:0;background:linear-gradient(150deg,#142c35,#101d29)}
/* The Rune Forge's fcTileGrid is exactly 3 columns. Hold this at tablet/Android
   landscape widths instead of the earlier 2-column Stone Forge breakpoint. */
#rpgStones .fcTileGrid{grid-template-columns:repeat(3,minmax(0,1fr))}
#rpgStones .fcTile{min-width:0}
#rpgStones .fcTileContent small{overflow-wrap:anywhere}
#rpgStones .fcModes button:disabled{opacity:.45}
#rpgStones .sfEquippedText{display:inline-block;color:#92efab;font-size:10px;margin-left:5px;vertical-align:middle}
#rpgStones .sfHistoryRow{display:flex;justify-content:center;padding:9px 0}
#rpgStones .sfHistoryRow button{font-size:10px;min-height:29px;padding:5px 11px}
#rpgStones .sfSectionTitle{font-size:10px;color:#d4bf8e;margin:10px 0 6px}
#rpgStones .sfChanceTrack{height:9px;background:#081a25;border-radius:99px;overflow:hidden;margin:8px 0}
#rpgStones .sfChanceTrack i{height:100%;display:block;border-radius:99px;background:linear-gradient(90deg,#438fd4,#78e0ca)}
#rpgStones .sfResultIcon{font-size:clamp(30px,6vw,53px);text-align:center;color:#a2e9ae;margin:2px auto}
#rpgStones .sfAnimation{text-align:center;min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}
#rpgStones .sfForgeOrb{width:130px;height:115px;position:relative;display:grid;place-items:center;border-radius:50%;background:radial-gradient(circle,#2384b45e,#0f2537 65%,transparent);box-shadow:0 0 42px #258fdf50}
#rpgStones .sfFlame{font-size:82px;filter:drop-shadow(0 2px 15px #e38336);animation:sfFlame .4s infinite alternate ease-in-out}
#rpgStones .sfCrystal{position:absolute;top:40px;font-size:37px;filter:drop-shadow(0 0 11px #79bcff);animation:sfFloat .75s infinite alternate}
#rpgStones .sfAnimation h2{font:750 21px Georgia,serif;color:#f9dda1;margin:4px 0}
#rpgStones .sfAnimation p,#rpgStones .sfAnimation small{font-size:11px;color:#b4cbd1;margin:0}
#rpgStones .sfLoadTrack{width:min(430px,90%);height:14px;border-radius:99px;background:#061820;overflow:hidden;margin:7px 0}
#rpgStones .sfLoadTrack i{display:block;width:1%;height:100%;background:linear-gradient(90deg,#2386e6,#5debc8);border-radius:99px}
#rpgStones #sfLoadPct{font-size:18px;color:#a5e0fa}
@keyframes sfFlame{to{transform:rotate(4deg) scale(1.07);filter:drop-shadow(0 1px 24px #efac38)}}
@keyframes sfFloat{to{transform:translateY(-8px) scale(1.08)}}
@media(max-height:480px){
 #rpgStones .runeWindow{height:calc(100dvh - 8px);width:calc(100vw - 16px)}
 #rpgStones .runeWindow>header{height:35px;padding:4px 10px}
 #rpgStones .sfForgeOrb{height:70px;width:82px}
 #rpgStones .sfFlame{font-size:53px}#rpgStones .sfCrystal{top:18px;font-size:24px}
 #rpgStones .sfAnimation h2{font-size:16px;margin:0}
 #rpgStones .sfLoadTrack{margin:3px 0}
}
@media(max-width:540px) and (orientation:portrait){#rpgStones .fcTileGrid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){#rpgStones .sfFlame,#rpgStones .sfCrystal{animation:none}}

/* v1.5.6 Yellow mode uses the exact same Rune Forge grid, modal and steps. */
#rpgStones .fcModes button[data-sf-mode="yellow"].active{background:#635020;border-color:#e7c365;color:#fff0b7}
#rpgStones .sfYellowTrack i{background:linear-gradient(90deg,#b98b22,#f4d36e)}
#rpgStones .fcModes button[data-sf-mode]:not(:disabled){cursor:pointer}

/* v1.5.7 Red Stone reuses Rune Forge modal shell and three-column grid. */
#rpgStones .fcModes button[data-sf-mode="red"].active{background:#692b32!important;border-color:#f18c87!important;color:#ffe7e4!important}
#rpgStones .fcModal>footer{flex-wrap:wrap;align-content:center;min-height:40px}
#rpgStones .fcModal>footer button{white-space:normal;text-align:center;min-height:34px!important}
#rpgStones .fcModalScroll .fcStat b{overflow-wrap:anywhere}
@media(max-height:480px){#rpgStones .fcModal>footer button{min-height:28px!important;font-size:10px!important;padding:4px 7px!important}}

/* v1.5.8 Violet mode — Rune Forge layout retained */
#rpgStones .fcModes button[data-sf-mode="violet"].active{background:#523267!important;border-color:#dca4ff!important;color:#f8e6ff!important}
#rpgStones .sfVioletTrack i{background:linear-gradient(90deg,#8952ce,#e5a3fb)}

/* v1.5.9 Resonance mode — Rune Forge grid/modal retained, fifth tab scrolls horizontally. */
#rpgStones .fcModes{scrollbar-width:thin;overflow-x:auto;flex-wrap:nowrap}
#rpgStones .fcModes button[data-sf-mode="resonance"].active{background:#755520!important;border-color:#ffdc8a!important;color:#fff1bb!important}
#rpgStones .fcTileGrid{grid-template-columns:repeat(3,minmax(0,1fr))}
#rpgStones .sfResWarning{border:1px solid #deb47780;background:#50341b45;border-radius:8px;padding:9px;color:#f2d3ad}
