body[data-arena-game="lights"].series-playing #game .lights-board {
  flex: 1 1 auto;
  width: min(100%, 550px);
  margin: 0 auto;
  background: #fcfbf4;
  border: 1px solid #fff9;
  box-shadow: 0 6px 18px #15533c1c;
  overflow: hidden;
}
body[data-arena-game="lights"].series-playing #game :is(.instruction, .control-hint) {
  display: grid;
  place-items: center;
  text-align: center;
}
body[data-arena-game="lights"] .instruction p {
  max-width: 100%;
  color: #fffdf1;
  white-space: normal;
}
.lights-hud {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  color: #426254;
  text-align: center;
  font-size: clamp(.62rem, 2vw, .79rem);
  font-variant-numeric: tabular-nums;
}
.lights-hud strong {
  display: block;
  margin-top: 2px;
  color: #203e32;
  font-size: clamp(.95rem, 3vw, 1.2rem);
  line-height: 1.2;
}
.lights-hud > :last-child strong {
  border-radius: 999px;
  padding-inline: 5px;
  background: #e6eee0;
}
.lights-meter {
  flex: none;
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #e6eadf;
}
.lights-meter i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #669e78, #c7a557);
  transform-origin: left;
  transform: scaleX(var(--time-left, 1));
}
.lights-board .lights-grid {
  box-sizing: border-box;
  display: grid;
  align-self: center;
  grid-template-columns: repeat(var(--size, 3), minmax(0, 1fr));
  grid-template-rows: repeat(var(--size, 3), minmax(0, 1fr));
  gap: clamp(3px, 1.4vw, 9px);
  padding: clamp(5px, 1.8vw, 13px);
  margin-block: auto;
  border: 1px solid #ccd8c4;
  border-radius: clamp(10px, 3vw, 23px);
  background: linear-gradient(145deg, #e5eddd, #d9e6d4);
  touch-action: manipulation;
}
.lights-grid .lights-window {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 1px solid #c4d3be;
  border-radius: clamp(5px, 2vw, 15px);
  background: linear-gradient(155deg, #f8faf2, #e6eee1);
  cursor: pointer;
  box-shadow: 0 2px 0 #b7c8b4;
}
.lights-window::before {
  content: '';
  box-sizing: border-box;
  width: 59%;
  height: 69%;
  border: clamp(1px, .5vw, 3px) solid #617f73;
  border-radius: 42% 42% 17% 17% / 32% 32% 14% 14%;
  background:
    linear-gradient(to right, transparent 46%, #759084 46% 54%, transparent 54%),
    linear-gradient(to bottom, transparent 49%, #759084 49% 57%, transparent 57%),
    #4a655c;
}
.lights-grid .lights-window[aria-pressed="true"] {
  border-color: #ddbc76;
  background: linear-gradient(155deg, #fff9e8, #f6e5b8);
  box-shadow: 0 2px 0 #d0ad66;
}
.lights-window[aria-pressed="true"]::before {
  border-color: #a87738;
  background:
    linear-gradient(to right, transparent 46%, #bc8c4e 46% 54%, transparent 54%),
    linear-gradient(to bottom, transparent 49%, #bc8c4e 49% 57%, transparent 57%),
    linear-gradient(145deg, #fff2b8, #eeb655);
  box-shadow: 0 0 8px #f1bc635c;
}
.lights-window:focus-visible { outline: 2px solid #245942; outline-offset: -3px; }
.lights-grid.is-cleared { border-color: #699576; }
@media (prefers-reduced-motion: no-preference) {
  .lights-window { transition: background-color .14s, box-shadow .14s; }
  .lights-meter i { transition: transform .14s linear; }
}
@media (min-width: 600px) and (max-height: 500px) {
  body[data-arena-game="lights"].series-playing #game .lights-board {
    display: grid;
    grid-template-columns: minmax(110px, 155px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .lights-hud { grid-column: 1; grid-row: 1; align-self: end; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lights-meter { grid-column: 1; grid-row: 2; }
  .lights-grid { grid-column: 2; grid-row: 1 / -1; justify-self: center; margin-block: 0; }
}
@media (max-height: 440px) {
  body[data-arena-game="lights"].series-playing #game .control-hint { display: none; }
}
