.light-icon { display: block; width: 100%; height: 100%; }

.light-console {
  width: min(430px, 100%);
  padding: 17px 17px 12px;
  border: 1px solid #625a85;
  border-radius: 24px;
  background: linear-gradient(155deg, #433a65, #272439 65%);
  box-shadow: 0 9px 0 #1b1929, 0 13px 0 #d7d3e4, 0 20px 30px #30263b24, inset 0 2px 0 #ffffff29;
  box-sizing: border-box;
  margin: 2px 0 15px;
}

.light-console-header,
.light-console-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #d4cbed;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.light-console-header { padding: 0 3px 13px; }
.light-console-header > span:first-child { display: flex; align-items: center; gap: 7px; }
.light-console-header i { width: 6px; height: 6px; background: #f4dc8d; border-radius: 50%; box-shadow: 0 0 7px #ffdc8770; }
.light-console-footer { padding: 14px 3px 0; font-size: 9px; }
.light-console-footer > span:last-child { font-size: 16px; color: #b4a1de; }
.light-energy-track { display: flex; flex: 1; max-width: 165px; height: 5px; overflow: hidden; background: #151320; border-radius: 9px; }
.light-energy-track i { display: block; min-width: 6px; border-radius: inherit; background: #cbb0ff; box-shadow: 0 0 9px #baa0ff; }

.light-board {
  display: grid;
  grid-template-columns: repeat(var(--light-size), minmax(0, 1fr));
  gap: 7px;
  padding: 10px 9px 15px;
  border-radius: 15px;
  border: 1px solid #161322;
  background: #191722;
  box-shadow: inset 0 3px 6px #0005, 0 1px 0 #ffffff25;
}

.light-board .light-tile {
  display: block;
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 0;
  aspect-ratio: 1;
  border: 1px solid #615a78;
  border-radius: 10px;
  background: linear-gradient(145deg, #554c6c, #393346);
  box-shadow: 0 5px 0 #24202f, 0 6px 2px #0007, inset 0 1px 0 #ffffff1a;
  color: #e4d9fc;
  transition: transform 120ms ease, background 160ms ease, box-shadow 120ms ease;
  overflow: hidden;
}

.light-board button.light-tile { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.light-board button.light-tile:hover:not(:disabled) { background: linear-gradient(145deg, #655780, #494057); border-color: #b4a3d9; transform: translateY(-1px); }
.light-board button.light-tile:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #24202f, inset 0 1px 0 #ffffff1a; }
.light-board button.light-tile:focus-visible { outline: 3px solid #fff2ad; outline-offset: 2px; z-index: 2; }
.light-board button.light-tile:disabled { opacity: 1; cursor: default; }
.light-board .light-fixed { border-color: #917c65; background: linear-gradient(145deg, #5f514c, #433b3d); }
.light-board .light-lit { border-color: #b39acb; background: linear-gradient(145deg, #736087, #4e4261); }
.light-board .light-source { background: linear-gradient(145deg, #88714b, #5c4c3e); border-color: #cfb976; }
.light-board .light-hinted { outline: 3px dashed #ffdf91; outline-offset: 2px; z-index: 1; }
.light-pipe-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.light-pipe-channel { stroke: #211d2e; stroke-width: 22; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.light-pipe-core { stroke: #9e8cb5; stroke-width: 11; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.light-joint { fill: #c3b3d8; stroke: #776589; stroke-width: 2; }
.light-lit .light-pipe-core { stroke: #ffebaf; filter: drop-shadow(0 0 4px #fff0b7b0); }
.light-lit .light-joint { fill: #fff5cc; stroke: #dfbc79; }
.light-source-ring { fill: #f4ce7d; stroke: #fff2b7; stroke-width: 3; }
.light-source-bolt { fill: #5c4329; }
.light-star-shape { fill: #9e8fae; stroke: #dbcfeb; stroke-width: 3; stroke-linejoin: round; }
.light-lit .light-star-shape { fill: #fff0a3; stroke: #fff9da; filter: drop-shadow(0 0 5px #ffd36b); }
.light-tile-caption { position: absolute; bottom: 3px; left: 0; right: 0; color: #fff0c9; font-size: 8px; font-weight: 900; letter-spacing: 0.08em; line-height: 1; pointer-events: none; }
.light-star .light-tile-caption { color: #e0d6f2; }
.light-complete { border-color: #b99443; }
.light-complete .light-console-footer > span:last-child { color: #ffeb9d; }
.light-complete .light-energy-track i { background: #ffe393; }
.light-progress { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.light-progress > span { padding: 6px 12px; border: 1px solid #e2daee; border-radius: 999px; background: #f4effb; color: #5b447b; font-size: 0.82rem; font-weight: 700; }
.light-progress > .light-progress-solved { color: #3e6229; background: #f0f8df; border-color: #cfdfaf; }
.light-controls { line-height: 1.65; }
.light-actions { margin-top: 0; flex-wrap: wrap; }
.light-feedback { max-width: 470px; margin: 0; }

@media (max-width: 480px) {
  .light-console { padding: 12px 10px 9px; border-radius: 19px; }
  .light-console-header { font-size: 9px; padding-bottom: 10px; }
  .light-board { gap: 6px; padding: 8px 7px 12px; border-radius: 12px; }
  .light-board .light-tile { border-radius: 7px; }
  .light-tile-caption { font-size: 6px; bottom: 2px; }
  .light-progress > span { font-size: 0.76rem; padding: 5px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .light-board .light-tile { transition: none; }
}
