/* ----------------------------------------------------------
   Spielbares NEO-Blocks-Tagesrätsel (js/neo-daily-play.js).
   NEO-Blocks-Palette wie die Lösungsliste: Pergament, Waldgrün, Gold.
   ---------------------------------------------------------- */

.neo-play-card {
  padding: 20px 16px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #f8f1e0 0%, #f2e8cf 100%);
  border: 1px solid rgba(212, 166, 74, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 24px rgba(26, 46, 26, 0.08);
}

.neo-play {
  max-width: 560px;
  margin: 0 auto;
  color: var(--neo-forest-dark);
}

.neo-play-fallback { text-align: center; }
.neo-play.is-live .neo-play-fallback { display: none; }

.neo-play-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  font-size: 17px;
}

.neo-play-goal { display: flex; align-items: center; gap: 8px; }
.neo-play-goal img {
  width: 40px;
  height: 40px;
  padding: 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3f6b3a, var(--neo-forest-dark));
  box-shadow: 0 0 0 2px var(--neo-gold), 0 2px 6px rgba(26, 46, 26, 0.3);
}
.neo-play-count { font-variant-numeric: tabular-nums; }
.neo-play-count strong { font-size: 20px; }
.neo-play-best { color: var(--neo-forest); }

/* Darstellung umschalten: Runen · Runen + Zahlen · Zahlen */
.neo-play-style {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  font-size: 15px;
}
.neo-play-style-label { color: var(--neo-forest); font-weight: 600; }
.neo-play-style-group {
  display: inline-flex;
  padding: 3px;
  border-radius: 980px;
  background: rgba(45, 74, 43, 0.1);
  border: 1px solid rgba(45, 74, 43, 0.18);
}
.neo-play-style-btn {
  min-height: 36px;
  padding: 6px 14px;
  border: 0;
  border-radius: 980px;
  background: transparent;
  color: var(--neo-forest-dark);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.neo-play-style-btn.is-active {
  background: var(--neo-forest-dark);
  color: #f5ebc4;
  box-shadow: 0 2px 6px rgba(26, 46, 26, 0.25);
}
.neo-play-style-btn:focus-visible { outline: 3px solid var(--neo-gold); outline-offset: 1px; }

/* Runenleiter: alle Stufen bis zum Ziel, mit Regel und Anzahl auf dem Brett */
.neo-ladder {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(212, 166, 74, 0.45);
}
.neo-ladder-title { margin: 0; font-size: 19px; color: var(--neo-forest-dark); text-align: center; }
.neo-ladder-hint { margin: 6px 0 14px; font-size: 15px; line-height: 1.45; color: var(--neo-forest); text-align: center; }
/* Wie die Runen-Leiter im Spiel: je Zeile eine Rechnung „Rune + Rune = nächste Rune · Name". */
.neo-ladder-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 430px;
  display: grid;
  gap: 6px;
}
.neo-ladder-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(176, 142, 70, 0.16);
  border: 1px solid rgba(176, 142, 70, 0.28);
}
.neo-ladder-row.is-goal {
  border: 2px solid var(--neo-gold);
  background: #fff3cf;
  box-shadow: 0 0 0 3px rgba(212, 166, 74, 0.18);
}
.neo-ladder-tile {
  position: relative;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background-size: 100% 100%;
  border-radius: 8px;
  filter: drop-shadow(0 2px 3px rgba(26, 46, 26, 0.3));
}
.neo-ladder-tile img { width: 40px; height: 40px; filter: drop-shadow(1px 2px 1px rgba(15, 25, 12, 0.7)); }
/* Wert-Plakette wie auf dem Brett; folgt dem Anzeige-Schalter (0 = Rune + Zahl, 1 = nur Runen, 2 = nur Zahlen) */
.neo-ladder-num {
  position: absolute;
  right: -3px;
  bottom: -3px;
  min-width: 20px;
  padding: 1px 4px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: #f5ebc4;
  background: rgba(26, 46, 26, 0.88);
}
.neo-ladder[data-style="1"] .neo-ladder-num { display: none; }
.neo-ladder[data-style="2"] .neo-ladder-tile img { display: none; }
.neo-ladder[data-style="2"] .neo-ladder-num {
  position: static;
  min-width: 0;
  padding: 0;
  font-size: 15px;
  color: #fff;
  background: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}
