/* Combat-only styling; keep inherited fire and sinking layers intact. */
body.tts-edition .tts-missile-flight { position:fixed;inset:0;width:100vw;height:100vh;z-index:100;pointer-events:none; }
body.tts-edition .tts-missile-flight[hidden] { display:none!important; }
body.tts-edition[data-stage="battle-screen"] .target-reticle { display:none!important; }
.tts-target-reticle { position:fixed;z-index:90;pointer-events:none;transform:translate(-50%,-50%);filter:drop-shadow(0 0 3px #fa3d3277); }
.tts-target-reticle[hidden],body:not([data-stage="battle-screen"]) .tts-target-reticle { display:none!important; }
.tts-target-reticle svg { display:block;width:100%;height:100%;fill:none;stroke:#ff493b;stroke-width:2.15; }
.tts-target-reticle .ring { stroke-dasharray:4 3;stroke-width:2.2;animation:tts-aim-pulse 1.05s ease-in-out infinite alternate; }
.tts-target-reticle .dot { fill:#ff493b;stroke:none; }
#battle-screen.tts-match #target-grid:not(.tts-waiting) .target-cell.tts-target-hover {
  background:rgba(255,57,42,.1)!important;
  box-shadow:inset 0 0 0 2.25px #ff493bfA,0 0 6px #ff332b77!important;
  cursor:none;
}
#battle-screen.tts-match #target-grid.tts-waiting,
#battle-screen.tts-match #target-grid.tts-waiting .target-cell {
  cursor:url('./assets/through-the-shadows/combat/wait-clock.svg') 16 17,progress!important;
}
#battle-screen.tts-match #target-grid .target-cell.is-miss {
  background:radial-gradient(ellipse farthest-corner at center,
    rgba(255,255,255,.62) 0%,rgba(238,251,255,.40) 42%,
    rgba(221,245,255,.20) 75%,rgba(207,239,250,.16) 100%)!important;
  box-shadow:inset 0 0 0 1px #b7e0ec66!important;
}
#battle-screen.tts-match #target-grid .target-cell.is-miss::after { display:none!important; }
/* Fade only at exposed edges; shared edges retain the same white wash. */
#battle-screen.tts-match #target-grid .target-cell.is-miss.tts-miss-connected {
  background:rgba(207,239,250,.12)!important;box-shadow:none!important;
}
.tts-miss-wash { display:none; }
#battle-screen.tts-match #target-grid .is-miss.tts-miss-connected > .tts-miss-wash {
  display:block;position:absolute;inset:-1px;z-index:0;pointer-events:none;
  background:rgba(255,255,255,.58);
  mask-image:
    linear-gradient(90deg,rgba(0,0,0,var(--tts-miss-left)),#000 46%,#000 54%,rgba(0,0,0,var(--tts-miss-right))),
    linear-gradient(180deg,rgba(0,0,0,var(--tts-miss-up)),#000 46%,#000 54%,rgba(0,0,0,var(--tts-miss-down)));
  mask-composite:intersect;
}
#battle-screen.tts-match #target-grid .is-miss.tts-miss-left { border-left-color:#d7f4ff3d!important; }
#battle-screen.tts-match #target-grid .is-miss.tts-miss-right { border-right-color:#d7f4ff3d!important; }
#battle-screen.tts-match #target-grid .is-miss.tts-miss-up { border-top-color:#d7f4ff3d!important; }
#battle-screen.tts-match #target-grid .is-miss.tts-miss-down { border-bottom-color:#d7f4ff3d!important; }
#battle-screen.tts-match #target-grid .target-cell.is-zero::before { content:none!important; }
#battle-screen.tts-match #target-grid .target-cell.is-sonar::before {
  content:attr(data-sonar);position:absolute;inset:0!important;display:grid;place-items:center;
  width:auto!important;height:auto!important;padding:0!important;margin:0!important;border:0!important;
  border-radius:0!important;background:none!important;box-shadow:none!important;transform:none!important;
  font:950 clamp(15px,calc(var(--tts-cell,40px) * .55),31px)/1 Arial,sans-serif!important;
  color:var(--tts-sonar,#9ccbff)!important;-webkit-text-stroke:1px #092d45;paint-order:stroke fill;
  text-shadow:0 1px 2px #001b2e,0 0 5px color-mix(in srgb,var(--tts-sonar,#9ccbff) 45%,transparent)!important;
}
#target-grid [data-sonar="1"] { --tts-sonar:#9ccbff; }
#target-grid [data-sonar="2"] { --tts-sonar:#3b82f6; }
#target-grid [data-sonar="3"] { --tts-sonar:#22d3ee; }
#target-grid [data-sonar="4"] { --tts-sonar:#2dd4bf; }
#target-grid [data-sonar="5"] { --tts-sonar:#84cc16; }
#target-grid [data-sonar="6"] { --tts-sonar:#facc15; }
#target-grid [data-sonar="7"] { --tts-sonar:#fb923c; }
#target-grid [data-sonar="8"] { --tts-sonar:#f43f5e; }
@keyframes tts-aim-pulse { from { opacity:.84; } to { opacity:1; } }
@media(prefers-reduced-motion:reduce) { .tts-target-reticle .ring { animation:none; } }
