/* Pocket mode — 🃏 Daily 5 quote deck + 🎲 Rediscover (books + books2, 2026-10-16) */
.pk {
  --bg: #0c0c14; --surface: #13131f; --card: #1a1a2e; --card2: #20203a; --border: #252540;
  --gold: #c8961e; --gold-glow: rgba(200,150,30,.16); --text: #e4e4f0; --muted: #8a8ab0;
  max-width: 620px; margin: 0 auto; padding: 18px 16px 24px; color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; box-sizing: border-box;
}
.pk *, .pk *::before, .pk *::after { box-sizing: border-box; }
.pk a { color: inherit; }
.pk-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pk-head h1 { font-size: 22px; margin: 0; font-weight: 800; letter-spacing: -.01em; }
.pk-head .pk-sub { color: var(--muted); font-size: 13px; }
.pk-links { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.pk-links a { font-size: 12px; text-decoration: none; color: var(--muted); border: 1px solid var(--border); border-radius: 16px; padding: 5px 11px; }
.pk-links a:hover, .pk-links a.on { color: var(--gold); border-color: var(--gold); }
@media (max-width: 768px) { .pk-links { display: none; } }

/* ── Deck ─────────────────────────────────────────────── */
.pk-dots { display: flex; gap: 6px; justify-content: center; margin: 0 0 12px; }
.pk-dots i { width: 22px; height: 4px; border-radius: 2px; background: var(--border); transition: background .2s; }
.pk-dots i.on { background: var(--gold); }
.pk-dots i.seen { background: rgba(200,150,30,.45); }
.pk-stage { position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.pk-card {
  position: relative; background: linear-gradient(160deg, var(--card2), var(--card) 55%, var(--surface));
  border: 1px solid var(--border); border-radius: 22px; padding: 26px 24px 20px;
  min-height: min(62vh, 560px); display: flex; flex-direction: column;
  box-shadow: 0 18px 50px rgba(0,0,0,.45); will-change: transform; transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .28s;
}
.pk-card.drag { transition: none; }
.pk-theme { align-self: flex-start; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 12px; background: rgba(255,255,255,.06); margin-bottom: 6px; }
.pk-qmark { font-family: Amiri, Georgia, serif; font-size: 72px; line-height: .8; color: var(--gold); opacity: .9; margin: 6px 0 4px; }
.pk-text { flex: 1; overflow-y: auto; font-family: Amiri, Georgia, "Times New Roman", serif; font-size: 23px; line-height: 1.75;
  white-space: pre-line; overflow-wrap: anywhere; padding: 2px 2px 10px; scrollbar-width: thin; }
.pk-text.len-m { font-size: 20px; } .pk-text.len-l { font-size: 18px; } .pk-text.len-xl { font-size: 16.5px; }
.pk-book { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); text-decoration: none; }
.pk-book img, .pk-book .pk-nc { width: 42px; height: 62px; border-radius: 6px; object-fit: cover; flex: 0 0 auto; background: var(--surface); border: 1px solid var(--border); }
.pk-book .pk-nc { display: flex; align-items: center; justify-content: center; }
.pk-book b { display: block; font-size: 14px; line-height: 1.35; }
.pk-book span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.pk-actions { display: flex; gap: 8px; margin-top: 14px; }
.pk-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 12px;
  border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 14px/1 inherit;
  font-family: inherit; text-decoration: none; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.pk-btn:hover { border-color: var(--gold); color: var(--gold); }
.pk-btn.gold { background: var(--gold); border-color: var(--gold); color: #111; }
.pk-btn.gold:hover { filter: brightness(1.08); color: #111; }
.pk-btn:disabled { opacity: .5; cursor: default; }
.pk-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; color: var(--muted); font-size: 12px; }
.pk-nav button { background: none; border: 1px solid var(--border); color: var(--text); width: 44px; height: 44px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.pk-nav button:disabled { opacity: .3; cursor: default; }
.pk-done { text-align: center; justify-content: center; align-items: center; gap: 12px; }
.pk-done .big { font-size: 46px; }
.pk-done h2 { margin: 0; font-size: 21px; }
.pk-done p { margin: 0; color: var(--muted); line-height: 1.6; }
.pk-done .pk-actions { width: 100%; max-width: 360px; flex-direction: column; }
.pk-toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--card);
  border: 1px solid var(--gold); color: var(--text); padding: 10px 18px; border-radius: 12px; font-size: 13px; z-index: 990; opacity: 0;
  transition: opacity .2s; pointer-events: none; }
.pk-toast.show { opacity: 1; }
@media (min-width: 769px) { .pk-toast { bottom: 28px; } }

/* ── Rediscover ───────────────────────────────────────── */
.pk-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.pk-chips button { flex: 0 0 auto; border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 18px;
  padding: 7px 13px; font: 600 13px/1 inherit; font-family: inherit; cursor: pointer; }
.pk-chips button.on { color: var(--gold); border-color: var(--gold); background: var(--gold-glow); }
.pk-spot { min-height: 0; align-items: stretch; }
.pk-spot-top { display: flex; gap: 18px; align-items: flex-start; }
.pk-cover { flex: 0 0 auto; width: 138px; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; border: 1px solid var(--border);
  background: var(--surface); box-shadow: 0 10px 30px rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; font-size: 40px; }
.pk-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pk-meta { min-width: 0; flex: 1; }
.pk-meta h2 { margin: 0 0 6px; font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; }
.pk-meta h2 a { text-decoration: none; }
.pk-meta h2 a:hover { color: var(--gold); }
.pk-authors { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.pk-authors a { text-decoration: none; }
.pk-authors a:hover { color: var(--gold); text-decoration: underline; }
.pk-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.pk-facts span { font-size: 12px; padding: 3px 9px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--border); }
.pk-stars { color: var(--gold); letter-spacing: 1px; }
.pk-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pk-cats span { font-size: 11.5px; color: var(--muted); border: 1px dashed var(--border); border-radius: 10px; padding: 3px 9px; }
.pk-quotes { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.pk-quotes h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pk-quotes blockquote { margin: 0; padding: 10px 14px; border-inline-start: 3px solid var(--gold); background: rgba(255,255,255,.03);
  border-radius: 8px; font-family: Amiri, Georgia, serif; font-size: 17px; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pk-noq { margin-top: 16px; color: var(--muted); font-size: 13px; }
.pk-spin { animation: pk-in .38s cubic-bezier(.2,.8,.2,1); }
@keyframes pk-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.pk-dice { display: inline-block; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.pk-dice.roll { transform: rotate(360deg); }
.pk-empty { color: var(--muted); text-align: center; padding: 60px 10px; }
@media (max-width: 480px) {
  .pk { padding: 14px 14px 20px; }
  .pk-card { padding: 22px 18px 16px; border-radius: 20px; }
  .pk-text { font-size: 21px; } .pk-text.len-m { font-size: 19px; } .pk-text.len-l { font-size: 17px; } .pk-text.len-xl { font-size: 16px; }
  .pk-cover { width: 112px; }
  .pk-meta h2 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .pk-card, .pk-dice { transition: none; } .pk-spin { animation: none; } }
