/* Loopin purku ilman Esc-näppäintä ja aloitusnäytön kaukosäädinnavigointi (app.js: updateLoopChip, moveHomeFocus) */

/* ✕ loopin viimeisen laatan kulmassa: napautus poistaa loopin */
.tile .loop-x {
  position: absolute;
  top: -9px;
  right: -9px;
  z-index: 6;
  width: 26px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(20, 16, 4, 0.85);
  background: #ffc800;
  color: #1a1400;
  font: 700 14px/1 system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.tile .loop-x:hover,
.tile .loop-x:focus-visible { background: #ffe066; outline: none; }
/* Näkymätön isompi osuma-alue sormelle */
.tile .loop-x::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
}
html[data-compact="1"] .tile .loop-x { width: 30px; height: 30px; top: -11px; right: -11px; font-size: 16px; }

/* Aloitusnäyttö: kaukosäätimen / näppäimistön fokus näkyviin (vanhat TV-selaimet eivät tunne :focus-visible) */
#startOverlay button:focus,
#startOverlay input:focus,
#startOverlay a:focus {
  outline: 3px solid #ffd54a;
  outline-offset: 3px;
}
#startOverlay button:focus:not(:focus-visible),
#startOverlay input:focus:not(:focus-visible),
#startOverlay a:focus:not(:focus-visible) {
  outline: none;
}
.ss-resume-btn { margin-bottom: 8px; }
.ss-resume-btn.hidden { display: none; }
