/* ============================================================
 * book-page.css — общие классы контента для страниц-книг.
 * Подключается ПОСЛЕ book-engine/ui/gr. Без !important там, где
 * не обязательно. Палитра — paper · ink · terracotta · gold.
 * ============================================================ */

/* спрятать оглавление-хром (движок всё равно безопасно заполняет #toc-list) */
.top-toc{ display:none !important; }
/* обрезать переполнение листа, чтобы контент не вылезал за страницу */
.page .face{ overflow:hidden !important; }

/* ── статус-кружок ── */
.bk-mark{
  width:74px; height:74px; border-radius:50%; border:2px solid var(--ink);
  display:flex; align-items:center; justify-content:center;
  font-size:36px; color:var(--ink); margin-bottom:22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}

/* ── кнопки (общие) ── */
.bk-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  background:#1a1612; color:#f3ecd9; border:none; padding:14px 26px; cursor:pointer; text-decoration:none;
  font-family:'Cormorant Garamond',serif; font-style:italic; font-size:18px; border-radius:0;
  box-shadow: inset 0 1px 0 rgba(255,235,200,.18), inset 0 -2px 0 rgba(0,0,0,.35), 0 2px 0 #0a0805, 0 6px 18px rgba(30,18,10,.28);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.bk-btn:hover:not(:disabled){ transform:translateY(-1px); background:#2a201a;
  box-shadow: inset 0 1px 0 rgba(255,235,200,.24), inset 0 -2px 0 rgba(0,0,0,.35), 0 3px 0 #0a0805, 0 10px 22px rgba(30,18,10,.34); }
.bk-btn:active:not(:disabled){ transform:translateY(1px); }
.bk-btn:disabled{ opacity:.4; cursor:not-allowed; box-shadow:none; }
.bk-btn.ghost{ background:transparent; color:#1a1612; border:1px solid rgba(26,22,18,.22); box-shadow:none; }
.bk-btn.ghost:hover:not(:disabled){ background:#1a1612; color:#f3ecd9; border-color:#1a1612; }
.bk-btn-row{ display:flex; gap:12px; flex-wrap:wrap; }
.bk-btn-row .bk-btn{ flex:1; min-width:160px; }

/* ── flash ── */
.bk-flash{ display:none; padding:11px 14px; margin-bottom:14px; font-size:14px;
  font-family:'Cormorant Garamond',serif; border-radius:2px; }
.bk-flash.show{ display:block; }
.bk-flash.err{ background:rgba(138,63,23,.08); color:#8a3f17; border-left:3px solid #8a3f17; }
.bk-flash.ok{ background:rgba(93,122,60,.08); color:#5d7a3c; border-left:3px solid #5d7a3c; }
.bk-flash.info{ background:rgba(26,22,18,.06); color:var(--ink); border-left:3px solid var(--gold,#c8a163); }

/* ── список-строки ── */
.bk-row{ display:grid; grid-template-columns:38px 1fr auto; gap:16px; align-items:baseline;
  padding:16px 4px; border-bottom:1px dotted rgba(26,22,18,.22); text-decoration:none; color:inherit;
  transition:background .2s, padding .2s; }
.bk-row:hover{ background:rgba(184,138,93,.07); padding-left:12px; padding-right:12px; }
.bk-row-n{ font-family:'Cormorant Garamond',serif; font-style:italic; font-size:22px; color:var(--ink-mute); }
.bk-row-t{ font-family:'Cormorant Garamond',serif; font-style:italic; font-size:21px; color:var(--ink); transition:color .2s; }
.bk-row:hover .bk-row-t{ color:#8a3f17; }
.bk-row-x{ font-family:'JetBrains Mono',monospace; font-size:9px; letter-spacing:.18em; text-transform:uppercase; color:var(--ink-mute); white-space:nowrap; }

/* ── detail / info box ── */
.bk-detail{ background:var(--paper-2,#f1ede2); border-left:3px solid var(--gold,#c8a163);
  padding:15px 18px; margin:0 0 18px; font-family:'JetBrains Mono',monospace; font-size:12px;
  line-height:1.9; color:var(--ink-mute); }
.bk-detail b{ color:var(--ink); }

/* ── OTP ячейки ── */
.bk-otp{ display:flex; gap:9px; margin-bottom:12px; }
.bk-cell{ flex:1; min-width:0; text-align:center; font-family:'JetBrains Mono',monospace; font-size:26px;
  padding:12px 0; border:none; border-bottom:2px solid var(--rule); background:transparent; color:var(--ink);
  outline:none; -webkit-appearance:none; border-radius:0; }
.bk-cell:focus{ border-bottom-color:var(--ink); }
.bk-timer{ font-family:'JetBrains Mono',monospace; font-size:12px; color:var(--ink-mute); margin-top:6px; }

/* ── summary / target line ── */
.bk-summary{ padding:13px 15px; background:var(--paper-2,#f1ede2); border-left:3px solid var(--gold,#c8a163);
  margin-bottom:18px; font-family:'Cormorant Garamond',serif; font-size:16px; color:var(--ink); }
.bk-summary b{ font-style:italic; }

/* ── status pill ── */
.bk-pill-status{ display:inline-flex; align-items:center; gap:8px; padding:6px 13px; border-radius:999px;
  font-family:'JetBrains Mono',monospace; font-size:9px; letter-spacing:.16em; text-transform:uppercase; }
.bk-pill-status .d{ width:7px; height:7px; border-radius:50%; }
.bk-pill-status.on{ background:rgba(93,122,60,.12); color:#5d7a3c; }
.bk-pill-status.on .d{ background:#5d7a3c; box-shadow:0 0 0 3px rgba(93,122,60,.18); }
.bk-pill-status.off{ background:rgba(138,63,23,.1); color:#8a3f17; }
.bk-pill-status.off .d{ background:#8a3f17; }

/* ── lite card ── */
.bk-cardlite{ background:#fcfaf2; border:1px solid rgba(26,22,18,.14); padding:18px 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 2px 3px 0 rgba(180,160,130,.18); }

/* ── spinner ── */
.bk-spinner{ display:inline-block; width:15px; height:15px; border:2px solid rgba(26,22,18,.2);
  border-top-color:var(--ink); border-radius:50%; animation:bk-spin 1s linear infinite; vertical-align:-2px; margin-right:6px; }
@keyframes bk-spin{ to{ transform:rotate(360deg); } }
