/* =============================================================================
   Lektury — widok czytania i quizu w Gildii Magów (dialog Miasta Wiedzy)
   Mobile-first, kid-facing. Wszystko za scoped pod .adventure-dialog, żeby
   style nigdy nie wyciekały na resztę strony. Tokeny z game-gaming.css
   (--mint, --gold, --gh-clip itd.) mają lokalne fallbacki na wypadek braku.
   ========================================================================== */

/* --- Kicker / HUD lines ---------------------------------------------------- */
.adventure-dialog .lekt-kicker,
.adventure-dialog .lekt-hud{
  display:flex;align-items:center;gap:10px;
  font-family:var(--font-h,'Chakra Petch',system-ui,sans-serif);
  font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;
  color:var(--mint,#25f4c8);text-shadow:0 0 14px rgba(37,244,200,.35);
  margin:4px 0 12px;
}
/* Poziome kreski po bokach — HUD-owy „terminal line”. */
.adventure-dialog .lekt-kicker::before,
.adventure-dialog .lekt-hud::before{
  content:'';flex:0 0 22px;height:2px;
  background:linear-gradient(90deg,var(--mint,#25f4c8),transparent);
}
.adventure-dialog .lekt-kicker::after,
.adventure-dialog .lekt-hud::after{
  content:'';flex:1;height:2px;
  background:linear-gradient(90deg,rgba(37,244,200,.5),transparent);
}

.adventure-dialog .lekt-author{
  margin:-6px 0 12px;font-size:.85rem;color:var(--muted-2,#6f7aa3);
}

/* --- Czytania: treść ------------------------------------------------------- */
.adventure-dialog .lekt-content p{
  font-size:1.05rem;line-height:1.8;color:var(--ink,#eef1ff);
}
.adventure-dialog .lekt-content .lekt-summary{
  color:var(--muted,#97a1c6);
}
.adventure-dialog .lekt-section{
  padding:16px 0 4px;margin-top:12px;
  border-top:1px solid var(--line,rgba(126,150,255,.18));
}
.adventure-dialog .lekt-section:first-of-type{border-top:0;margin-top:0}
.adventure-dialog .lekt-section h3{
  font-family:var(--font-h,'Chakra Petch',system-ui,sans-serif);
  font-size:1.12rem;font-weight:700;letter-spacing:.02em;color:var(--ink,#eef1ff);
  border-left:3px solid var(--mint,#25f4c8);
  padding:2px 0 2px 12px;margin:6px 0 12px;
  text-shadow:0 0 16px rgba(37,244,200,.18);
}
.adventure-dialog .lekt-section ol{padding-left:22px;margin:10px 0}
.adventure-dialog .lekt-section ol li{margin-bottom:8px;line-height:1.7}

/* Wzór: wycentrowany ciemny chip monospace */
.adventure-dialog .lekt-formula{
  display:block;text-align:center;
  font-family:ui-monospace,'Cascadia Mono',Menlo,Consolas,monospace;
  font-size:1.05rem;color:var(--mint,#25f4c8);
  background:#0a0c16;border:1px solid var(--line-strong,rgba(126,150,255,.4));
  border-radius:0;clip-path:var(--gh-clip,polygon(8px 0,100% 0,100% calc(100% - 8px),calc(100% - 8px) 100%,0 100%,0 8px));
  padding:14px 18px;margin:14px auto;max-width:100%;
  overflow-x:auto;
}

/* Przykład: złoty, przycięty panel */
.adventure-dialog .lekt-example{
  border:1px solid rgba(255,210,63,.35);border-left:3px solid var(--gold,#ffd23f);
  background:rgba(255,210,63,.06);
  border-radius:0;clip-path:var(--gh-clip,polygon(8px 0,100% 0,100% calc(100% - 8px),calc(100% - 8px) 100%,0 100%,0 8px));
  padding:14px 16px;margin:14px 0;
}
.adventure-dialog .lekt-example b{
  display:block;font-family:var(--font-h,'Chakra Petch',system-ui,sans-serif);
  color:var(--gold,#ffd23f);letter-spacing:.03em;margin-bottom:6px;
}
.adventure-dialog .lekt-example p{margin:8px 0 0;color:var(--ink,#eef1ff)}

/* Błędy: ⚠ złote markery */
.adventure-dialog .lekt-mistakes-title{
  font-family:var(--font-h,'Chakra Petch',system-ui,sans-serif);
  font-size:.78rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;
  color:var(--gold,#ffd23f);margin:16px 0 8px;
}
.adventure-dialog .lekt-mistakes{list-style:none;margin:0;padding:0}
.adventure-dialog .lekt-mistakes li{
  position:relative;padding-left:28px;margin-bottom:9px;
  font-size:1rem;line-height:1.65;color:var(--muted,#97a1c6);
}
.adventure-dialog .lekt-mistakes li::before{
  content:'⚠';position:absolute;left:0;top:0;
  color:var(--gold,#ffd23f);text-shadow:0 0 10px rgba(255,210,63,.45);
}

/* Diagram */
.adventure-dialog .lekt-diagram{
  display:block;max-width:100%;height:auto;margin:16px auto;
  border-radius:12px;border:1px solid var(--line,rgba(126,150,255,.18));
  background:#0a0c16;padding:8px;
}

/* --- Akcje na dole ekranu (max 2 przyciski) -------------------------------- */
.adventure-dialog .lekt-actions{
  display:flex;flex-direction:column;gap:10px;
  margin-top:20px;padding-top:16px;
  border-top:1px dashed var(--line-strong,rgba(126,150,255,.4));
}
.adventure-dialog .lekt-cta{width:100%;min-height:52px;font-size:1rem}

.adventure-dialog .lekt-link{
  align-self:center;
  font-family:var(--font-h,'Chakra Petch',system-ui,sans-serif);
  font-size:.8rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:var(--muted,#97a1c6);
  background:none;border:0;border-bottom:1px dashed rgba(151,161,198,.4);
  padding:6px 4px 2px;cursor:pointer;min-height:40px;
  transition:color .15s,border-color .15s;
}
.adventure-dialog .lekt-link:hover{
  color:var(--mint,#25f4c8);border-bottom-color:rgba(37,244,200,.5);
}
.adventure-dialog .lekt-link:focus-visible{outline-color:var(--gold,#ffd23f)}

/* --- Quiz ------------------------------------------------------------------ */
.adventure-dialog .lekt-question{
  background:var(--panel-2,#131736);
  border:1px solid var(--line-strong,rgba(126,150,255,.4));
  border-radius:0;clip-path:var(--gh-clip,polygon(8px 0,100% 0,100% calc(100% - 8px),calc(100% - 8px) 100%,0 100%,0 8px));
  padding:16px 18px;margin:6px 0 16px;
  font-size:1.12rem;line-height:1.6;font-weight:600;color:var(--ink,#eef1ff);
}

/* Duże, wygodne opcje A–D (container .guild-quiz-options zostaje — styluje go
   też map-gaming.css; tu tylko doprecyzowujemy układ i klawisze). */
.adventure-dialog .lekt-options{
  display:grid;gap:10px;margin:0 0 6px;
}
.adventure-dialog .lekt-options button{
  display:flex;align-items:center;gap:12px;
  width:100%;min-height:54px;padding:12px 14px;
  text-align:left;font-size:1rem;line-height:1.45;color:var(--ink,#eef1ff);
}
.adventure-dialog .lekt-options .lekt-opt-key{
  flex:0 0 34px;width:34px;height:34px;display:grid;place-items:center;
  font-family:var(--font-h,'Chakra Petch',system-ui,sans-serif);
  font-size:.85rem;font-weight:700;
  color:var(--mint,#25f4c8);
  border:1px solid rgba(37,244,200,.55);background:rgba(37,244,200,.07);
  clip-path:var(--gh-clip,polygon(6px 0,100% 0,100% calc(100% - 6px),calc(100% - 6px) 100%,0 100%,0 6px));
}
.adventure-dialog .lekt-options .lekt-opt-text{flex:1}

/* Feedback (is-correct / is-wrong — bazowe style w map-gaming.css): odstępy. */
.adventure-dialog .guild-answer-feedback{margin:6px 0 14px}
.adventure-dialog .guild-answer-feedback p{
  font-size:1rem;line-height:1.7;
}

/* Podsumowanie końcowe */
.adventure-dialog .lekt-summary{
  margin:12px 0 0;font-size:.95rem;color:var(--muted,#97a1c6);text-align:center;
}

/* --- Krainy / tematy: drobne poprawki na wąskie ekrany --------------------- */
@media(max-width:420px){
  .adventure-dialog [data-guild-realm-practice]{width:100%}
}

/* --- „Lektury, których nie miałem” (profil w grze, poza dialogiem) --------- */
.lektury-not-read .lekt-nr-title{
  font-family:var(--font-h,'Chakra Petch',system-ui,sans-serif);
  letter-spacing:.03em;
}
.lektury-not-read .lekt-nr-list{list-style:none;margin:0;padding:0}
.lektury-not-read .lekt-nr-list li{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:10px 0;border-bottom:1px dashed var(--line,rgba(126,150,255,.18));
}
.lektury-not-read .lekt-nr-list li span{color:var(--ink,#eef1ff)}

/* --- Reduced motion --------------------------------------------------------- */
@media(prefers-reduced-motion:reduce){
  .adventure-dialog .lekt-link{transition:none}
  .adventure-dialog .lekt-link:hover{color:var(--muted,#97a1c6);border-bottom-color:rgba(151,161,198,.4)}
}
