/* libro.css — El Libro Digital (book test con espejo en vivo) */

/* Barra de salida (igual que el resto de efectos) */
.exit-bar { position:fixed; top:10px; right:10px; display:flex; gap:8px; z-index:60; }
.exit-btn { font-size:12px; font-weight:600; padding:6px 11px; border-radius:9px; border:1px solid var(--line); background:rgba(255,255,255,.92); color:var(--muted); cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,.08); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); }
.exit-btn:active { transform:translateY(1px); }
.exit-btn.danger { color:var(--danger); border-color:#f3c9d2; }
#logout-btn { display:none; }

/* ===================== JUEGO (lector) ===================== */
.lb-screen { min-height:100svh; min-height:100vh; background:#f4ecd8; color:#2e2418; }
.lb-screen .exit-btn { background:rgba(244,236,216,.9); color:#7a6a4a; border-color:#d8c9a5; }

/* Portada */
.lb-cover { position:fixed; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:30px; padding:24px; background:linear-gradient(160deg,#274a3a 0%, #1c3a2c 55%, #142a20 100%); text-align:center; }
.lb-conn { margin:0; min-height:18px; font-size:12px; font-style:italic; color:#7ea28c; }
.lb-conn.is-error { color:#e08a8a; }
.lb-cover-art { display:flex; flex-direction:column; align-items:center; gap:14px; padding:38px 30px; border:2.5px solid #c9a84c; border-radius:6px; max-width:320px; box-shadow:inset 0 0 0 5px #1c3a2c, inset 0 0 0 7px rgba(201,168,76,.5); }
.lb-cover-kicker { margin:0; font-size:10px; letter-spacing:3.5px; color:#9ec0aa; }
.lb-cover-title { margin:0; font-family:Georgia, "Times New Roman", serif; font-size:32px; line-height:1.2; color:#f0e3bd; font-weight:700; }
.lb-cover-line { width:70px; height:2px; background:#c9a84c; }
.lb-cover-author { margin:0; font-family:Georgia, serif; font-size:15px; font-style:italic; color:#cdb97f; }
.lb-new { font-size:14px; font-weight:800; letter-spacing:2px; padding:13px 40px; border-radius:14px; border:1px solid #c9a84c; background:rgba(201,168,76,.12); color:#f0e3bd; cursor:pointer; }
.lb-new:active { transform:translateY(1px); }
.lb-new:disabled { opacity:.4; cursor:default; }

/* Lector */
.lb-reader { position:fixed; inset:0; display:flex; flex-direction:column; background:#f4ecd8; }
.lb-bar { padding:13px 18px 9px; font-size:12px; letter-spacing:1px; color:#8a7a5a; text-align:center; border-bottom:1px solid #e3d6b6; }
.lb-text { flex:1; overflow-y:auto; padding:22px 26px 30px; font-family:Georgia, "Times New Roman", serif; font-size:19px; line-height:1.75; text-align:justify; -webkit-user-select:none; user-select:none; }
.lb-text p { margin:0 0 1em; }
.lb-text p:first-child::first-letter { font-size:2.4em; float:left; line-height:.9; padding-right:6px; color:#6a5426; }
.lb-text .w { border-radius:3px; }
.lb-foot { display:flex; align-items:center; gap:12px; padding:10px 18px 16px; }
.lb-progress { flex:1; height:3px; border-radius:2px; background:#e0d2ae; overflow:hidden; }
.lb-progress span { display:block; height:100%; background:#a8905c; width:0; transition:width .3s; }
#lb-pageno { font-size:12px; color:#8a7a5a; font-variant-numeric:tabular-nums; }

/* Zonas de toque para pasar página (invisibles) */
.lb-tap { position:absolute; top:15%; bottom:12%; width:20%; z-index:5; }
.lb-tap.left { left:0; }
.lb-tap.right { right:0; }

/* ===================== CONTROL (espejo) ===================== */
.lb-ctrl { min-height:100svh; min-height:100vh; background:#12151c; color:#e6e9f2; }
.lb-ctrl .exit-btn { background:rgba(30,34,44,.9); color:#9aa2b5; border-color:#333a4a; }
.lb-ctrl-inner { max-width:560px; margin:0 auto; padding:54px 16px 30px; display:flex; flex-direction:column; gap:14px; }
.lb-ctrl-head { text-align:center; display:flex; flex-direction:column; gap:4px; }
.lb-ctrl-title { margin:0; font-size:17px; font-weight:800; letter-spacing:.5px; }
.lb-ctrl-state { margin:0; font-size:12.5px; color:#5fbf8a; font-style:italic; min-height:18px; }

.lb-word-box { display:flex; flex-direction:column; align-items:center; gap:6px; padding:18px 14px; border-radius:16px; background:#1b2029; border:1px solid #2c3342; }
.lb-word-label { font-size:10px; letter-spacing:2.5px; color:#7b8296; font-weight:700; }
.lb-word { font-family:Georgia, serif; font-size:34px; font-weight:700; color:#ffd479; word-break:break-word; text-align:center; }
.lb-word-page { font-size:12px; color:#7b8296; }

.lb-history-box { padding:12px 14px; border-radius:14px; background:#1b2029; border:1px solid #2c3342; display:flex; flex-direction:column; gap:6px; }
.lb-history { margin:0; font-size:14px; color:#c6cede; line-height:1.6; }

.lb-mirror-text { padding:16px 18px; border-radius:14px; background:#f4ecd8; color:#2e2418; font-family:Georgia, serif; font-size:14.5px; line-height:1.65; text-align:justify; max-height:44vh; overflow-y:auto; }
.lb-mirror-text p { margin:0 0 .9em; }
.lb-mirror-text mark { background:#ffd479; color:#4a3a10; border-radius:3px; padding:0 3px; font-weight:700; }
