/* ── Spectrum ──────────────────────────────────────────────────────────────── */

/* Light neutral canvas — overrides shared.css dark default */
#canvas-wrap {
  background: #f5f2ed;
  padding: 0;
  overflow: hidden;
}

.sp-hide { display: none !important; }

/* ── Splash screen ──────────────────────────────────────────────────────────── */

#sp-splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 32px 28px;
  max-width: 420px;
  margin: auto;
}

#sp-logo {
  width: 260px;
  height: auto;
  display: block;
}

.sp-directions {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  line-height: 1.72;
  color: #55524c;
  max-width: 300px;
}

#sp-start-btn {
  margin-top: 6px;
  background: #1c1c1c;
  color: #ffffff;
  padding: 13px 52px;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.12s;
}

#sp-start-btn:hover  { opacity: 0.82; }
#sp-start-btn:active { opacity: 0.65; }

/* ── Game logo ──────────────────────────────────────────────────────────────── */

#sp-game-logo {
  width: 160px;
  height: auto;
  display: block;
}

/* ── Grid wrapper ──────────────────────────────────────────────────────────── */

#sp-grid-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Grid ──────────────────────────────────────────────────────────────────── */

#sp-grid {
  display: grid;
  /* grid-template-columns / rows set inline by JS via tile size */
  gap: 2px;
}

/* ── Tile base ─────────────────────────────────────────────────────────────── */

.sp-tile {
  border-radius: 2px;
  /* background-color set inline by JS */
}

/* Anchor: subtle inset border — indicates "locked in place" */
.sp-tile--anchor {
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.38);
  cursor: default;
}

/* Free tile: interactive */
.sp-tile--free {
  cursor: pointer;
  transition: filter 0.08s, box-shadow 0.08s;
  -webkit-tap-highlight-color: transparent;
}

.sp-tile--free:hover {
  filter: brightness(1.10);
}

/* Selected tile: bright white outline */
.sp-tile--selected {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(0, 0, 0, 0.7);
  filter: brightness(1.08);
  z-index: 1;
  position: relative;
}

/* Canvas column layout for win-bar + grid stacking */
#canvas-wrap {
  flex-direction: column;
  gap: 16px;
}

/* Win bar — sits above the grid on completion */
#sp-win {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.sp-win-headline {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #1c1c1c;
}

.sp-win-btns {
  display: flex;
  gap: 10px;
}

.sp-btn-primary {
  background: #1c1c1c;
  color: #fff;
  padding: 11px 24px;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.12s;
}

.sp-btn-primary:hover  { opacity: 0.82; }
.sp-btn-primary:active { opacity: 0.65; }

.sp-btn-ghost {
  background: transparent;
  border: 1px solid #bbb8b2;
  color: #55524c;
  padding: 11px 24px;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.12s, color 0.12s;
}

.sp-btn-ghost:hover  { border-color: #888; color: #333; }
.sp-btn-ghost:active { background: rgba(0,0,0,0.04); }

/* ── Hint bar ──────────────────────────────────────────────────────────────── */

#sp-hint-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.sp-hint-btns {
  display: flex;
  gap: 10px;
}

#sp-hint-btn,
#sp-superhint-btn {
  background: transparent;
  border: 1px solid #bbb8b2;
  color: #55524c;
  padding: 9px 20px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.12s, color 0.12s;
}

#sp-hint-btn:hover,
#sp-superhint-btn:hover { border-color: #888; color: #333; }

#sp-hint-btn:active,
#sp-superhint-btn:active { background: rgba(0,0,0,0.04); }

#sp-hint-msg {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1c1c1c;
  min-height: 1.2em;
}

/* Super-hint: correct tile highlight */
.sp-tile--correct {
  outline: 3px solid rgba(34, 197, 94, 0.9);
  outline-offset: -3px;
  position: relative;
  z-index: 1;
}