.neo-ladder-op {
  flex: 0 0 auto;
  width: 16px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--neo-forest-dark);
}
.neo-ladder-text { display: flex; flex-direction: column; min-width: 0; margin-left: 6px; line-height: 1.25; }
.neo-ladder-text strong { font-size: 17px; color: var(--neo-forest-dark); }
.neo-ladder-value { font-size: 13px; font-weight: 700; color: #7a5a1c; font-variant-numeric: tabular-nums; }
.neo-ladder[data-style="1"] .neo-ladder-value { display: none; }
.neo-ladder-goal {
  align-self: flex-start;
  margin-top: 3px;
  padding: 1px 8px;
  border-radius: 980px;
  font-size: 12px;
  font-weight: 700;
  color: #1a2e1a;
  background: linear-gradient(135deg, var(--neo-gold-light), var(--neo-gold));
}
@media (max-width: 400px) {
  .neo-ladder-row { gap: 5px; padding: 6px 8px; }
  .neo-ladder-tile { flex-basis: 40px; width: 40px; height: 40px; }
  .neo-ladder-tile img { width: 34px; height: 34px; }
  .neo-ladder-text strong { font-size: 15px; }
}

.neo-play-board { display: flex; justify-content: center; }
.neo-play-board canvas {
  display: block;
  touch-action: none;           /* Wischen auf dem Brett scrollt nicht die Seite */
  -webkit-user-select: none;
  user-select: none;
  border-radius: 14px;
  outline: none;
}
.neo-play-board canvas:focus-visible { box-shadow: 0 0 0 3px var(--neo-gold); }

.neo-play-status {
  min-height: 1.5em;
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
  color: var(--neo-forest);
}

.neo-play-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.neo-play-btn {
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 980px;
  border: 1px solid rgba(45, 74, 43, 0.35);
  background: #fffdf6;
  color: var(--neo-forest-dark);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.neo-play-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(26, 46, 26, 0.12); }
.neo-play-btn:disabled { opacity: 0.45; cursor: default; }
.neo-play-btn-gold {
  border-color: transparent;
  background: linear-gradient(135deg, var(--neo-gold-light), var(--neo-gold));
  color: #1a2e1a;
}

.neo-play-win {
  margin-top: 18px;
  padding: 18px 16px 20px;
  border-radius: 18px;
  background: var(--neo-forest-dark);
  color: #f5ebc4;
  text-align: center;
}
.neo-play-win[hidden] { display: none; }
.neo-play-stars { margin: 0; font-size: 34px; letter-spacing: 6px; color: var(--neo-gold-light); }
.neo-play-win-title { margin: 6px 0 0; font-size: 22px; font-weight: 700; }
.neo-play-win-sub { margin: 6px 0 0; font-size: 16px; color: #e8dcae; }
.neo-play-store-note { margin: 18px 0 0; font-size: 15px; color: #e8dcae; }
.neo-play-stores { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.neo-play-win .neo-play-btn { background: #fffdf6; }

/* Handy: Brett so breit wie möglich (Felder ≥ 40 px zum Wischen) — Karte ragt in den
   Seitenrand der Seite hinein, es bleiben 8 px Abstand zum Bildschirmrand. */
@media (max-width: 560px) {
  .neo-play-card {
    margin: 0 -16px;
    padding: 14px 4px 18px;
    border-radius: 16px;
  }
  .neo-play-hud { padding: 0 8px; font-size: 16px; }
  .neo-play-status { padding: 0 8px; font-size: 15px; }
  .neo-play-win { margin: 18px 4px 0; }
}

/* Ergebnis-Fenster über dem Spielfeld (hängt am <body>, liegt über der Navigation). */
.neo-play-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 22, 12, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.neo-play-modal[hidden] { display: none; }
.neo-play-modal.is-open { opacity: 1; }
.neo-play-modal .neo-play-win {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  margin: 0;
  padding: 30px 20px 24px;
  border: 1px solid rgba(212, 166, 74, 0.55);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  transform: scale(0.94) translateY(8px);
  transition: transform 0.22s ease;
}
.neo-play-modal.is-open .neo-play-win { transform: none; }
.neo-play-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #f5ebc4;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.neo-play-close:hover { background: rgba(255, 255, 255, 0.22); }
.neo-play-close:focus-visible { outline: 3px solid var(--neo-gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .neo-play-modal, .neo-play-modal .neo-play-win { transition: none; }
}

/* Ergebniszeile unter dem Brett (nach dem Schließen des Fensters). */
.neo-play-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 17px;
  font-weight: 600;
}
.neo-play-summary[hidden] { display: none; }
.neo-play-summary-stars { font-size: 22px; letter-spacing: 3px; color: var(--neo-gold); }

.neo-play-image { margin-top: 18px; }
.neo-play-image summary { cursor: pointer; color: var(--neo-forest); }
