/* The existing tablet and rune row keep their SVGs, dimensions and positions. */
.fr-hero__content { position:relative; }
.fr[data-world=temple] .fr-relic.is-boss-ready .fr-relic__art { filter:drop-shadow(0 0 8px #c3e6f5); animation:fr-boss-beacon 5s ease-in-out infinite; }
@keyframes fr-boss-beacon { 0%,100% { opacity:.7; filter:drop-shadow(0 0 4px #b6daeab0); } 50% { opacity:1; filter:drop-shadow(0 0 12px #c5eaff); } }
.fr-battle-guidance { position:absolute; top:100%; left:-10%; width:120%; font-size:10px; line-height:1.6; color:var(--muted); }
.fr-battle-open .fr-hero__content > :not(.fr-battle) { visibility:hidden; }
.fr-battle-open .fr-companion { visibility:hidden; }
.fr-battle { position:absolute; inset:0; display:flex; flex-direction:column; color:#314b5a; background:linear-gradient(135deg,#f3f7f0b8,#dbe8ed80); border:1px solid #b8cbd26b; padding:14px 16px; box-shadow:0 12px 60px #4569780c; }
.fr-battle__heading { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.fr-battle__heading p { font-size:8px; letter-spacing:2px; color:#647d8a; }
.fr-battle__heading h2 { font:normal clamp(16px,2.3vw,23px)/1.6 var(--serif); letter-spacing:.08em; }
.fr-battle__heading button { font-size:10px; padding:6px; min-height:44px; background:transparent; border-bottom:1px solid #819aa34d; white-space:nowrap; }
.fr-battle label { display:flex; justify-content:space-between; gap:8px; font-size:10px; line-height:1.8; }
.fr-battle progress { display:block; appearance:none; width:100%; height:5px; border:0; border-radius:8px; overflow:hidden; background:#58708020; color:#79a6b6; }
.fr-battle progress::-webkit-progress-bar { background:#58708020; }
.fr-battle progress::-webkit-progress-value { background:linear-gradient(90deg,#7898a4,#a8d6e0); transition:width .35s ease; }
.fr-battle progress::-moz-progress-bar { background:#8ab6c4; }
.fr-battle #battle-gauge-meter::-webkit-progress-value { background:linear-gradient(90deg,#aa976d,#dfc68e); }
.fr-battle__boss-hp { margin-top:8px; }
.fr-battle__arena { position:relative; flex:1; min-height:120px; isolation:isolate; overflow:hidden; }
.fr-battle__guardian { position:absolute; inset:0 0 7% 18%; }
.fr-battle__guardian img { width:100%; height:100%; object-fit:contain; mask-image:radial-gradient(ellipse,#000 45%,#000a 65%,transparent 85%); }
.fr-battle__player { position:absolute; width:34%; height:65%; bottom:0; left:0; }
.fr-battle__player img,.fr-battle__player canvas { width:100%; height:100%; object-fit:contain; }
#battle-player-fallback,#battle-boss-fallback { position:absolute; inset:25% 10%; display:grid; place-content:center; border:1px solid #a1c7d2; border-radius:50%; background:radial-gradient(ellipse,#effaffb0,#94bbc233); font:12px var(--serif); }
.fr-battle__light { position:absolute; inset:0; pointer-events:none; opacity:0; background:radial-gradient(ellipse at 65% 45%,#ecf8ffbb,transparent 65%); }
.fr-battle__meters { display:grid; gap:5px; margin-top:6px; }
#battle-message { min-height:3.6em; font-size:11px; line-height:1.8; margin-top:10px; }
#battle-result { position:absolute; left:0; right:0; top:40%; text-align:center; font:clamp(20px,4vw,34px) var(--serif); letter-spacing:.15em; color:#456377; text-shadow:0 0 18px white,0 0 6px white; }
.fr-battle[data-phase=arrival] .fr-battle__guardian { animation:fr-boss-arrive 1s ease-out; }
.fr-battle[data-phase=attack] .fr-battle__player { animation:fr-battle-strike .4s ease-out; }
.fr-battle[data-phase=attack] .fr-battle__guardian { animation:fr-battle-impact .45s ease-out; }
.fr-battle[data-phase=counter] .fr-battle__player { animation:fr-battle-impact .45s ease-out; }
.fr-battle[data-guarding=true] .fr-battle__player:after { content:''; position:absolute; inset:4% 0; border:1px solid #a5d6f2; border-radius:50%; background:radial-gradient(ellipse,transparent 48%,#d3edff60 70%,transparent 74%); box-shadow:0 0 14px #c9e7f780; }
.fr-battle[data-phase=special] .fr-battle__light { animation:fr-battle-special .9s ease-in-out; background:conic-gradient(from 45deg at 60% 45%,transparent,#d4edff88,transparent,#edddb599,transparent); }
.fr-battle[data-result=victory] .fr-battle__guardian { opacity:.35; transition:opacity 1.2s; }
.fr-battle[data-result=defeat] .fr-battle__player { opacity:.4; transition:opacity 1s; }
.fr-runes button[aria-disabled=true] { opacity:.45; cursor:default; }
.fr-runes button { position:relative; }
.fr-runes button:before { content:''; position:absolute; inset:-2px; border-radius:50%; }
@keyframes fr-boss-arrive { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }
@keyframes fr-battle-strike { 50% { transform:translate(7px,-4px); filter:drop-shadow(0 0 8px #e5cba0); } }
@keyframes fr-battle-impact { 40% { transform:translateX(3px); filter:drop-shadow(0 0 9px #c9eaff); } }
@keyframes fr-battle-special { 50% { opacity:.6; transform:rotate(6deg); } }
.fr-battle.is-still *,.fr-motion-paused .fr-battle * { animation:none!important; transition:none!important; }
.fr-battle.is-still[data-phase=special] .fr-battle__light { opacity:.25; }
.fr-motion-paused .fr-relic.is-boss-ready .fr-relic__art { animation:none!important; }
@media(max-width:700px) {
  .fr-battle { padding:10px; }
  .fr-battle__heading h2 { font-size:17px; }
  .fr-battle label { font-size:9px; }
  #battle-message { font-size:10px; }
  .fr-battle-guidance { left:0; width:100%; }
}
@media(prefers-reduced-motion:reduce) {
  .fr[data-world=temple] .fr-relic.is-boss-ready .fr-relic__art { animation:none; }
  .fr-battle * { animation:none!important; transition:none!important; }
}
