/* Book-Tribe Warm Editorial — Design Tokens v2 */
/* Load alongside existing style.css. No conflicts — pure variables. */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* Color palette */
  --bt-paper:   #F7F3EE;
  --bt-ink:     #1C1309;
  --bt-warm:    #E8E0D4;
  --bt-white:   #FFFFFF;
  --bt-accent:  #C4531A;
  --bt-accent2: #2D6A4F;
  --bt-gold:    #B8860B;
  --bt-muted:   #8C7B69;

  /* Typography */
  --bt-font-display: 'Instrument Serif', Georgia, serif;
  --bt-font-ui:      'DM Sans', system-ui, sans-serif;

  /* Type scale */
  --bt-text-xs:   10px;
  --bt-text-sm:   12px;
  --bt-text-base: 14px;
  --bt-text-md:   16px;
  --bt-text-lg:   20px;
  --bt-text-xl:   24px;
  --bt-text-2xl:  32px;

  /* Spacing */
  --bt-space-1:  4px;
  --bt-space-2:  8px;
  --bt-space-3:  12px;
  --bt-space-4:  16px;
  --bt-space-6:  24px;
  --bt-space-8:  32px;
  --bt-space-12: 48px;

  /* Border radius */
  --bt-radius-sm:   4px;   /* book covers */
  --bt-radius-md:   8px;   /* cards */
  --bt-radius-lg:   12px;  /* large cards */
  --bt-radius-pill: 20px;  /* pills, tags */
  --bt-radius-full: 50%;   /* avatars */

  /* Borders */
  --bt-border: 1px solid var(--bt-warm);

  /* Shadows — minimal */
  --bt-shadow-sm: 0 1px 3px rgba(28,19,9,0.06);
  --bt-shadow-md: 0 2px 8px rgba(28,19,9,0.08);

  /* Layout */
  --bt-max-width:    1140px;
  --bt-max-width-lg: 1320px;
  --bt-nav-height:   52px;
  --bt-bottom-nav:   60px; /* mobile bottom tab bar */
}

/* Base resets — only applied when new_ui body class is present */
body.bt-v2 {
  font-family: var(--bt-font-ui);
  background: var(--bt-paper);
  color: var(--bt-ink);
  -webkit-font-smoothing: antialiased;
  margin: 0;
  overflow-x: hidden;
}

body.bt-v2 * {
  box-sizing: border-box;
}

/* ── Pre-login pages: undo app-shell body rules so v1 pre-login layout works ── */
body.pre-login-page.bt-v2 {
  background: transparent;
  overflow: auto;
  height: auto;
  color: inherit;
}
body.pre-login-page.bt-v2 .signup-wrap,
body.pre-login-page.bt-v2 .container {
  position: relative;
  z-index: 1;
}

/* ── Phase 1: Shell ── */
/* Note: @import below is redundant (must be at file top) — Phase 0 import covers these weights */
/* @import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Instrument+Serif:ital,wght@0,400;1,400&display=swap'); */

/* ── Icon utils ── */
body.bt-v2 .ico { width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
body.bt-v2 .only-desktop { display:none !important; }

/* ── App shell ── */
body.bt-v2 .bt-app { min-height:100%; display:flex; flex-direction:column; background:var(--bt-white); }
body.bt-v2 .bt-sidebar { display:none; }

/* ── Brand ── */
body.bt-v2 .bt-brand { font-family:'Instrument Serif',Georgia,serif !important; font-size:26px; line-height:1; letter-spacing:.5px; white-space:nowrap; color:var(--bt-ink); }
body.bt-v2 .bt-brand b { font-weight:400; color:var(--bt-accent); }

/* ── Topbar ── */
body.bt-v2 .bt-topbar { position:sticky; top:0; z-index:30; width:100%; box-sizing:border-box; background:var(--bt-white); border-bottom:1px solid var(--bt-warm); display:flex; align-items:center; gap:12px; padding:0 18px; backdrop-filter:none; }
body.bt-v2 .bt-topbar.is-scrolled { box-shadow:0 2px 8px rgba(28,19,9,.06); }
body.bt-v2 .bt-topbar-actions { display:flex; align-items:center; gap:14px; margin-left:auto; }
body.bt-v2 .bt-icon-btn { display:flex; align-items:center; justify-content:center; background:none; border:none; padding:0; color:var(--bt-ink); cursor:pointer; }
body.bt-v2 .bt-avatar { width:32px; height:32px; border-radius:50%; flex-shrink:0; background:var(--bt-accent); color:#fff; display:flex; align-items:center; justify-content:center; font-size:12.5px; font-weight:600; letter-spacing:.3px; font-family:var(--bt-font-ui); }
body.bt-v2 .bt-lang { display:inline-flex; align-items:center; border:1px solid var(--bt-warm); border-radius:99px; overflow:hidden; font-size:11.5px; font-weight:600; letter-spacing:.4px; }
body.bt-v2 .bt-lang button { border:none; background:none; padding:5px 9px; color:var(--bt-muted); line-height:1; cursor:pointer; font-family:var(--bt-font-ui); }
body.bt-v2 .bt-lang button.on { background:var(--bt-ink); color:var(--bt-paper); }
body.bt-v2 .bt-lore-pill { display:inline-flex; align-items:center; gap:4px; background:rgba(184,134,11,.12); border:1px solid rgba(184,134,11,.28); border-radius:99px; padding:4px 9px; color:var(--bt-gold); font-size:12px; font-weight:700; letter-spacing:.3px; }
body.bt-v2 .bt-search { display:flex; align-items:center; gap:9px; flex:1; background:var(--bt-white); border:1px solid var(--bt-warm); border-radius:99px; padding:0 14px; color:var(--bt-muted); font-size:14px; min-width:0; }
body.bt-v2 .bt-search input { border:none; background:transparent; outline:none; flex:1; min-width:0; font-family:var(--bt-font-ui); font-size:14px; color:var(--bt-ink); }
body.bt-v2 .bt-search input::placeholder { color:var(--bt-muted); }

/* ── Content shell ── */
body.bt-v2 .bt-content { flex:1; padding-bottom:92px; }
body.bt-v2 .bt-content-grid { display:flex; flex-direction:column; }
body.bt-v2 .bt-col-rail { display:flex; flex-direction:column; }

/* ── Bottom tabbar ── */
body.bt-v2 .bt-tabbar { position:fixed; left:0; right:0; bottom:0; z-index:40; background:var(--bt-white); border-top:1px solid var(--bt-warm); display:flex; padding:9px 8px calc(9px + env(safe-area-inset-bottom)); }
body.bt-v2 .bt-tab { flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; background:none; border:none; color:var(--bt-muted); transition:color .15s; cursor:pointer; font-family:var(--bt-font-ui); }
body.bt-v2 .bt-tab .ico { width:23px; height:23px; }
body.bt-v2 .bt-tab span { font-size:10px; font-weight:500; letter-spacing:.2px; }
body.bt-v2 .bt-tab.on { color:var(--bt-accent); }
body.bt-v2 .bt-tab.on span { font-weight:600; }

/* ── Narrow: ensure sidebar never bleeds in ── */
@media (max-width:899px) {
  body.bt-v2 .bt-sidebar { display:none !important; }
  body.bt-v2 .bt-app { display:flex !important; flex-direction:column !important; background:var(--bt-paper) !important; height:auto !important; overflow:visible !important; }
  body.bt-v2 { overflow:auto !important; height:auto !important; }
  body.bt-v2 .bt-col-main-shell { height:auto !important; overflow:visible !important; }
}

/* ── Desktop ── */
@media (min-width:900px) {
  body.bt-v2 .only-mobile { display:none !important; }
  body.bt-v2 .bt-search.only-desktop { display:flex !important; }

  body.bt-v2:not(.pre-login-page) { overflow:hidden; height:100vh; }
  body.bt-v2 .bt-app { display:grid; grid-template-columns:258px minmax(0,1fr); max-width:1360px; margin:0 auto; height:100vh; overflow:hidden; align-items:start; position:relative; background:var(--bt-white); }
  body.bt-v2 .bt-tabbar { display:none; }

  body.bt-v2 .bt-sidebar { display:flex; flex-direction:column; position:sticky; top:0; height:100vh; width:258px; flex-shrink:0; overflow-y:auto; scrollbar-width:none; align-self:start; background:var(--bt-white); border-right:1px solid var(--bt-warm); padding:20px 14px 16px; }
  body.bt-v2 .bt-sidebar::-webkit-scrollbar { display:none; }
  body.bt-v2 .bt-col-main-shell { min-width:0; display:flex; flex-direction:column; height:100vh; overflow-y:auto; overflow-x:hidden; background:var(--bt-paper); scrollbar-width:thin; scrollbar-color:var(--bt-warm) transparent; }
  body.bt-v2 .bt-col-main-shell::-webkit-scrollbar { width:6px; }
  body.bt-v2 .bt-col-main-shell::-webkit-scrollbar-track { background:transparent; }
  body.bt-v2 .bt-col-main-shell::-webkit-scrollbar-thumb { background:var(--bt-warm); border-radius:3px; }
  body.bt-v2 .bt-sidebar .bt-brand { font-size:28px; letter-spacing:.5px; padding:4px 12px 22px; }
  body.bt-v2 .bt-nav { display:flex; flex-direction:column; gap:2px; }
  body.bt-v2 .bt-nav a { display:flex; align-items:center; gap:13px; padding:9px 13px; border-radius:11px; color:var(--bt-muted); font-size:14.5px; font-weight:500; letter-spacing:.1px; transition:background .15s,color .15s; text-decoration:none; }
  body.bt-v2 .bt-nav a .ico { width:21px; height:21px; }
  body.bt-v2 .bt-nav a:hover { background:var(--bt-paper); color:var(--bt-ink); }
  body.bt-v2 .bt-nav a.on { background:rgba(196,83,26,.10); color:var(--bt-accent); }
  body.bt-v2 .bt-nav-badge { margin-left:auto; background:var(--bt-accent); color:#fff; border-radius:99px; padding:2px 7px; font-size:10px; font-weight:700; line-height:1; letter-spacing:.2px; }
  body.bt-v2 .bt-add-book { display:flex; align-items:center; gap:9px; padding:10px 13px; border-radius:11px; color:var(--bt-accent); border:1.5px dashed rgba(196,83,26,.32); font-size:13.5px; font-weight:600; margin-bottom:14px; transition:background .15s; text-decoration:none; }
  body.bt-v2 .bt-add-book:hover { background:rgba(196,83,26,.06); }
  body.bt-v2 .bt-add-book .ico { width:20px; height:20px; }

  body.bt-v2 .bt-side-foot { margin-top:auto; display:flex; flex-direction:column; gap:10px; }
  body.bt-v2 .bt-lore-side { display:flex; align-items:center; gap:9px; padding:12px 14px; background:rgba(184,134,11,.08); border:1px solid rgba(184,134,11,.22); border-radius:12px; color:var(--bt-gold); font-size:14px; font-weight:700; }
  body.bt-v2 .bt-lore-side .lore-lbl { font-size:11px; color:var(--bt-muted); font-weight:500; margin-right:auto; }
  body.bt-v2 .bt-side-user { display:flex; align-items:flex-start; gap:11px; padding:10px 12px; border-radius:12px; border:1px solid var(--bt-warm); text-decoration:none; color:inherit; }
  body.bt-v2 .bt-side-user .bt-avatar { width:36px; height:36px; font-size:13px; flex-shrink:0; margin-top:2px; }
  body.bt-v2 .bt-u-name { font-size:13.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  body.bt-v2 .bt-u-badges { display:flex; gap:5px; margin-top:4px; flex-wrap:wrap; }
  body.bt-v2 .bt-badge-pill { font-size:10px; font-weight:700; letter-spacing:.4px; padding:2px 7px; border-radius:99px; }
  body.bt-v2 .bt-badge-premium { background:rgba(196,83,26,.12); color:var(--bt-accent); border:1px solid rgba(196,83,26,.25); }
  body.bt-v2 .bt-badge-bw { background:rgba(45,106,79,.12); color:var(--bt-accent2); border:1px solid rgba(45,106,79,.25); }
  body.bt-v2 .bt-u-link { font-size:11.5px; color:var(--bt-muted); margin-top:4px; display:block; }
  body.bt-v2 .bt-side-signout { display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:10px; text-decoration:none; color:var(--bt-muted); font-size:13px; transition:background .12s,color .12s; }
  body.bt-v2 .bt-side-signout:hover { background:rgba(192,57,43,.07); color:#c0392b; }
  body.bt-v2 .bt-side-signout .ico { width:17px; height:17px; flex-shrink:0; }

  body.bt-v2 .bt-topbar { padding:0 40px; gap:24px; width:100%; box-sizing:border-box; background:transparent; border-bottom:1px solid var(--bt-warm); justify-content:space-between; }
  body.bt-v2 .bt-topbar .bt-search { flex:0 1 480px; max-width:480px; min-width:280px; }
  body.bt-v2 .bt-topbar .bt-topbar-actions { margin-left:0; flex-shrink:0; }
  body.bt-v2 .bt-content { padding-bottom:32px; }
  body.bt-v2 .bt-content-grid { display:grid; grid-template-columns:1fr 320px; grid-template-areas:"main rail" "library rail"; gap:0 36px; padding:8px 40px 0; align-items:start; }
  body.bt-v2 .bt-col-main { grid-area:main; min-width:0; }
  body.bt-v2 .bt-mylibrary-section { grid-area:library; min-width:0; }
  body.bt-v2 .bt-col-rail { grid-area:rail; }

  /* Desktop: larger cover sizes in my books shelf */
  body.bt-v2 .bt-mybooks-row .book-tile,
  body.bt-v2 .bt-mybooks-row .mybook,
  body.bt-v2 .bt-mybooks-row .bt-mybook { width:118px; }
  body.bt-v2 .bt-mybook { width:118px; }
  body.bt-v2 .bt-mybooks-row .book-tile-cover,
  body.bt-v2 .bt-mybooks-row .mybook-cover,
  body.bt-v2 .bt-mybooks-row .bt-mybook-cover,
  body.bt-v2 .bt-mybooks-row .book-cover,
  body.bt-v2 .bt-mybooks-row img:not(.bt-cov-pct-ring) { width:118px !important; height:169px !important; }
  body.bt-v2 .bt-mybook-cover { width:118px; height:169px; }

  /* Topbar: solid background on desktop (overrides transparent) */
  body.bt-v2 .bt-topbar { background:var(--bt-white) !important; border-bottom:1px solid var(--bt-warm); }

  /* Neutralise v1 .container constraints when rendered inside v2 shell */
  body.bt-v2 .bt-content .container {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Phase 2 — Home page components
   ═══════════════════════════════════════════════════════════════ */

/* ── Section utilities ── */
body.bt-v2 .bt-sec-head { display:flex; align-items:baseline; justify-content:space-between; padding:0 18px; }
body.bt-v2 .bt-label { font-size:11.5px; font-weight:600; letter-spacing:1.3px; text-transform:uppercase; color:var(--bt-muted); }
body.bt-v2 .bt-see-all { font-size:12.5px; font-weight:500; color:var(--bt-accent); text-decoration:none; }
body.bt-v2 .bt-sec-mt { margin-top:28px; }

/* ── Greeting ── */
body.bt-v2 .bt-greeting { padding:16px 18px 0; }
body.bt-v2 .bt-greeting-line1 { font-family:var(--bt-font-ui); font-size:13px; color:var(--bt-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:2px; line-height:1.4; display:block; }
body.bt-v2 .bt-greeting-h1 { font-family:var(--bt-font-display); font-weight:400; font-size:36px; line-height:1.05; margin:0; color:var(--bt-ink); letter-spacing:.2px; }

/* ── Read card ── */
body.bt-v2 .bt-read-card { margin:14px 18px 0; background:var(--bt-white); border:1px solid var(--bt-warm); border-bottom:none; border-radius:16px 16px 0 0; overflow:hidden; box-shadow:0 1px 2px rgba(28,19,9,.04),0 8px 24px rgba(28,19,9,.05); }
body.bt-v2 .bt-read-row { display:flex; gap:14px; align-items:center; padding:16px; }
body.bt-v2 .bt-read-row+.bt-read-row { border-top:1px solid var(--bt-warm); }
body.bt-v2 .bt-read-row:last-of-type { border-bottom:none; padding-bottom:12px; }
body.bt-v2 .bt-cover { width:54px; height:76px; border-radius:3px; flex-shrink:0; position:relative; background:#C4A882; box-shadow:0 1px 2px rgba(28,19,9,.2),inset 1.5px 0 0 rgba(255,255,255,.18),inset -1px 0 2px rgba(0,0,0,.22); overflow:hidden; }
body.bt-v2 .bt-cover img { width:100%; height:100%; object-fit:cover; display:block; }
body.bt-v2 .bt-fmt-badge { position:absolute; bottom:3px; right:3px; background:rgba(28,19,9,.78); border-radius:3px; padding:2px 4px; color:#F7F3EE; font-size:8.5px; font-weight:700; letter-spacing:.3px; line-height:1; }
body.bt-v2 .bt-read-meta { flex:1; min-width:0; }
body.bt-v2 .bt-read-meta .bt-title { font-family:var(--bt-font-display); font-size:19px; line-height:1.1; margin-bottom:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body.bt-v2 .bt-read-meta .bt-sub { font-size:12.5px; color:var(--bt-muted); margin-bottom:11px; }
body.bt-v2 .bt-prog-wrap { display:flex; align-items:center; gap:9px; }
body.bt-v2 .bt-track { flex:1; height:4px; border-radius:99px; background:var(--bt-warm); overflow:hidden; }
body.bt-v2 .bt-track span { display:block; height:100%; border-radius:99px; }
body.bt-v2 .bt-pct { font-size:11px; font-weight:600; flex-shrink:0; }
body.bt-v2 .bt-pace-btn { flex-shrink:0; width:36px; height:36px; border-radius:50%; background:var(--bt-paper); border:1.5px solid var(--bt-warm); display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--bt-muted); padding:0; transition:background .15s,color .15s,border-color .15s; }
body.bt-v2 .bt-pace-btn:hover { background:rgba(196,83,26,.08); color:var(--bt-accent); border-color:rgba(196,83,26,.3); }
body.bt-v2 .bt-pace-btn.is-active { background:rgba(196,83,26,.1); color:var(--bt-accent); border-color:rgba(196,83,26,.4); }
body.bt-v2 .bt-pace-btn svg { width:17px; height:17px; stroke:currentColor; fill:none; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
body.bt-v2 .bt-pace-panel { margin:10px 0 0 68px; }

/* ── Stats strip ── */
body.bt-v2 .bt-stats-strip { border:1px solid var(--bt-warm); border-top:1px solid var(--bt-warm); display:flex; overflow-x:auto; padding:10px 22px 14px; scrollbar-width:none; justify-content:space-between; background:var(--bt-white); border-radius:0 0 16px 16px; margin:0 18px; box-shadow:0 1px 2px rgba(28,19,9,.04),0 8px 24px rgba(28,19,9,.05); }
body.bt-v2 .bt-stats-strip::-webkit-scrollbar { display:none; }
body.bt-v2 .bt-stat-item { flex:1 0 auto; display:flex; flex-direction:column; align-items:center; gap:4px; padding:0 14px; }
body.bt-v2 .bt-stat-item+.bt-stat-item { border-left:1px solid var(--bt-warm); }
body.bt-v2 .bt-stat-d { display:flex; flex-direction:row; align-items:flex-start; gap:4px; }
body.bt-v2 .bt-stat-col { display:flex; flex-direction:column; align-items:center; gap:2px; }
body.bt-v2 .bt-stat-leg { font-size:7px; font-weight:600; letter-spacing:.5px; text-transform:uppercase; color:var(--bt-muted); opacity:.6; white-space:nowrap; line-height:1; text-align:center; height:10px; display:block; width:100%; }
body.bt-v2 .bt-stat-n-all { font-family:'Instrument Serif',Georgia,serif !important; font-size:16px; line-height:1; color:var(--bt-muted); display:block; }
body.bt-v2 .bt-stat-n-sep { font-size:14px; color:var(--bt-warm); line-height:1; margin-top:8px; flex-shrink:0; padding:0 2px; }
body.bt-v2 .bt-stat-n-yr { font-family:'Instrument Serif',Georgia,serif !important; font-size:22px; line-height:1; color:var(--bt-ink); font-weight:400; display:block; }
body.bt-v2 .bt-stat-lbl { font-size:9px; color:var(--bt-muted); letter-spacing:.5px; text-transform:uppercase; white-space:nowrap; margin-top:3px; }

/* ── Goals ── */
body.bt-v2 .bt-goals-row { display:flex; gap:12px; padding:14px 18px 0; }
body.bt-v2 .bt-goal-card { flex:1; background:var(--bt-white); border:1.5px dashed var(--bt-warm); border-radius:14px; padding:16px; display:flex; flex-direction:column; align-items:center; text-align:center; gap:5px; }
body.bt-v2 .bt-goal-lbl { font-size:11px; font-weight:600; letter-spacing:1.1px; text-transform:uppercase; color:var(--bt-muted); }
body.bt-v2 .bt-goal-val { font-family:var(--bt-font-display); display:flex; align-items:baseline; gap:0; line-height:1; }
body.bt-v2 .bt-goal-n-small { font-size:16px; color:var(--bt-muted); }
body.bt-v2 .bt-goal-n-sep { font-size:16px; color:var(--bt-warm); padding:0 2px; }
body.bt-v2 .bt-goal-n-big { font-size:28px; color:var(--bt-ink); }
body.bt-v2 .bt-goal-bar { width:100%; height:6px; background:var(--bt-warm); border-radius:99px; overflow:hidden; margin-top:4px; }
body.bt-v2 .bt-goal-bar-fill { height:100%; border-radius:99px; background:var(--bt-accent2); }
body.bt-v2 .bt-goal-bar-fill--amber { background:var(--bt-gold); }
body.bt-v2 .bt-goal-bar-fill--red { background:#C4531A; }
body.bt-v2 .bt-goal-cta { font-size:12.5px; font-weight:600; color:var(--bt-accent); margin-top:2px; text-decoration:none; }

/* ── My books shelf ── */
body.bt-v2 .bt-mybooks-row { display:flex; gap:12px; padding:13px 18px 4px; overflow-x:auto; scrollbar-width:none; align-items:flex-start; }
body.bt-v2 .bt-mybooks-row::-webkit-scrollbar { display:none; }

/* Normalise v1 tile sizes injected by pagination API */
body.bt-v2 .bt-mybooks-row .book-tile,
body.bt-v2 .bt-mybooks-row .mybook,
body.bt-v2 .bt-mybooks-row .bt-mybook { flex-shrink:0; width:92px; display:block; text-decoration:none; color:inherit; }
body.bt-v2 .bt-mybooks-row .book-tile-cover,
body.bt-v2 .bt-mybooks-row .mybook-cover,
body.bt-v2 .bt-mybooks-row .bt-mybook-cover,
body.bt-v2 .bt-mybooks-row .book-cover,
body.bt-v2 .bt-mybooks-row img:not(.bt-cov-pct-ring) { width:92px !important; height:132px !important; object-fit:cover; border-radius:3px; display:block; }
body.bt-v2 .bt-mybook { flex-shrink:0; width:92px; text-decoration:none; color:inherit; display:block; }
body.bt-v2 .bt-mybook-cover { width:92px; height:132px; border-radius:3px; position:relative; overflow:hidden; background:#C4A882; box-shadow:0 1px 3px rgba(28,19,9,.22),inset 1.5px 0 0 rgba(255,255,255,.14),inset -1px 0 2px rgba(0,0,0,.2); transition:box-shadow .18s; }
body.bt-v2 .bt-mybook-cover img { width:100%; height:100%; object-fit:cover; display:block; }
body.bt-v2 .bt-mybook:hover .bt-mybook-cover { box-shadow:0 4px 14px rgba(28,19,9,.28),inset 1.5px 0 0 rgba(255,255,255,.14),inset -1px 0 2px rgba(0,0,0,.2); }
body.bt-v2 .bt-mybook-title { font-size:11px; line-height:1.3; color:var(--bt-ink); margin-top:6px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
body.bt-v2 .bt-mybook-auth { font-size:10.5px; color:var(--bt-muted); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body.bt-v2 .bt-mybook:hover .bt-mybook-title { color:var(--bt-accent); }
body.bt-v2 .bt-cov-badge { position:absolute; z-index:3; padding:2.5px 6px; border-radius:4px; font-size:9px; font-weight:700; letter-spacing:.4px; line-height:1.5; white-space:nowrap; top:5px; left:5px; background:rgba(28,19,9,.72); color:#F7F3EE; }
body.bt-v2 .bt-cov-badge--dropped { background:rgba(180,40,30,.88); color:#fff; }
body.bt-v2 .bt-cov-badge--reading { background:rgba(45,106,79,.85); color:#fff; }
body.bt-v2 .bt-cov-pct-ring { position:absolute; top:4px; right:4px; z-index:3; width:32px; height:32px; }
body.bt-v2 .bt-mybooks-pager { display:flex; align-items:stretch; margin:8px 18px 0; width:fit-content; }
body.bt-v2 .bt-pager-btn { background:var(--bt-white); border:1px solid var(--bt-warm); color:var(--bt-muted); font-size:12.5px; font-weight:500; padding:6px 13px; cursor:pointer; font-family:var(--bt-font-ui); transition:background .15s,color .15s; }
body.bt-v2 .bt-pager-btn:first-child { border-radius:8px 0 0 8px; }
body.bt-v2 .bt-pager-btn:last-child { border-radius:0 8px 8px 0; }
body.bt-v2 .bt-pager-btn:disabled { opacity:.4; cursor:not-allowed; }
body.bt-v2 .bt-pager-count { border-top:1px solid var(--bt-warm); border-bottom:1px solid var(--bt-warm); background:var(--bt-paper); color:var(--bt-muted); font-size:12px; padding:6px 12px; display:flex; align-items:center; }

/* ── Community feed ── */
body.bt-v2 .bt-feed-list { display:flex; flex-direction:column; padding:12px 18px 0; }
body.bt-v2 .bt-feed-item { display:flex; gap:11px; align-items:flex-start; padding:12px 0; }
body.bt-v2 .bt-feed-item+.bt-feed-item { border-top:1px solid var(--bt-warm); }
body.bt-v2 .bt-feed-av { width:28px; height:28px; border-radius:50%; color:#fff; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:600; flex-shrink:0; margin-top:1px; font-family:var(--bt-font-ui); }
body.bt-v2 .bt-feed-body { flex:1; min-width:0; }
body.bt-v2 .bt-feed-line { font-size:13px; color:var(--bt-ink); line-height:1.4; }
body.bt-v2 .bt-feed-book { color:var(--bt-accent); font-weight:500; }
body.bt-v2 .bt-feed-time { font-size:11px; color:var(--bt-muted); margin-top:3px; }

/* ── Community books ── */
body.bt-v2 .bt-comm-row { display:flex; gap:10px; padding:12px 18px 0; overflow-x:auto; scrollbar-width:none; }
body.bt-v2 .bt-comm-row::-webkit-scrollbar { display:none; }
body.bt-v2 .bt-comm-book { flex-shrink:0; width:66px; text-decoration:none; color:inherit; display:block; }
body.bt-v2 .bt-comm-cover { width:66px; height:94px; border-radius:3px; margin-bottom:5px; position:relative; overflow:hidden; background:#C4A882; box-shadow:0 1px 2px rgba(28,19,9,.18); }
body.bt-v2 .bt-comm-cover img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:1; display:block; }
body.bt-v2 .bt-comm-cover-init { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-family:var(--bt-font-display); font-size:24px; font-style:italic; color:rgba(107,63,30,.38); z-index:0; }
body.bt-v2 .bt-comm-cover img { width:100%; height:100%; object-fit:cover; display:block; }
body.bt-v2 .bt-comm-title { font-size:11px; line-height:1.3; color:var(--bt-ink); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
body.bt-v2 .bt-comm-auth { font-size:10.5px; color:var(--bt-muted); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body.bt-v2 .bt-comm-book:hover .bt-comm-title { color:var(--bt-accent); }

/* ── Quote ── */
body.bt-v2 .bt-quote { margin:13px 18px 0; padding:20px; border-radius:16px; background:linear-gradient(160deg,#2A1C0E,#3C2814); }
body.bt-v2 .bt-quote .bt-qmark { font-family:var(--bt-font-display); font-size:48px; line-height:.6; color:var(--bt-accent); opacity:.5; margin-bottom:-4px; }
body.bt-v2 .bt-quote p { font-family:var(--bt-font-display); font-style:italic; font-size:17px; line-height:1.38; margin:0 0 12px; color:#F6EEE2; }
body.bt-v2 .bt-quote .bt-attr { font-size:11.5px; color:#C9B79F; }
body.bt-v2 .bt-quote .bt-attr b { color:#E8D8C2; font-weight:600; }

/* ── Desktop home overrides ── */
@media (min-width:900px) {
  body.bt-v2 .bt-greeting { padding:8px 0 0; }
  body.bt-v2 .bt-stats-strip { padding:10px 22px 14px; margin:0; }
  body.bt-v2 .bt-greeting-h1 { font-size:42px; }
  body.bt-v2 .bt-read-card { margin:16px 0 0; }
  body.bt-v2 .bt-read-row { padding:18px 22px; gap:18px; }
  body.bt-v2 .bt-cover { width:60px; height:85px; }
  body.bt-v2 .bt-goals-row { padding:14px 0 0; }
  body.bt-v2 .bt-sec-head { padding:0; }
  body.bt-v2 .bt-mybooks-row { padding:14px 0 4px; }
  body.bt-v2 .bt-mybook { width:118px; }
  body.bt-v2 .bt-mybook-cover { width:118px; height:169px; }
  body.bt-v2 .bt-mybooks-pager { margin:10px 0 0; }
  body.bt-v2 .bt-feed-list { padding:12px 0 0; }
  body.bt-v2 .bt-comm-row { padding:12px 0 0; }
  body.bt-v2 .bt-quote { margin:14px 0 0; }
}

/* ── Activity feed — v1 <li class="activity-row"> restyled inside v2 shell ── */
body.bt-v2 .bt-activity-ul { list-style:none; margin:0; padding:12px 18px 0; }
body.bt-v2 .bt-activity-ul .activity-row { display:flex; gap:11px; align-items:flex-start; padding:10px 0; border-top:1px solid var(--bt-warm); font-size:13px; color:var(--bt-ink); }
body.bt-v2 .bt-activity-ul .activity-row:first-child { border-top:none; }
body.bt-v2 .bt-activity-ul .activity-avatar { width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:600; color:#fff; flex-shrink:0; font-family:var(--bt-font-ui); }
body.bt-v2 .bt-activity-ul .activity-avatar-img { width:28px; height:28px; border-radius:50%; object-fit:cover; flex-shrink:0; }
body.bt-v2 .bt-activity-ul .activity-row-body { flex:1; min-width:0; line-height:1.4; }
body.bt-v2 .bt-activity-ul .activity-actor { font-weight:600; color:var(--bt-ink); }
body.bt-v2 .bt-activity-ul .activity-action a { color:var(--bt-accent); font-weight:500; text-decoration:none; }
body.bt-v2 .bt-activity-ul .activity-snippet { display:block; font-size:11.5px; color:var(--bt-muted); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body.bt-v2 .bt-activity-ul .activity-extra { font-size:11.5px; color:var(--bt-muted); }
body.bt-v2 .bt-activity-ul .activity-time { font-size:11px; color:var(--bt-muted); margin-left:auto; flex-shrink:0; padding-left:8px; }

/* ── Cover add button ── */
body.bt-v2 .bt-cov-plus { position:absolute; bottom:5px; right:5px; z-index:3; width:26px; height:26px; border-radius:50%; background:rgba(255,255,255,.92); border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; transition:background .15s; }
body.bt-v2 .bt-cov-plus:hover { background:#fff; }
body.bt-v2 .bt-cov-plus svg { width:14px; height:14px; }

/* ══ Phase 3 — Books browse + Authors ══════════════════════════════ */

/* Page header */
body.bt-v2 .bt-page-header { padding:20px 18px 0; display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
body.bt-v2 .bt-page-title { font-family:var(--bt-font-display); font-size:32px; font-weight:400; color:var(--bt-ink); line-height:1.1; margin:0; }
body.bt-v2 .bt-book-count { font-size:12px; color:var(--bt-muted); white-space:nowrap; flex-shrink:0; }

/* Format pills */
body.bt-v2 .bt-format-pills { display:flex; gap:6px; padding:14px 18px 0; overflow-x:auto; scrollbar-width:none; flex-wrap:nowrap; }
body.bt-v2 .bt-format-pills::-webkit-scrollbar { display:none; }
body.bt-v2 .bt-fmt-pill { display:inline-flex; align-items:center; gap:5px; padding:6px 14px; border-radius:99px; border:1px solid var(--bt-warm); background:var(--bt-white); color:var(--bt-muted); font-size:12.5px; font-weight:500; cursor:pointer; white-space:nowrap; text-decoration:none; transition:background .15s,color .15s,border-color .15s; font-family:var(--bt-font-ui); }
body.bt-v2 .bt-fmt-pill:hover { background:var(--bt-warm); color:var(--bt-ink); }
body.bt-v2 .bt-fmt-pill.on { background:var(--bt-ink); color:var(--bt-paper); border-color:var(--bt-ink); }

/* Browse search */
body.bt-v2 .bt-browse-search { margin:12px 18px 0; display:flex; align-items:center; gap:10px; background:var(--bt-white); border:1px solid var(--bt-warm); border-radius:99px; padding:10px 16px; }
body.bt-v2 .bt-browse-search input { border:none; background:none; outline:none; flex:1; font-family:var(--bt-font-ui); font-size:14px; color:var(--bt-ink); }
body.bt-v2 .bt-browse-search input::placeholder { color:var(--bt-muted); }
body.bt-v2 .bt-browse-search svg { width:18px; height:18px; stroke:var(--bt-muted); fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }

/* Filter toggle chip */
body.bt-v2 .bt-filter-toggle { display:inline-flex; align-items:center; gap:6px; margin:10px 18px 0; padding:6px 14px; border:1px solid var(--bt-warm); border-radius:99px; background:var(--bt-white); color:var(--bt-muted); font-size:12px; font-weight:500; cursor:pointer; font-family:var(--bt-font-ui); transition:background .15s,color .15s; }
body.bt-v2 .bt-filter-toggle:hover, body.bt-v2 .bt-filter-toggle.has-filters { background:rgba(196,83,26,.08); color:var(--bt-accent); border-color:rgba(196,83,26,.3); }

/* Filter panel */
body.bt-v2 .bt-filter-panel { margin:10px 18px 0; background:var(--bt-white); border:1px solid var(--bt-warm); border-radius:var(--bt-radius-md); overflow:hidden; max-height:0; transition:max-height .25s ease; }
body.bt-v2 .bt-filter-panel.is-open { max-height:420px; padding:14px 16px; }
body.bt-v2 .bt-filter-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px 16px; }
body.bt-v2 .bt-filter-field { display:flex; flex-direction:column; gap:4px; }
body.bt-v2 .bt-filter-field label { font-size:11px; font-weight:600; letter-spacing:.5px; text-transform:uppercase; color:var(--bt-muted); }
body.bt-v2 .bt-filter-field input, body.bt-v2 .bt-filter-field select { border:1px solid var(--bt-warm); border-radius:8px; padding:7px 10px; font-family:var(--bt-font-ui); font-size:13px; color:var(--bt-ink); background:var(--bt-paper); outline:none; margin:0; }
body.bt-v2 .bt-filter-field input:focus, body.bt-v2 .bt-filter-field select:focus { border-color:var(--bt-accent); box-shadow:0 0 0 2px rgba(196,83,26,.12); }
body.bt-v2 .bt-filter-actions { display:flex; align-items:center; gap:10px; margin-top:12px; }
body.bt-v2 .bt-filter-submit { background:var(--bt-accent); color:#fff; border:none; border-radius:8px; padding:8px 18px; font-family:var(--bt-font-ui); font-size:13px; font-weight:600; cursor:pointer; transition:opacity .15s; }
body.bt-v2 .bt-filter-submit:hover { opacity:.88; }
body.bt-v2 .bt-filter-reset { font-size:12.5px; color:var(--bt-muted); text-decoration:none; font-weight:500; }
body.bt-v2 .bt-filter-reset:hover { color:var(--bt-accent); }

/* Books grid — v2 wrapper normalising v1 tile styles */
body.bt-v2 .bt-books-grid { padding:14px 18px 0; display:grid; grid-template-columns:repeat(3,1fr); gap:14px 10px; }
body.bt-v2 .bt-books-grid .book-tile-wrap, body.bt-v2 .bt-books-grid .book-tile { width:100% !important; max-width:none !important; text-decoration:none; color:var(--bt-ink); display:flex; flex-direction:column; position:relative; overflow:hidden; }
body.bt-v2 .bt-books-grid .book-tile-cover, body.bt-v2 .bt-books-grid .book-tile-placeholder { width:100% !important; aspect-ratio:2/3; height:auto !important; object-fit:cover; border-radius:3px; box-shadow:0 1px 3px rgba(28,19,9,.2),inset 1.5px 0 0 rgba(255,255,255,.14),inset -1px 0 2px rgba(0,0,0,.2); display:block; }
body.bt-v2 .bt-books-grid .book-tile-placeholder { background:var(--bt-warm); display:flex; align-items:center; justify-content:center; font-size:24px; }
/* Book tiles: title overlay on cover */
body.bt-v2 .bt-books-grid .book-tile:not(.author-tile) { overflow:hidden; }
body.bt-v2 .bt-books-grid .book-tile:not(.author-tile) .book-tile-stars { display:none; }
body.bt-v2 .bt-books-grid .book-tile:not(.author-tile) .book-tile-label { position:absolute; bottom:0; left:0; right:0; margin:0; padding:28px 7px 7px; background:linear-gradient(transparent,rgba(0,0,0,.72)); color:#fff; font-size:11px; font-weight:500; line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; border-radius:0 0 3px 3px; }
/* Author tiles: label stays below */
body.bt-v2 .bt-books-grid .author-tile .book-tile-label { font-size:10.5px; line-height:1.3; color:var(--bt-ink); margin-top:5px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
body.bt-v2 .bt-books-grid .author-tile:hover .book-tile-label { color:var(--bt-accent); }

/* Pagination */
body.bt-v2 .bt-browse-nav { display:flex; align-items:stretch; gap:0; margin:20px 18px 24px; width:fit-content; }
body.bt-v2 .bt-browse-nav button { background:var(--bt-white); border:1px solid var(--bt-warm); color:var(--bt-muted); font-size:12.5px; font-weight:500; padding:7px 14px; cursor:pointer; font-family:var(--bt-font-ui); transition:background .15s,color .15s; }
body.bt-v2 .bt-browse-nav button:first-child { border-radius:8px 0 0 8px; }
body.bt-v2 .bt-browse-nav button:last-child { border-radius:0 8px 8px 0; }
body.bt-v2 .bt-browse-nav button:hover:not(:disabled) { background:var(--bt-paper); color:var(--bt-ink); }
body.bt-v2 .bt-browse-nav button:disabled { opacity:.4; cursor:not-allowed; }
body.bt-v2 .bt-browse-nav-count { border-top:1px solid var(--bt-warm); border-bottom:1px solid var(--bt-warm); background:var(--bt-paper); color:var(--bt-muted); font-size:12px; padding:7px 14px; display:flex; align-items:center; white-space:nowrap; }

/* Author tile overrides inside bt-books-grid */
body.bt-v2 .bt-books-grid .author-tile-photo { border-radius:4px !important; }
body.bt-v2 .bt-books-grid .author-tile-initials { width:100%; aspect-ratio:2/3; height:auto !important; border-radius:4px; background:var(--bt-ink); color:var(--bt-paper); display:flex; align-items:center; justify-content:center; font-family:var(--bt-font-display); font-size:28px; }
body.bt-v2 .bt-books-grid .author-tile-bookcount { display:block; font-size:9.5px; color:var(--bt-muted); margin-top:1px; }

/* 600px — 4 columns (must come before 900px block) */
@media (min-width:600px) {
  body.bt-v2 .bt-books-grid { grid-template-columns:repeat(4,1fr); gap:16px 10px; }
}

/* Desktop overrides */
@media (min-width:900px) {
  body.bt-v2 .bt-page-header { padding:20px 40px 0; }
  body.bt-v2 .bt-format-pills { padding:14px 40px 0; }
  body.bt-v2 .bt-browse-search { margin:12px 40px 0; }
  body.bt-v2 .bt-filter-panel { margin:10px 40px 0; }
  body.bt-v2 .bt-filter-toggle { margin:10px 40px 0; }
  body.bt-v2 .bt-books-grid { padding:16px 32px 0; grid-template-columns:repeat(7,1fr); gap:18px 12px; }
  body.bt-v2 .bt-browse-nav { margin:24px 40px 32px; }
  body.bt-v2 .bt-filter-grid { grid-template-columns:repeat(4,1fr); }
}

/* ══ Phase 3 fixes — full-width browse layout ═══════════════════════ */

/* Browse pages span the full content grid */
body.bt-v2 .bt-content-grid--browse {
  display: block !important;
  grid-template-columns: none !important;
  grid-template-areas: none !important;
  padding: 0 !important;
}
body.bt-v2 .bt-browse-page {
  width: 100%;
  min-width: 0;
}

/* Browse-scoped padding overrides */
body.bt-v2 .bt-browse-page .bt-page-header { padding: 20px 18px 0; }
body.bt-v2 .bt-browse-page .bt-format-pills { padding: 14px 18px 0; }
body.bt-v2 .bt-browse-page .bt-filter-toggle { margin: 10px 18px 0; }
body.bt-v2 .bt-browse-page .bt-filter-panel  { margin: 0 18px; }
body.bt-v2 .bt-browse-page .bt-browse-nav { margin: 20px 18px 24px; }

@media (min-width:900px) {
  body.bt-v2 .bt-browse-page .bt-page-header { padding: 20px 32px 0; }
  body.bt-v2 .bt-browse-page .bt-format-pills { padding: 12px 32px 0; }
  body.bt-v2 .bt-browse-page .bt-filter-toggle { margin: 8px 32px 0; }
  body.bt-v2 .bt-browse-page .bt-filter-panel  { margin: 6px 32px 0; }
  body.bt-v2 .bt-browse-page .bt-browse-nav { margin: 20px 32px 24px; }
}
@media (min-width:1100px) {
  body.bt-v2 .bt-browse-page .bt-page-header { padding: 20px 40px 0; }
  body.bt-v2 .bt-browse-page .bt-format-pills { padding: 12px 40px 0; }
  body.bt-v2 .bt-browse-page .bt-filter-toggle { margin: 8px 40px 0; }
  body.bt-v2 .bt-browse-page .bt-filter-panel  { margin: 6px 40px 0; }
  body.bt-v2 .bt-browse-page .bt-browse-nav { margin: 20px 40px 24px; }
}

/* Book grid — wider padding at 1100px+ */
@media (min-width:1100px) {
  body.bt-v2 .bt-books-grid { padding:16px 40px 0; }
}

/* Author tiles: square aspect ratio */
body.bt-v2 .bt-books-grid .author-tile-photo {
  aspect-ratio: 1 / 1 !important;
  border-radius: 6px !important;
  object-position: top center;
  height: auto !important;
}
body.bt-v2 .bt-books-grid .author-tile-initials {
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  border-radius: 6px;
  background: var(--bt-ink);
  color: var(--bt-paper);
  font-family: var(--bt-font-display);
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.bt-v2 .bt-books-grid .author-tile-bookcount {
  display: block;
  font-size: 9.5px;
  color: var(--bt-muted);
  margin-top: 1px;
}

/* ══ Topbar search dropdown ═══════════════════════════════════════════════ */
body.bt-v2 .bt-search { position: relative; }
body.bt-v2 .bt-search-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--bt-white); border: 1px solid var(--bt-warm);
  border-radius: 10px; padding: 4px 0; margin: 0; list-style: none;
  max-height: 300px; overflow-y: auto; z-index: 999;
  box-shadow: 0 6px 20px rgba(28,19,9,.12);
  display: none;
}
body.bt-v2 .bt-search-dropdown.open { display: block; }
body.bt-v2 .bt-search-dropdown li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; cursor: pointer;
  font-family: var(--bt-font-ui); font-size: 13px; color: var(--bt-ink);
  transition: background .1s;
}
body.bt-v2 .bt-search-dropdown li:hover,
body.bt-v2 .bt-search-dropdown li.hl { background: var(--bt-paper); }
body.bt-v2 .bt-sg-kind {
  font-size: 10px; font-weight: 600; letter-spacing: .4px;
  text-transform: uppercase; color: var(--bt-muted);
  background: var(--bt-warm); border-radius: 4px; padding: 1px 5px;
  white-space: nowrap; flex-shrink: 0;
}
body.bt-v2 .bt-sg-val { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.bt-v2 .bt-sg-all {
  border-top: 1px solid var(--bt-warm); margin-top: 2px;
  font-size: 12px; color: var(--bt-accent); font-weight: 500;
}

/* Spinner */
body.bt-v2 .bt-search-spinner {
  display: none; flex-shrink: 0;
  width: 14px; height: 14px;
  border: 2px solid var(--bt-warm);
  border-top-color: var(--bt-accent);
  border-radius: 50%;
  animation: bt-spin .65s linear infinite;
}
@keyframes bt-spin { to { transform: rotate(360deg); } }

/* ══ Book detail v2 ══════════════════════════════════════════════════════════ */

/* Two-column page layout: main (1fr) + rail (280px) */
body.bt-v2 .bt-bd-page { grid-column:1/-1; padding:0 16px 40px; display:block; width:100%; box-sizing:border-box; }
@media (min-width:900px) {
  body.bt-v2 .bt-bd-page { display:grid; grid-template-columns:1fr 280px; gap:0 32px; padding:0 40px 60px; max-width:1120px; align-items:start; width:100%; }
}
body.bt-v2 .bt-bd-main { min-width:0; width:100%; }
body.bt-v2 .bt-bd-rail  { min-width:0; }
@media (min-width:900px) { body.bt-v2 .bt-bd-rail { padding-top:28px; } }

/* Mobile/desktop action slot visibility */
body.bt-v2 .bt-bd-actions--mobile { margin:16px 0 0; }
body.bt-v2 .bt-bd-actions--rail   { display:none !important; }
@media (min-width:900px) {
  body.bt-v2 .bt-bd-actions--mobile { display:none !important; }
  body.bt-v2 .bt-bd-actions--rail   { display:flex !important; flex-direction:column; gap:8px; }
}

/* Rail section dividers */
body.bt-v2 .bt-bd-rail-section { margin-top:24px; padding-top:20px; border-top:1px solid var(--bt-warm); }

/* Added by */
body.bt-v2 .bt-bd-added-by { font-size:12px; color:var(--bt-muted); margin-top:10px; }
body.bt-v2 .bt-bd-added-by a { color:var(--bt-accent); text-decoration:none; }
body.bt-v2 .bt-bd-added-by a:hover { text-decoration:underline; }

/* Edit/Remove row */
body.bt-v2 .bt-bd-edit-remove { display:flex; gap:7px; }
body.bt-v2 .bt-bd-edit-remove form { flex:1; }
body.bt-v2 .bt-bd-edit-remove form button { width:100%; }
body.bt-v2 .bt-bd-btn--sm { padding:8px 12px !important; font-size:12.5px !important; }
body.bt-v2 .bt-bd-btn--danger { color:var(--bt-muted) !important; }

/* Shelf form */
body.bt-v2 .bt-bd-shelf-form { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
body.bt-v2 .bt-bd-shelf-form .bd-select { flex:1; min-width:100px; font-size:12.5px; padding:6px 8px; border:1px solid var(--bt-warm); border-radius:8px; background:var(--bt-white); color:var(--bt-ink); }

/* Login hint */
body.bt-v2 .bt-bd-login-hint { font-size:12.5px; color:var(--bt-muted); text-align:center; padding:4px 0; }

/* Related books grid (book_tiles.php) — horizontal scroll */
body.bt-v2 .bt-bd-related-grid { display:flex; overflow-x:auto; gap:12px; scrollbar-width:none; padding-bottom:8px; }
body.bt-v2 .bt-bd-related-grid::-webkit-scrollbar { display:none; }
body.bt-v2 .bt-bd-related-grid .book-tile { flex-shrink:0; width:120px; height:180px; }

/* Hero */
body.bt-v2 .bt-bd-hero { display:grid; grid-template-columns:140px 1fr; gap:24px; padding-top:24px; align-items:start; }
@media (min-width:900px) {
  body.bt-v2 .bt-bd-hero { grid-template-columns:200px 1fr; gap:32px; padding-top:32px; }
}

/* Cover */
body.bt-v2 .bt-bd-cover { width:140px; aspect-ratio:2/3; border-radius:4px; overflow:hidden; box-shadow:0 4px 20px rgba(28,19,9,.2),inset 2px 0 0 rgba(255,255,255,.15),inset -1px 0 3px rgba(0,0,0,.25); flex-shrink:0; background:var(--bt-warm); }
@media (min-width:900px) { body.bt-v2 .bt-bd-cover { width:200px; } }
body.bt-v2 .bt-bd-cover img { width:100%; height:100%; object-fit:cover; display:block; }
body.bt-v2 .bt-bd-cover-init { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-family:var(--bt-font-display); font-size:48px; font-style:italic; color:rgba(107,63,30,.38); }

/* Title/meta column */
body.bt-v2 .bt-bd-meta { min-width:0; }
body.bt-v2 .bt-bd-title { font-family:var(--bt-font-display); font-weight:400; font-size:28px; line-height:1.15; color:var(--bt-ink); margin:0 0 8px; }
@media (min-width:900px) { body.bt-v2 .bt-bd-title { font-size:36px; } }
body.bt-v2 .bt-bd-author { font-size:15px; color:var(--bt-muted); margin-bottom:12px; }
body.bt-v2 .bt-bd-author a { color:var(--bt-accent); text-decoration:none; font-weight:500; }
body.bt-v2 .bt-bd-author a:hover { text-decoration:underline; }
body.bt-v2 .bt-bd-series { font-size:12px; color:var(--bt-gold,#c17a3a); font-weight:500; margin-bottom:8px; }

/* Rating */
body.bt-v2 .bt-bd-rating { display:flex; align-items:center; gap:8px; margin-bottom:14px; flex-wrap:wrap; }
body.bt-v2 .bt-bd-stars { display:flex; gap:2px; }
body.bt-v2 .bt-bd-stars span { font-size:16px; }
body.bt-v2 .bt-bd-rating-val { font-size:13px; font-weight:600; color:var(--bt-ink); }
body.bt-v2 .bt-bd-rating-count { font-size:12px; color:var(--bt-muted); }
body.bt-v2 .bt-bd-readers { font-size:12px; color:var(--bt-muted); padding-left:8px; border-left:1px solid var(--bt-warm); }

/* Pills */
body.bt-v2 .bt-bd-pills { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:16px; }
body.bt-v2 .bt-bd-pill { padding:3px 10px; border-radius:99px; border:1px solid var(--bt-warm); font-size:11.5px; color:var(--bt-muted); background:var(--bt-white); font-weight:500; }
body.bt-v2 .bt-bd-pill--format { background:var(--bt-ink); color:var(--bt-paper); border-color:var(--bt-ink); }

/* Community stats mini */
body.bt-v2 .bt-bd-comm-stats { display:flex; gap:16px; flex-wrap:wrap; margin-top:8px; }
body.bt-v2 .bt-bd-comm-stat { display:flex; flex-direction:column; align-items:center; gap:2px; min-width:48px; }
body.bt-v2 .bt-bd-comm-stat-n { font-family:var(--bt-font-display); font-size:22px; line-height:1; color:var(--bt-ink); }
body.bt-v2 .bt-bd-comm-stat-l { font-size:9.5px; text-transform:uppercase; letter-spacing:.5px; color:var(--bt-muted); white-space:nowrap; }

/* Actions panel */
body.bt-v2 .bt-bd-actions { display:flex; flex-direction:column; gap:8px; min-width:160px; flex-shrink:0; }
@media (max-width:899px) {
  body.bt-v2 .bt-bd-actions { grid-column:1/-1; flex-direction:row; flex-wrap:wrap; }
}
body.bt-v2 .bt-bd-btn { display:flex; align-items:center; justify-content:center; gap:7px; padding:10px 16px; border-radius:10px; font-family:var(--bt-font-ui); font-size:13.5px; font-weight:600; cursor:pointer; text-decoration:none; border:none; transition:opacity .15s,background .15s; white-space:nowrap; text-align:center; }
body.bt-v2 .bt-bd-btn--primary { background:var(--bt-accent); color:#fff; }
body.bt-v2 .bt-bd-btn--primary:hover { opacity:.88; }
body.bt-v2 .bt-bd-btn--secondary { background:var(--bt-white); color:var(--bt-ink); border:1px solid var(--bt-warm); }
body.bt-v2 .bt-bd-btn--secondary:hover { background:var(--bt-paper); }
body.bt-v2 .bt-bd-btn--buy { background:var(--bt-white); color:var(--bt-accent2,#2d6a4f); border:1px solid rgba(45,106,79,.3); font-size:12.5px; }
body.bt-v2 .bt-bd-btn--recommend { background:var(--bt-white); color:var(--bt-ink); border:1px solid var(--bt-warm); font-size:12.5px; }
body.bt-v2 .bt-bd-owned { display:flex; align-items:center; gap:5px; font-size:12px; color:var(--bt-accent2,#2d6a4f); font-weight:600; padding:4px 0; }

/* Metadata strip */
body.bt-v2 .bt-bd-info { margin-top:28px; background:var(--bt-white); border:1px solid var(--bt-warm); border-radius:var(--bt-radius-md,12px); padding:16px 20px; }
body.bt-v2 .bt-bd-info-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px 24px; }
@media (min-width:900px) { body.bt-v2 .bt-bd-info-grid { grid-template-columns:repeat(4,1fr); } }
body.bt-v2 .bt-bd-info-item { display:flex; flex-direction:column; gap:2px; }
body.bt-v2 .bt-bd-info-label { font-size:10px; font-weight:600; letter-spacing:.6px; text-transform:uppercase; color:var(--bt-muted); }
body.bt-v2 .bt-bd-info-val { font-size:13.5px; color:var(--bt-ink); font-weight:500; }

/* Sections */
body.bt-v2 .bt-bd-divider { border:none; border-top:1px solid var(--bt-warm); margin:24px 0 0; }
body.bt-v2 .bt-bd-section { margin-top:28px; }
body.bt-v2 .bt-bd-section-title { font-size:11px; font-weight:600; letter-spacing:1px; text-transform:uppercase; color:var(--bt-muted); margin-bottom:12px; }
body.bt-v2 .bt-bd-summary { font-size:14px; line-height:1.7; color:var(--bt-ink); }
body.bt-v2 .bt-bd-summary p { margin:0 0 10px; }
body.bt-v2 .bt-bd-summary p:last-child { margin:0; }
body.bt-v2 .bt-bd-add-cta { display:inline-flex; align-items:center; gap:5px; font-size:13px; color:var(--bt-accent); font-weight:500; text-decoration:none; padding:6px 0; }
body.bt-v2 .bt-bd-add-cta:hover { text-decoration:underline; }
body.bt-v2 .bt-bd-empty { font-size:13px; color:var(--bt-muted); font-style:italic; padding:8px 0; }

/* Quotes */
body.bt-v2 .bt-bd-quote-item { padding:14px 16px; background:var(--bt-white); border:1px solid var(--bt-warm); border-left:3px solid var(--bt-accent); border-radius:0 8px 8px 0; margin-bottom:10px; }
body.bt-v2 .bt-bd-quote-text { font-family:var(--bt-font-display); font-style:italic; font-size:15px; line-height:1.5; color:var(--bt-ink); margin-bottom:6px; }
body.bt-v2 .bt-bd-quote-meta { font-size:11.5px; color:var(--bt-muted); display:flex; align-items:center; gap:8px; }
body.bt-v2 .bt-bd-quote-signal { margin-left:auto; background:none; border:none; color:var(--bt-muted); font-size:14px; cursor:pointer; padding:2px 4px; }

/* Reviews */
body.bt-v2 .bt-bd-review-item { padding:14px 16px; background:var(--bt-white); border:1px solid var(--bt-warm); border-radius:8px; margin-bottom:10px; }
body.bt-v2 .bt-bd-review-header { display:flex; align-items:center; gap:9px; margin-bottom:8px; }
body.bt-v2 .bt-bd-review-av { width:28px; height:28px; border-radius:50%; background:var(--bt-accent); color:#fff; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:600; flex-shrink:0; }
body.bt-v2 .bt-bd-review-user { font-size:13px; font-weight:600; color:var(--bt-ink); }
body.bt-v2 .bt-bd-review-date { font-size:11px; color:var(--bt-muted); margin-left:auto; }
body.bt-v2 .bt-bd-review-text { font-size:13.5px; line-height:1.6; color:var(--bt-ink); }

/* Related books */
body.bt-v2 .bt-bd-related-row { display:flex; gap:14px; overflow-x:auto; scrollbar-width:none; padding-bottom:4px; }
body.bt-v2 .bt-bd-related-row::-webkit-scrollbar { display:none; }
body.bt-v2 .bt-bd-related-book { flex-shrink:0; width:90px; text-decoration:none; color:inherit; }
body.bt-v2 .bt-bd-related-cover { width:90px; height:128px; border-radius:3px; overflow:hidden; background:var(--bt-warm); box-shadow:0 1px 3px rgba(28,19,9,.18); margin-bottom:6px; }
body.bt-v2 .bt-bd-related-cover img { width:100%; height:100%; object-fit:cover; display:block; }
body.bt-v2 .bt-bd-related-title { font-size:11px; line-height:1.3; color:var(--bt-ink); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
body.bt-v2 .bt-bd-related-author { font-size:10.5px; color:var(--bt-muted); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body.bt-v2 .bt-bd-related-book:hover .bt-bd-related-title { color:var(--bt-accent); }

/* Full-width layout for book detail */
body.bt-v2 .bt-content-grid--book-detail { display:block !important; grid-template-columns:none !important; padding:0 !important; }

/* Full-width single-column layout (admin, roadmap-admin) */
body.bt-v2 .bt-content-grid--full { display:block !important; }
body.bt-v2 .bt-content-grid--full .admin-wrap { max-width:none; }

/* ══ END Book detail v2 ══════════════════════════════════════════════════════ */

/* ══ My Library 2-col layout (Phase 5 Part C/D) ═════════════════════════════ */

@media (min-width: 900px) {
  body.bt-v2 .bt-ml-page { padding: 0 0 60px; }
  body.bt-v2 .bt-col-main .bt-ml-page { padding: 0 32px 60px 40px; }
}

body.bt-v2 .bt-ml-rail-loading { text-align:center; padding:24px 0; color:var(--bt-muted); font-size:12.5px; }

body.bt-v2 .bt-ml-bookrow.is-selected {
  background: rgba(196,83,26,.06);
  border-left: 3px solid var(--bt-accent);
  padding-left: 11px;
}

/* Rail sections */
body.bt-v2 .bt-ml-rail-section { padding:0 4px; }
body.bt-v2 .bt-ml-rail-title { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--bt-muted); padding:16px 0 10px; border-bottom:1px solid var(--bt-warm); margin-bottom:12px; }
body.bt-v2 .bt-ml-rail-empty { font-size:12.5px; color:var(--bt-muted); padding:12px 0; line-height:1.5; }

/* Attr items */
body.bt-v2 .bt-ml-attrs { display:flex; flex-direction:column; gap:6px; margin-bottom:10px; }
body.bt-v2 .bt-ml-attr-item { display:flex; align-items:center; gap:6px; background:rgba(232,224,212,.4); border-radius:6px; padding:6px 10px; }
body.bt-v2 .bt-ml-attr-label { font-size:12.5px; font-weight:600; color:var(--bt-ink); flex:1; }
body.bt-v2 .bt-ml-attr-del { background:none; border:none; color:var(--bt-muted); font-size:14px; cursor:pointer; padding:0 2px; line-height:1; flex-shrink:0; }
body.bt-v2 .bt-ml-attr-del:hover { color:#c0392b; }
body.bt-v2 .bt-ml-attr-add-btn { width:100%; background:none; border:1px dashed var(--bt-warm); border-radius:8px; color:var(--bt-muted); font-size:12.5px; padding:8px 12px; cursor:pointer; text-align:left; transition:border-color .15s,color .15s; display:flex; align-items:center; justify-content:space-between; margin-top:4px; }
body.bt-v2 .bt-ml-attr-add-btn:not(:disabled):hover { border-color:var(--bt-accent); color:var(--bt-accent); }
body.bt-v2 .bt-ml-attr-add-btn:disabled { cursor:not-allowed; opacity:.6; }
body.bt-v2 .bt-ml-attr-quota { font-size:11px; background:var(--bt-warm); border-radius:99px; padding:1px 7px; }

/* Session cards */
body.bt-v2 .bt-ml-session-card { background:rgba(232,224,212,.25); border:1px solid var(--bt-warm); border-radius:8px; padding:10px 12px; margin-bottom:8px; display:grid; grid-template-columns:1fr auto; grid-template-rows:auto auto; gap:4px 8px; align-items:center; }
body.bt-v2 .bt-ml-session-date { font-size:11.5px; color:var(--bt-muted); }
body.bt-v2 .bt-ml-session-badge { display:inline-block; padding:2px 7px; border-radius:99px; font-size:10px; font-weight:700; letter-spacing:.3px; }
body.bt-v2 .bt-ml-session-badge--active    { background:rgba(45,106,79,.12); color:var(--bt-accent2); }
body.bt-v2 .bt-ml-session-badge--completed { background:rgba(45,106,79,.12); color:var(--bt-accent2); }
body.bt-v2 .bt-ml-session-badge--paused    { background:rgba(184,134,11,.12); color:var(--bt-gold); }
body.bt-v2 .bt-ml-session-badge--dropped   { background:rgba(192,57,43,.12); color:#c0392b; }
body.bt-v2 .bt-ml-session-meta { grid-column:1/-1; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
body.bt-v2 .bt-ml-session-pace { font-size:12px; font-weight:600; color:var(--bt-ink); font-variant-numeric:tabular-nums; }
body.bt-v2 .bt-ml-session-edit { font-size:11px; color:var(--bt-accent); text-decoration:none; justify-self:end; }
body.bt-v2 .bt-ml-session-edit:hover { text-decoration:underline; }

/* ══ END My Library 2-col layout ═════════════════════════════════════════════ */

/* ══ My books card list (Phase 5 — replaces table in My books tab) ══════════ */

body.bt-v2 .bt-ml-booklist {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--bt-warm);
  border-radius: 10px;
  overflow: hidden;
}

body.bt-v2 .bt-ml-bookrow {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 0 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--bt-white);
  border-bottom: 1px solid var(--bt-warm);
  text-decoration: none;
  color: inherit;
  transition: background .12s;
}
body.bt-v2 .bt-ml-bookrow:last-child { border-bottom: none; }
body.bt-v2 .bt-ml-bookrow:hover { background: rgba(247,243,238,.7); }

body.bt-v2 .bt-ml-bookrow-cover {
  width: 54px;
  height: 76px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bt-warm);
  position: relative;
  box-shadow: 0 1px 3px rgba(28,19,9,.18),
              inset 1.5px 0 0 rgba(255,255,255,.14),
              inset -1px 0 2px rgba(0,0,0,.2);
}
body.bt-v2 .bt-ml-bookrow-cover img { width:100%; height:100%; object-fit:cover; display:block; }
body.bt-v2 .bt-ml-bookrow-cover-ph { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:20px; }

body.bt-v2 .bt-ml-bookrow-meta { min-width:0; display:flex; flex-direction:column; gap:3px; }
body.bt-v2 .bt-ml-bookrow-title { font-size:14px; font-weight:600; color:var(--bt-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.2; }
body.bt-v2 .bt-ml-bookrow-author { font-size:12px; color:var(--bt-accent); font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body.bt-v2 .bt-ml-bookrow-details { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:2px; }
body.bt-v2 .bt-ml-bookrow-detail { font-size:11px; color:var(--bt-muted); display:flex; align-items:center; gap:3px; }
body.bt-v2 .bt-ml-bookrow-detail + .bt-ml-bookrow-detail::before { content:'·'; margin-right:5px; color:var(--bt-warm); }

body.bt-v2 .bt-ml-bookrow-status { flex-shrink:0; display:flex; flex-direction:column; align-items:flex-end; gap:4px; min-width:80px; }
body.bt-v2 .bt-ml-bookrow-badge { display:inline-block; padding:2px 8px; border-radius:99px; font-size:10px; font-weight:700; letter-spacing:.3px; white-space:nowrap; }
body.bt-v2 .bt-ml-bookrow-badge--active    { background:rgba(45,106,79,.12); color:var(--bt-accent2); }
body.bt-v2 .bt-ml-bookrow-badge--completed { background:rgba(45,106,79,.12); color:var(--bt-accent2); }
body.bt-v2 .bt-ml-bookrow-badge--paused    { background:rgba(184,134,11,.12); color:var(--bt-gold); }
body.bt-v2 .bt-ml-bookrow-badge--dropped   { background:rgba(192,57,43,.12); color:#c0392b; }
body.bt-v2 .bt-ml-bookrow-date  { font-size:10.5px; color:var(--bt-muted); white-space:nowrap; }
body.bt-v2 .bt-ml-bookrow-pct   { font-size:11px; font-weight:600; color:var(--bt-muted); font-variant-numeric:tabular-nums; }
body.bt-v2 .bt-ml-bookrow-pct--done { color:var(--bt-accent2); }
body.bt-v2 .bt-ml-bookrow-rating { font-size:11px; color:var(--bt-gold); letter-spacing:1px; }

body.bt-v2 .bt-ml-bookrow-prog {
  grid-column: 2 / -1;
  height: 2px;
  background: var(--bt-warm);
  border-radius: 99px;
  overflow: hidden;
  margin-top: -4px;
}
body.bt-v2 .bt-ml-bookrow-prog span { display:block; height:100%; border-radius:99px; background:var(--bt-accent2); }
body.bt-v2 .bt-ml-bookrow-prog span.pct-high { background:var(--bt-gold); }

@media (min-width:900px) {
  body.bt-v2 .bt-ml-bookrow { grid-template-columns:60px 1fr auto; padding:14px 18px; gap:0 18px; }
  body.bt-v2 .bt-ml-bookrow-cover { width:60px; height:85px; }
  body.bt-v2 .bt-ml-bookrow-title { font-size:15px; }
  body.bt-v2 .bt-ml-bookrow-status { min-width:100px; }
}

/* ══ END My books card list ══════════════════════════════════════════════════ */

/* ══ Inline tag-value editing ══ */
body.bt-v2 .bt-ml-attr-pencil { line-height:1; vertical-align:middle; }
body.bt-v2 .bt-ml-attr-pencil:hover { color:var(--bt-accent) !important; }
body.bt-v2 .bt-ml-attr-inline-wrap { align-items:center; gap:4px; margin-top:2px; }
body.bt-v2 .bt-ml-attr-inline-input:focus { outline:none; border-color:var(--bt-accent) !important; }
body.bt-v2 .bt-ml-attr-inline-save:hover { opacity:.85; }

/* ══ TOPBAR HEIGHT FINAL OVERRIDE — must be last ══ */
body.bt-v2 .bt-topbar { padding-top:6px !important; padding-bottom:6px !important; }
body.bt-v2 .bt-search { padding-top:6px !important; padding-bottom:6px !important; }
@media (min-width:900px) {
  body.bt-v2 .bt-topbar { padding-top:6px !important; padding-bottom:6px !important; padding-left:40px !important; padding-right:40px !important; }
}
/* ══ END TOPBAR HEIGHT FINAL OVERRIDE ══ */

/* ══ Add Book v2 — Phase 6 ═══════════════════════════════════════════════════ */
body.bt-v2 .bt-ab-page {
  max-width: 480px;
  margin: 0 auto;
  padding: var(--bt-space-6) var(--bt-space-4) calc(var(--bt-bottom-nav) + var(--bt-space-8));
}
body.bt-v2 .bt-ab-dup-notice { max-width:480px; margin:0 auto var(--bt-space-4); padding:0 var(--bt-space-4); }
body.bt-v2 .bt-ab-heading {
  font-family: var(--bt-font-display);
  font-size: var(--bt-text-2xl);
  font-weight: 400;
  color: var(--bt-ink);
  margin: 0 0 var(--bt-space-1);
}
body.bt-v2 .bt-ab-subtitle {
  color: var(--bt-muted);
  font-size: var(--bt-text-base);
  margin: 0 0 var(--bt-space-6);
}
body.bt-v2 .bt-ab-scan-btn {
  display: block;
  width: 100%;
  background: var(--bt-ink);
  color: var(--bt-paper);
  border: none;
  border-radius: var(--bt-radius-md);
  padding: 14px var(--bt-space-4);
  font-size: var(--bt-text-md);
  font-family: var(--bt-font-ui);
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}
body.bt-v2 .bt-ab-scan-btn:active { opacity: .85; }
body.bt-v2 .bt-ab-divider {
  display: flex;
  align-items: center;
  gap: var(--bt-space-3);
  margin: var(--bt-space-4) 0;
  color: var(--bt-muted);
  font-size: var(--bt-text-sm);
}
body.bt-v2 .bt-ab-divider::before,
body.bt-v2 .bt-ab-divider::after { content:''; flex:1; height:1px; background:var(--bt-warm); }
body.bt-v2 .bt-ab-search-stack { display:flex; flex-direction:column; gap:var(--bt-space-2); }
body.bt-v2 .bt-ab-search-input {
  width: 100%;
  border: 1px solid var(--bt-warm);
  border-radius: var(--bt-radius-md);
  padding: 10px var(--bt-space-3);
  font-size: var(--bt-text-base);
  font-family: var(--bt-font-ui);
  background: var(--bt-white);
  color: var(--bt-ink);
  outline: none;
  box-sizing: border-box;
}
body.bt-v2 .bt-ab-search-input:focus { border-color: var(--bt-accent); }
body.bt-v2 .bt-ab-search-btn {
  width: 100%;
  background: var(--bt-accent);
  color: var(--bt-white);
  border: none;
  border-radius: var(--bt-radius-md);
  padding: 11px var(--bt-space-4);
  font-size: var(--bt-text-base);
  font-family: var(--bt-font-ui);
  font-weight: 500;
  cursor: pointer;
}
body.bt-v2 .bt-ab-search-btn:active { opacity: .85; }
body.bt-v2 .bt-ab-manual-link {
  display: block;
  margin-top: var(--bt-space-3);
  color: var(--bt-muted);
  font-size: var(--bt-text-sm);
  text-align: center;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--bt-font-ui);
  padding: 0;
}
body.bt-v2 .bt-ab-manual-link:hover { color: var(--bt-ink); }

/* Confirm card */
body.bt-v2 .bt-ab-confirm {
  background: var(--bt-white);
  border: 1px solid var(--bt-warm);
  border-radius: var(--bt-radius-lg);
  padding: var(--bt-space-4);
  margin-top: var(--bt-space-6);
  box-shadow: var(--bt-shadow-md);
  display: none;
}
body.bt-v2 .bt-ab-confirm.is-visible { display: block; }
body.bt-v2 .bt-ab-confirm-inner {
  display: flex;
  gap: var(--bt-space-4);
  align-items: flex-start;
  margin-bottom: var(--bt-space-4);
}
body.bt-v2 .bt-ab-confirm-cover {
  width: 72px;
  height: 108px;
  object-fit: cover;
  border-radius: var(--bt-radius-sm);
  background: var(--bt-warm);
  flex-shrink: 0;
}
body.bt-v2 .bt-ab-confirm-cover-ph {
  width: 72px;
  height: 108px;
  background: var(--bt-warm);
  border-radius: var(--bt-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
body.bt-v2 .bt-ab-confirm-body { flex:1; min-width:0; }
body.bt-v2 .bt-ab-confirm-title {
  font-family: var(--bt-font-display);
  font-size: var(--bt-text-md);
  font-weight: 400;
  color: var(--bt-ink);
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.bt-v2 .bt-ab-confirm-author {
  color: var(--bt-muted);
  font-size: var(--bt-text-sm);
  margin: 0 0 var(--bt-space-2);
}
body.bt-v2 .bt-ab-meta-pills { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:var(--bt-space-2); }
body.bt-v2 .bt-ab-meta-pill {
  background: var(--bt-warm);
  color: var(--bt-muted);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--bt-radius-pill);
  white-space: nowrap;
}

/* Ownership pills */
body.bt-v2 .bt-ab-own-pills { display:flex; gap:var(--bt-space-2); margin-bottom:var(--bt-space-4); }
body.bt-v2 .bt-ab-own-pill {
  flex: 1;
  border: 1px solid var(--bt-warm);
  border-radius: var(--bt-radius-md);
  padding: 9px 4px;
  font-size: var(--bt-text-sm);
  font-family: var(--bt-font-ui);
  color: var(--bt-muted);
  background: var(--bt-white);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, color .15s;
}
body.bt-v2 .bt-ab-own-pill.is-on {
  border-color: var(--bt-accent);
  color: var(--bt-accent);
  font-weight: 500;
}

/* CTA */
body.bt-v2 .bt-ab-cta {
  display: block;
  width: 100%;
  background: var(--bt-accent);
  color: var(--bt-white);
  border: none;
  border-radius: var(--bt-radius-md);
  padding: 13px var(--bt-space-4);
  font-size: var(--bt-text-base);
  font-family: var(--bt-font-ui);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
body.bt-v2 .bt-ab-cta:active { opacity: .85; }
body.bt-v2 .bt-ab-edit-link {
  display: block;
  text-align: center;
  font-size: var(--bt-text-sm);
  color: var(--bt-muted);
  cursor: pointer;
  margin-top: var(--bt-space-3);
  background: none;
  border: none;
  font-family: var(--bt-font-ui);
  padding: 0;
}
body.bt-v2 .bt-ab-edit-link:hover { color: var(--bt-ink); }

/* Full form */
body.bt-v2 .bt-ab-full-form { margin-top: var(--bt-space-6); }
body.bt-v2 .bt-ab-full-form.is-hidden { display: none; }

/* Grid override: single column for add-book page */
body.bt-v2 .bt-content-grid--add-book { display: block; }

@media (min-width:900px) {
  body.bt-v2 .bt-ab-page { padding-top: var(--bt-space-8); padding-bottom: var(--bt-space-12); }
}
/* ══ END Add Book v2 ═════════════════════════════════════════════════════════ */

/* ══ Edit Book v2 ════════════════════════════════════════════════════════════ */
body.bt-v2 .bt-eb-page   { padding: 0 16px 60px; }
body.bt-v2 .bt-eb-heading {
  font-size: 1.25rem; font-weight: 700; color: var(--bt-ink);
  margin: 0 0 var(--bt-space-5);
}

/* Rail card — warm panel */
body.bt-v2 .bt-eb-rail-card {
  background: var(--bt-cream);
  border: 1px solid var(--bt-warm);
  border-radius: var(--bt-radius-lg);
  padding: 20px;
}
body.bt-v2 .bt-eb-rail-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--bt-warm); }
body.bt-v2 .bt-eb-rail-section:first-child { margin-top: 0; padding-top: 0; border-top: none; }

@media (min-width: 900px) {
  body.bt-v2 .bt-eb-page { padding: 0 40px 80px; }
}
/* ══ END Edit Book v2 ════════════════════════════════════════════════════════ */

/* ══ Author Detail v2 ═══════════════════════════════════════════════════════ */
/* Independent two-column grid — no dependency on bt-bd-page */
body.bt-v2 .bt-ad-page { display: block; width: 100%; box-sizing: border-box; padding: 0 16px 60px; }
@media (min-width: 1100px) {
  body.bt-v2 .bt-ad-page { display: grid; grid-template-columns: 1fr 280px; gap: 0 32px; padding: 0 40px 80px; align-items: start; width: 100%; }
}
body.bt-v2 .bt-ad-main { min-width: 0; width: 100%; }
body.bt-v2 .bt-ad-rail { min-width: 0; }
@media (min-width: 900px) { body.bt-v2 .bt-ad-rail { padding-top: 0; } }

/* Hero */
body.bt-v2 .bt-ad-hero { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
body.bt-v2 .bt-ad-photo {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 3px solid var(--bt-warm);
}
body.bt-v2 .bt-ad-photo-placeholder {
  width: 96px; height: 96px; border-radius: 50%; flex-shrink: 0;
  background: var(--bt-ink); color: var(--bt-paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--bt-font-display); font-size: 36px;
}
body.bt-v2 .bt-ad-hero-info { flex: 1; min-width: 0; padding-top: 4px; }
body.bt-v2 .bt-ad-name { font-family: var(--bt-font-display); font-size: 1.6rem; font-weight: 400; color: var(--bt-ink); margin: 0 0 6px; line-height: 1.2; }
body.bt-v2 .bt-ad-country { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .5px; color: var(--bt-muted); background: var(--bt-cream); border: 1px solid var(--bt-warm); border-radius: 20px; padding: 2px 10px; margin-bottom: 8px; }
body.bt-v2 .bt-ad-edit-link { font-size: 11px; color: var(--bt-muted); text-decoration: none; display: inline-block; margin-top: 2px; }
body.bt-v2 .bt-ad-edit-link:hover { color: var(--bt-accent); }

/* Bio — always occupies space so layout width is stable */
body.bt-v2 .bt-ad-bio-wrap { margin-bottom: 32px; min-height: 120px; }
body.bt-v2 .bt-ad-bio { font-size: .9rem; line-height: 1.7; color: var(--bt-ink); }
body.bt-v2 .bt-ad-bio.is-clamped { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
body.bt-v2 .bt-ad-bio-toggle { background: none; border: none; padding: 0; font-size: .82rem; color: var(--bt-accent); cursor: pointer; margin-top: 6px; display: block; font-family: var(--bt-font-ui); }
body.bt-v2 .bt-ad-bio-placeholder { min-height: 120px; border: 1.5px dashed var(--bt-warm); border-radius: var(--bt-radius-md); display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; padding: 14px 16px; box-sizing: border-box; }
body.bt-v2 .bt-ad-bio-add-btn { background: none; border: none; padding: 0; font-size: .82rem; color: var(--bt-accent); cursor: pointer; font-family: var(--bt-font-ui); text-decoration: underline; }
body.bt-v2 .bt-ad-bio-form { width: 100%; }

/* Section headers */
body.bt-v2 .bt-ad-section-hd { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--bt-muted); margin: 0 0 14px; }

/* Books grid — padding:0 !important prevents browse-page .bt-books-grid padding from bleeding in */
body.bt-v2 .bt-ad-books { margin-bottom: 40px; }
body.bt-v2 .bt-ad-books .bt-books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 12px 10px; padding: 0 !important; }

/* Similar authors row */
body.bt-v2 .bt-ad-similar { margin-bottom: 20px; }
body.bt-v2 .bt-ad-similar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 12px 10px; }

/* Rail stat cards */
body.bt-v2 .bt-ad-stat-card { background: var(--bt-cream); border: 1px solid var(--bt-warm); border-radius: var(--bt-radius-lg); padding: 18px; margin-bottom: 16px; }
body.bt-v2 .bt-ad-stat-card:last-child { margin-bottom: 0; }
body.bt-v2 .bt-ad-stat-card .bt-ad-section-hd { margin-bottom: 14px; }
body.bt-v2 .bt-ad-stat-row { display: flex; flex-direction: column; gap: 12px; }
body.bt-v2 .bt-ad-stat-item { display: flex; align-items: baseline; gap: 8px; }
body.bt-v2 .bt-ad-stat-n { font-size: 1.4rem; font-weight: 700; color: var(--bt-ink); font-family: var(--bt-font-display); line-height: 1; }
body.bt-v2 .bt-ad-stat-lbl { font-size: 11px; color: var(--bt-muted); }

@media (min-width: 900px) {
  body.bt-v2 .bt-ad-page { padding: 0 40px 80px; }
  body.bt-v2 .bt-ad-photo,
  body.bt-v2 .bt-ad-photo-placeholder { width: 120px; height: 120px; font-size: 46px; }
  body.bt-v2 .bt-ad-name { font-size: 2rem; }
  body.bt-v2 .bt-ad-books .bt-books-grid { grid-template-columns: repeat(5, 1fr) !important; padding: 0 !important; }
  body.bt-v2 .bt-ad-similar-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}
/* ══ END Author Detail v2 ════════════════════════════════════════════════════ */

/* ══ Profile pages v2 ════════════════════════════════════════════════════════ */

/* ── Column containers ── */
body.bt-v2 .bt-pr-main { padding-bottom: 60px; }
body.bt-v2 .bt-pr-rail { padding-bottom: 40px; }
@media (max-width: 899px) {
  body.bt-v2 .bt-pr-hero,
  body.bt-v2 .bt-pr-section,
  body.bt-v2 .bt-pr-lore-section,
  body.bt-v2 .bt-pr-completion { padding-left: 16px; padding-right: 16px; }
  body.bt-v2 .bt-pr-rail-section { margin-left: 16px; margin-right: 16px; }
}

/* ── Avatar hero ── */
body.bt-v2 .bt-pr-hero { display:flex; align-items:flex-start; gap:20px; padding-top:24px; padding-bottom:20px; }
body.bt-v2 .bt-pr-avatar { flex-shrink:0; width:80px; height:80px; border-radius:50%; overflow:hidden; background:var(--bt-warm); box-shadow:0 2px 8px rgba(28,19,9,.15); }
@media (min-width:900px) { body.bt-v2 .bt-pr-avatar { width:96px; height:96px; } }
body.bt-v2 .bt-pr-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
body.bt-v2 .bt-pr-avatar-ph { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:32px; font-weight:700; color:var(--bt-accent); background:var(--bt-warm); }
body.bt-v2 .bt-pr-hero-info { flex:1; min-width:0; }
body.bt-v2 .bt-pr-username { font-family:var(--bt-font-display); font-size:28px; font-weight:400; color:var(--bt-ink); margin:0 0 4px; line-height:1.1; }
body.bt-v2 .bt-pr-sub { font-size:13px; color:var(--bt-muted); margin:0 0 8px; }
body.bt-v2 .bt-pr-badges { display:flex; gap:6px; flex-wrap:wrap; margin-top:6px; }
body.bt-v2 .bt-pr-badge { padding:2px 9px; border-radius:99px; font-size:11px; font-weight:700; letter-spacing:.3px; }
body.bt-v2 .bt-pr-badge--premium    { background:#f5a623; color:#fff; }
body.bt-v2 .bt-pr-badge--bookwatcher { background:var(--bt-accent2); color:#fff; }
body.bt-v2 .bt-pr-badge--standard   { background:var(--bt-warm); color:var(--bt-muted); }
body.bt-v2 .bt-pr-badge--admin      { background:var(--bt-accent); color:#fff; }

/* ── Completion bar ── */
body.bt-v2 .bt-pr-completion { margin:0 0 16px; }
body.bt-v2 .bt-pr-completion-label { font-size:11.5px; color:var(--bt-muted); margin-bottom:5px; display:flex; align-items:center; gap:8px; }
body.bt-v2 .bt-pr-completion-label strong { color:var(--bt-ink); }
body.bt-v2 .bt-pr-completion-track { height:4px; background:var(--bt-warm); border-radius:99px; overflow:hidden; }
body.bt-v2 .bt-pr-completion-fill { height:100%; border-radius:99px; background:var(--bt-accent2); transition:width .4s ease; }

/* ── Profile sections ── */
body.bt-v2 .bt-pr-section { background:var(--bt-white); border:1px solid var(--bt-warm); border-radius:var(--bt-radius-md); padding:16px 20px; margin-bottom:14px; }
body.bt-v2 .bt-pr-section-title { font-size:10.5px; font-weight:600; letter-spacing:.8px; text-transform:uppercase; color:var(--bt-muted); margin:0 0 14px; }

/* Info grid */
body.bt-v2 .bt-pr-info-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px 24px; }
@media (max-width:599px) { body.bt-v2 .bt-pr-info-grid { grid-template-columns:1fr; } }
body.bt-v2 .bt-pr-info-item { display:flex; flex-direction:column; gap:2px; padding-bottom:10px; border-bottom:1px solid var(--bt-warm); }
body.bt-v2 .bt-pr-info-item:nth-last-child(-n+2) { border-bottom:none; padding-bottom:0; }
body.bt-v2 .bt-pr-info-label { font-size:9.5px; font-weight:600; letter-spacing:.6px; text-transform:uppercase; color:var(--bt-muted); }
body.bt-v2 .bt-pr-info-value { font-size:13.5px; color:var(--bt-ink); }
body.bt-v2 .bt-pr-info-empty { color:var(--bt-warm); font-style:italic; }
body.bt-v2 .bt-pr-info-item--empty .bt-pr-info-label::after { content:' ✎'; color:var(--bt-warm); }

/* Email badges */
body.bt-v2 .bt-pr-verified { display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:600; color:var(--bt-accent2); background:rgba(45,106,79,.1); padding:1px 7px; border-radius:99px; margin-left:6px; }
body.bt-v2 .bt-pr-unverified { font-size:11px; color:#c0392b; margin-left:6px; }
body.bt-v2 .bt-pr-color-swatch { display:inline-block; width:14px; height:14px; border-radius:3px; border:1px solid var(--bt-warm); vertical-align:middle; margin-right:4px; }
body.bt-v2 .bt-pr-generation { display:inline-block; padding:1px 7px; border-radius:4px; font-size:10px; font-weight:700; background:var(--bt-warm); color:var(--bt-muted); margin-left:6px; }

/* ── Rail sections ── */
body.bt-v2 .bt-pr-rail-section { background:var(--bt-white); border:1px solid var(--bt-warm); border-radius:var(--bt-radius-md); padding:14px 16px; margin-top:20px; margin-bottom:12px; }
body.bt-v2 .bt-pr-rail-section:first-child { margin-top:16px; }
body.bt-v2 .bt-pr-rail-title { font-size:10px; font-weight:600; letter-spacing:.8px; text-transform:uppercase; color:var(--bt-muted); margin-bottom:10px; }
body.bt-v2 .bt-pr-actions { display:flex; flex-direction:column; gap:8px; }
body.bt-v2 .bt-pr-action-btn { display:flex; align-items:center; gap:8px; padding:9px 14px; border-radius:8px; font-family:var(--bt-font-ui); font-size:13px; font-weight:500; text-decoration:none; border:1px solid var(--bt-warm); background:var(--bt-white); color:var(--bt-ink); transition:background .15s; cursor:pointer; white-space:nowrap; }
body.bt-v2 .bt-pr-action-btn--full { display:block; width:100%; text-align:center; box-sizing:border-box; }
body.bt-v2 .bt-pr-action-btn:hover { background:var(--bt-paper); }
body.bt-v2 .bt-pr-action-btn--primary { background:var(--bt-accent); color:#fff; border-color:var(--bt-accent); }
body.bt-v2 .bt-pr-action-btn--primary:hover { opacity:.88; background:var(--bt-accent); }

/* ── Rail: stats grid ── */
body.bt-v2 .bt-pr-stats { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
body.bt-v2 .bt-pr-stat { display:flex; flex-direction:column; align-items:center; padding:10px 6px; background:var(--bt-paper); border-radius:8px; gap:3px; }
body.bt-v2 .bt-pr-stat-n { font-family:var(--bt-font-display); font-size:24px; line-height:1; color:var(--bt-ink); }
body.bt-v2 .bt-pr-stat-l { font-size:9px; text-transform:uppercase; letter-spacing:.5px; color:var(--bt-muted); text-align:center; line-height:1.2; }

/* ── Alert banners ── */
body.bt-v2 .bt-pr-alert { padding:10px 14px; border-radius:8px; font-size:13px; margin-bottom:14px; }
body.bt-v2 .bt-pr-alert--info  { background:rgba(45,106,79,.1); color:var(--bt-accent2); }
body.bt-v2 .bt-pr-alert--ok    { background:rgba(45,106,79,.1); color:var(--bt-accent2); }
body.bt-v2 .bt-pr-alert--error { background:rgba(192,57,43,.08); color:#c0392b; }

/* ── Lore chart wrapper ── */
body.bt-v2 .bt-pr-lore-section { margin-top:14px; background:var(--bt-white); border:1px solid var(--bt-warm); border-radius:var(--bt-radius-md); padding:16px 20px; }

/* ── Currently reading ── */
body.bt-v2 .bt-pr-reading-list { display:flex; flex-direction:column; gap:10px; }
body.bt-v2 .bt-pr-reading-item { display:grid; grid-template-columns:48px 1fr; gap:12px; align-items:center; text-decoration:none; padding:10px 12px; background:var(--bt-white); border:1px solid var(--bt-warm); border-radius:8px; transition:background .12s; }
body.bt-v2 .bt-pr-reading-item:hover { background:var(--bt-paper); }
body.bt-v2 .bt-pr-reading-cover { width:48px; height:68px; border-radius:3px; overflow:hidden; background:var(--bt-warm); flex-shrink:0; box-shadow:0 1px 3px rgba(28,19,9,.18); }
body.bt-v2 .bt-pr-reading-cover img { width:100%; height:100%; object-fit:cover; display:block; }
body.bt-v2 .bt-pr-reading-cover-ph { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:18px; background:var(--bt-warm); }
body.bt-v2 .bt-pr-reading-title { font-size:13.5px; font-weight:600; color:var(--bt-ink); display:block; margin-bottom:2px; }
body.bt-v2 .bt-pr-reading-author { font-size:12px; color:var(--bt-accent); display:block; margin-bottom:6px; }
body.bt-v2 .bt-pr-reading-bar-wrap { height:4px; background:var(--bt-warm); border-radius:99px; overflow:hidden; margin-bottom:3px; }
body.bt-v2 .bt-pr-reading-bar { height:100%; border-radius:99px; }
body.bt-v2 .bt-pr-reading-pct { font-size:11px; font-weight:600; }

/* ── Last reading card ── */
body.bt-v2 .bt-pr-last-reading { display:grid; grid-template-columns:64px 1fr; gap:14px; align-items:start; text-decoration:none; padding:14px 16px; background:var(--bt-white); border:1px solid var(--bt-warm); border-radius:10px; transition:background .12s; }
body.bt-v2 .bt-pr-last-reading:hover { background:var(--bt-paper); }
body.bt-v2 .bt-pr-last-cover { width:64px; height:90px; border-radius:3px; overflow:hidden; background:var(--bt-warm); box-shadow:0 2px 6px rgba(28,19,9,.18); }
body.bt-v2 .bt-pr-last-cover img { width:100%; height:100%; object-fit:cover; display:block; }
body.bt-v2 .bt-pr-last-rating { color:#f5a623; font-size:15px; letter-spacing:1px; display:block; margin:4px 0; }
body.bt-v2 .bt-pr-last-duration { font-size:11.5px; color:var(--bt-muted); display:block; margin-top:3px; }
body.bt-v2 .bt-pr-last-comment { font-size:12.5px; color:var(--bt-ink); font-style:italic; display:block; margin-top:6px; line-height:1.5; }

/* ── Quotes ── */
body.bt-v2 .bt-pr-quote-list { display:flex; flex-direction:column; gap:10px; }
body.bt-v2 .bt-pr-quote-card { display:grid; grid-template-columns:44px 1fr; gap:12px; padding:12px 14px; background:var(--bt-white); border:1px solid var(--bt-warm); border-left:3px solid var(--bt-accent); border-radius:0 8px 8px 0; }
body.bt-v2 .bt-pr-quote-cover { width:44px; height:62px; border-radius:2px; overflow:hidden; background:var(--bt-warm); }
body.bt-v2 .bt-pr-quote-cover img { width:100%; height:100%; object-fit:cover; display:block; }
body.bt-v2 .bt-pr-quote-text { font-family:var(--bt-font-display); font-style:italic; font-size:14px; line-height:1.5; color:var(--bt-ink); display:block; margin-bottom:6px; }
body.bt-v2 .bt-pr-quote-meta { font-size:11.5px; color:var(--bt-muted); }
body.bt-v2 .bt-pr-quote-book-link { color:var(--bt-accent); text-decoration:none; font-weight:500; }
body.bt-v2 .bt-pr-quote-book-link:hover { text-decoration:underline; }

/* ── Pagination ── */
body.bt-v2 .bt-pr-pagination { display:flex; align-items:center; margin-top:16px; width:fit-content; }
body.bt-v2 .bt-pr-page-btn { display:inline-flex; align-items:center; padding:7px 16px; border:1px solid var(--bt-warm); background:var(--bt-white); font-size:13px; color:var(--bt-muted); text-decoration:none; font-family:var(--bt-font-ui); transition:background .15s; }
body.bt-v2 .bt-pr-page-btn:first-child { border-radius:8px 0 0 8px; }
body.bt-v2 .bt-pr-page-btn:last-child  { border-radius:0 8px 8px 0; }
body.bt-v2 .bt-pr-page-btn:hover { background:var(--bt-paper); color:var(--bt-ink); }
body.bt-v2 .bt-pr-page-btn--disabled { opacity:.4; pointer-events:none; }
body.bt-v2 .bt-pr-page-info { padding:7px 14px; border:1px solid var(--bt-warm); border-left:none; border-right:none; font-size:12.5px; color:var(--bt-ink); background:var(--bt-paper); font-family:var(--bt-font-ui); }

/* ── Private profile ── */
body.bt-v2 .bt-pr-private { max-width:440px; margin:60px auto; text-align:center; padding:40px 24px; background:var(--bt-white); border:1px solid var(--bt-warm); border-radius:16px; }
body.bt-v2 .bt-pr-private-icon { font-size:48px; margin-bottom:16px; }
body.bt-v2 .bt-pr-private h1 { font-family:var(--bt-font-display); font-size:24px; font-weight:400; color:var(--bt-ink); margin:0 0 10px; }
body.bt-v2 .bt-pr-private p { font-size:14px; color:var(--bt-muted); margin:0 0 20px; line-height:1.6; }
body.bt-v2 .bt-pr-private-btns { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
/* ══ END Profile pages v2 ════════════════════════════════════════════════════ */

/* ══ Reading Details v2 ══ */

/* ── Book hero (main column) ── */
body.bt-v2 .bt-rd-hero {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px 40px 20px;
  border-bottom: 1px solid var(--bt-warm);
  margin-bottom: 24px;
}
body.bt-v2 .bt-rd-cover {
  width: 72px;
  height: 102px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bt-warm);
  box-shadow: 0 2px 8px rgba(28,19,9,.18),
              inset 1.5px 0 0 rgba(255,255,255,.14),
              inset -1px 0 2px rgba(0,0,0,.2);
  text-decoration: none;
  display: block;
}
body.bt-v2 .bt-rd-cover img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
body.bt-v2 .bt-rd-cover-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center;
  justify-content: center;
  font-size: 28px; background: var(--bt-warm);
}
body.bt-v2 .bt-rd-book-info { min-width: 0; }
body.bt-v2 .bt-rd-book-title {
  font-family: var(--bt-font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--bt-ink);
  margin: 0 0 4px;
  line-height: 1.15;
  text-decoration: none;
  display: block;
}
body.bt-v2 .bt-rd-book-title:hover { color: var(--bt-accent); }
body.bt-v2 .bt-rd-book-author {
  font-size: 13.5px;
  color: var(--bt-accent);
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}
body.bt-v2 .bt-rd-book-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
body.bt-v2 .bt-rd-book-pill {
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--bt-warm);
  font-size: 11px;
  color: var(--bt-muted);
  background: var(--bt-paper);
}

/* ── Main column content ── */
body.bt-v2 .bt-rd-main {
  padding: 0 40px 40px;
}
body.bt-v2 .bt-rd-section {
  margin-bottom: 24px;
}
body.bt-v2 .bt-rd-section-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--bt-muted);
  margin-bottom: 10px;
}

/* Language toggle */
body.bt-v2 .bt-rd-lang-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--bt-warm);
  border-radius: 6px;
  overflow: hidden;
  width: fit-content;
  margin-bottom: 8px;
}
body.bt-v2 .bt-rd-lang-btn {
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--bt-font-ui);
  background: var(--bt-white);
  color: var(--bt-muted);
  border: none;
  cursor: pointer;
  transition: background .12s, color .12s;
  user-select: none;
}
body.bt-v2 .bt-rd-lang-btn.on {
  background: var(--bt-ink);
  color: var(--bt-paper);
}

/* Comment textarea */
body.bt-v2 .bt-rd-comment {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--bt-warm);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--bt-font-ui);
  font-size: 13.5px;
  color: var(--bt-ink);
  background: var(--bt-white);
  outline: none;
  resize: vertical;
  min-height: 120px;
  transition: border-color .15s;
  line-height: 1.6;
}
body.bt-v2 .bt-rd-comment:focus {
  border-color: var(--bt-accent);
  box-shadow: 0 0 0 2px rgba(196,83,26,.1);
}

/* Star rating */
body.bt-v2 .bt-rd-stars-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}
body.bt-v2 #star-input {
  font-size: 2rem !important;
  cursor: pointer;
  line-height: 1;
  display: flex;
  gap: 4px;
}
body.bt-v2 #star-label {
  font-size: 13px;
  color: var(--bt-muted);
  font-weight: 600;
  margin-left: 8px;
}

/* ── Rail section ── */
body.bt-v2 .bt-rd-rail-section {
  background: var(--bt-white);
  border: 1px solid var(--bt-warm);
  border-radius: var(--bt-radius-md);
  padding: 16px;
  margin-top: 20px;
  margin-bottom: 12px;
}
body.bt-v2 .bt-rd-rail-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--bt-muted);
  margin-bottom: 14px;
}
body.bt-v2 .bt-rd-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
body.bt-v2 .bt-rd-field:last-child { margin-bottom: 0; }
body.bt-v2 .bt-rd-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--bt-ink);
}
body.bt-v2 .bt-rd-label .req { color: var(--bt-accent); margin-left: 2px; }
body.bt-v2 .bt-rd-label .opt {
  color: var(--bt-muted);
  font-weight: 400;
  margin-left: 4px;
}
body.bt-v2 .bt-rd-input,
body.bt-v2 .bt-rd-select {
  border: 1px solid var(--bt-warm);
  border-radius: 7px;
  padding: 7px 10px;
  font-family: var(--bt-font-ui);
  font-size: 13px;
  color: var(--bt-ink);
  background: var(--bt-white);
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .15s;
}
body.bt-v2 .bt-rd-input:focus,
body.bt-v2 .bt-rd-select:focus { border-color: var(--bt-accent); }
body.bt-v2 .bt-rd-input--sm {
  max-width: 100px;
  width: auto;
}
body.bt-v2 .bt-rd-select { cursor: pointer; }

/* Audio time row */
body.bt-v2 .bt-rd-time-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
body.bt-v2 .bt-rd-time-unit {
  font-size: 12px;
  color: var(--bt-muted);
  flex-shrink: 0;
}

/* Pages delta */
body.bt-v2 .bt-rd-pages-delta {
  padding: 8px 10px;
  background: var(--bt-paper);
  border-radius: 6px;
  font-size: 12px;
  color: var(--bt-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
body.bt-v2 .bt-rd-pages-delta strong {
  color: var(--bt-accent2);
  font-size: 16px;
  font-weight: 700;
}

/* Progress bar */
body.bt-v2 .bt-rd-progress {
  margin-bottom: 14px;
}
body.bt-v2 .bt-rd-progress-track {
  height: 5px;
  background: var(--bt-warm);
  border-radius: 99px;
  overflow: hidden;
}
body.bt-v2 .bt-rd-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--bt-accent2);
  transition: width .3s ease;
}
body.bt-v2 .bt-rd-progress-label {
  font-size: 11px;
  color: var(--bt-muted);
  margin-top: 3px;
  text-align: right;
}

/* Buttons */
body.bt-v2 .bt-rd-save-btn {
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--bt-accent);
  color: #fff;
  font-family: var(--bt-font-ui);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
  margin-top: 6px;
}
body.bt-v2 .bt-rd-save-btn:hover { opacity: .88; }
body.bt-v2 .bt-rd-cancel-link {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--bt-muted);
  text-decoration: none;
}
body.bt-v2 .bt-rd-cancel-link:hover { color: var(--bt-accent); }
body.bt-v2 .bt-rd-delete-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: none;
  border: 1px solid rgba(192,57,43,.3);
  color: #c0392b;
  font-family: var(--bt-font-ui);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
  text-align: center;
}
body.bt-v2 .bt-rd-delete-btn:hover {
  background: rgba(192,57,43,.06);
}

/* Error alerts */
body.bt-v2 .bt-rd-error {
  background: rgba(192,57,43,.08);
  border: 1px solid rgba(192,57,43,.25);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #c0392b;
  margin-bottom: 16px;
}

/* No-rating modal (v2 reskin) */
body.bt-v2 #no-rating-overlay.bookwatch-overlay {
  background: rgba(28,19,9,.65) !important;
}
body.bt-v2 #no-rating-overlay .bookwatch-modal {
  background: var(--bt-white) !important;
  border: 1px solid var(--bt-warm) !important;
  border-radius: 14px !important;
  color: var(--bt-ink) !important;
  box-shadow: 0 8px 32px rgba(28,19,9,.15) !important;
}
body.bt-v2 #no-rating-overlay .bookwatch-modal-title {
  color: var(--bt-ink) !important;
  font-family: var(--bt-font-display) !important;
}
body.bt-v2 #no-rating-overlay .bookwatch-modal-body {
  color: var(--bt-muted) !important;
}
body.bt-v2 #no-rating-overlay .bookwatch-btn--primary {
  background: var(--bt-accent) !important;
  border-color: var(--bt-accent) !important;
  color: #fff !important;
}
body.bt-v2 #no-rating-overlay .bookwatch-btn--secondary {
  border-color: var(--bt-warm) !important;
  color: var(--bt-muted) !important;
  background: var(--bt-white) !important;
}

/* Delete confirmation modal (v2) */
body.bt-v2 #rd-delete-overlay {
  background: rgba(28,19,9,.65) !important;
}
body.bt-v2 #rd-delete-overlay > div {
  background: var(--bt-white) !important;
  border: 1px solid var(--bt-warm) !important;
  border-radius: 14px !important;
  color: var(--bt-ink) !important;
}

/* ══ Reading Calendar v2 ══ */
body.bt-v2 .bt-rd-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
body.bt-v2 .bt-rd-cal-nav {
  background: none;
  border: 1px solid var(--bt-warm);
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 15px;
  color: var(--bt-muted);
  cursor: pointer;
  font-family: var(--bt-font-ui);
  transition: background .12s;
  line-height: 1.6;
}
body.bt-v2 .bt-rd-cal-nav:hover { background: var(--bt-warm); }
body.bt-v2 .bt-rd-cal-month-lbl {
  font-family: var(--bt-font-display);
  font-size: 15px;
  color: var(--bt-ink);
}
body.bt-v2 .bt-rd-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
body.bt-v2 .bt-rd-cal-hdr {
  text-align: center;
  font-size: 9px;
  font-weight: 600;
  color: var(--bt-muted);
  padding: 3px 0 5px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
body.bt-v2 .bt-rd-cal-cell {
  min-height: 44px;
  border-radius: 5px;
  padding: 3px 4px;
  background: var(--bt-white);
  border: 1px solid transparent;
  position: relative;
}
body.bt-v2 .bt-rd-cal-cell--empty {
  background: none;
}
body.bt-v2 .bt-rd-cal-cell--today {
  border-color: var(--bt-accent);
}
body.bt-v2 .bt-rd-cal-cell--read {
  background: rgba(45,106,79,.07);
  border-color: rgba(45,106,79,.22);
}
body.bt-v2 .bt-rd-cal-day-num {
  font-size: 10px;
  color: var(--bt-muted);
  font-weight: 500;
  display: block;
  line-height: 1.4;
}
body.bt-v2 .bt-rd-cal-cell--today .bt-rd-cal-day-num {
  color: var(--bt-accent);
  font-weight: 700;
}
body.bt-v2 .bt-rd-cal-evt {
  font-size: 9.5px;
  color: var(--bt-accent2);
  font-weight: 600;
  display: block;
  line-height: 1.3;
  margin-top: 1px;
}
body.bt-v2 .bt-rd-cal-loading {
  text-align: center;
  padding: 20px;
  color: var(--bt-muted);
  font-size: 13px;
}

/* Calendar click-to-edit states */
body.bt-v2 .bt-rd-cal-cell--clickable { cursor: pointer; }
body.bt-v2 .bt-rd-cal-cell--clickable:hover { border-color: var(--bt-accent); }
body.bt-v2 .bt-rd-cal-cell--editing {
  border-color: var(--bt-accent) !important;
  box-shadow: 0 0 0 2px rgba(196,83,26,.15);
}

/* ── Phase 10a: /circles list (My Circles) ───────────────────────────────── */

/* Main column padding */
body.bt-v2 .btc-main { padding-top: 8px; padding-bottom: 40px; }

/* Panel card — base container */
body.bt-v2 .btc-panel {
  background: var(--bt-white);
  border: var(--bt-border);
  border-radius: var(--bt-radius-lg);
  padding: 20px 22px;
  margin-bottom: 16px;
}
body.bt-v2 .btc-panel-hd {
  font-family: var(--bt-font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--bt-ink);
  margin: 0 0 16px;
  line-height: 1.2;
}
body.bt-v2 .btc-panel-hd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
body.bt-v2 .btc-panel-hd-row .btc-panel-hd { margin-bottom: 0; }

/* Badge pill */
body.bt-v2 .btc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--bt-accent);
  color: #fff;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
}
body.bt-v2 .btc-badge--received { background: var(--bt-accent2); }

/* Shared button */
body.bt-v2 .btc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--bt-radius-md);
  font-family: var(--bt-font-ui);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, opacity .15s;
  text-decoration: none;
  line-height: 1;
}
body.bt-v2 .btc-btn--primary  { background: var(--bt-accent); color: #fff; }
body.bt-v2 .btc-btn--primary:hover { background: #a8421a; }
body.bt-v2 .btc-btn--primary:disabled { opacity: .45; cursor: default; }
body.bt-v2 .btc-btn--danger   { background: #c0392b; color: #fff; }
body.bt-v2 .btc-btn--danger:hover { background: #a52a1e; }
body.bt-v2 .btc-btn--danger:disabled { opacity: .5; cursor: default; }
body.bt-v2 .btc-btn--ghost    { background: none; color: var(--bt-muted); border: var(--bt-border); }
body.bt-v2 .btc-btn--ghost:hover { background: var(--bt-paper); }

/* Input + select */
body.bt-v2 .btc-input {
  width: 100%;
  padding: 9px 12px;
  border: var(--bt-border);
  border-radius: var(--bt-radius-md);
  font-family: var(--bt-font-ui);
  font-size: 14px;
  color: var(--bt-ink);
  background: var(--bt-white);
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
}
body.bt-v2 .btc-input:focus { border-color: var(--bt-accent); }
body.bt-v2 .btc-select {
  padding: 8px 10px;
  border: var(--bt-border);
  border-radius: var(--bt-radius-md);
  font-family: var(--bt-font-ui);
  font-size: 13.5px;
  color: var(--bt-ink);
  background: var(--bt-white);
  cursor: pointer;
  min-width: 160px;
  max-width: 100%;
}

/* ── Invite tabs ── */
body.bt-v2 .btc-inv-tabs {
  display: flex;
  gap: 0;
  border: var(--bt-border);
  border-radius: var(--bt-radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  width: fit-content;
}
body.bt-v2 .btc-inv-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: none;
  border: none;
  font-family: var(--bt-font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--bt-muted);
  cursor: pointer;
  transition: background .12s, color .12s;
  border-right: var(--bt-border);
  line-height: 1;
}
body.bt-v2 .btc-inv-tab:last-child { border-right: none; }
body.bt-v2 .btc-inv-tab--active { background: var(--bt-paper); color: var(--bt-ink); font-weight: 600; }
body.bt-v2 .btc-inv-tab:hover:not(.btc-inv-tab--active) { background: rgba(0,0,0,.03); }

/* ── Invite form ── */
body.bt-v2 .btc-inv-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body.bt-v2 .btc-inv-circle-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
body.bt-v2 .btc-inv-label {
  font-size: 13px;
  color: var(--bt-muted);
  white-space: nowrap;
  font-weight: 500;
}
body.bt-v2 .btc-inv-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
body.bt-v2 .btc-inv-ok  { color: var(--bt-accent2); font-size: 13px; font-weight: 600; }
body.bt-v2 .btc-inv-err { color: #c0392b; font-size: 12.5px; }
body.bt-v2 .btc-inv-to  {
  margin-top: 4px;
  padding: 6px 10px;
  background: rgba(196,83,26,.07);
  border-left: 3px solid var(--bt-accent);
  border-radius: 0 var(--bt-radius-sm) var(--bt-radius-sm) 0;
  font-size: 13px;
  color: var(--bt-accent);
  font-weight: 500;
}

/* ── My circles list ── */
body.bt-v2 .btc-circles-list { display: flex; flex-direction: column; gap: 2px; }
body.bt-v2 .btc-circle-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 10px;
  border-radius: var(--bt-radius-md);
  cursor: pointer;
  transition: background .12s;
  position: relative;
  user-select: none;
}
body.bt-v2 .btc-circle-row:hover       { background: var(--bt-paper); }
body.bt-v2 .btc-circle-row--selected   { background: rgba(196,83,26,.06); outline: 1.5px solid rgba(196,83,26,.22); }
body.bt-v2 .btc-circle-row-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  padding: 6px;
  color: var(--bt-warm);
  border-radius: var(--bt-radius-sm);
  transition: color .12s, background .12s;
  text-decoration: none;
}
body.bt-v2 .btc-circle-row-nav:hover { color: var(--bt-accent); background: rgba(196,83,26,.06); }

/* Circle icon swatch */
body.bt-v2 .btc-circle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--bt-radius-md);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity .12s, transform .12s;
}
body.bt-v2 .btc-circle-icon:hover { opacity: .82; transform: scale(1.05); }

body.bt-v2 .btc-circle-row-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  text-decoration: none;
  transition: opacity .15s, transform .15s;
}
body.bt-v2 .btc-circle-row-icon:hover { opacity: .85; transform: scale(1.06); }
body.bt-v2 .btc-circle-body { min-width: 0; flex: 1; }
body.bt-v2 .btc-circle-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--bt-ink);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.bt-v2 .btc-circle-meta { font-size: 12px; color: var(--bt-muted); margin-bottom: 6px; }
body.bt-v2 .btc-circle-members {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
body.bt-v2 .btc-circle-member {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
}
body.bt-v2 .btc-circle-member-link {
  color: var(--bt-ink);
  text-decoration: none;
  font-weight: 500;
}
body.bt-v2 .btc-circle-member-link:hover { color: var(--bt-accent); text-decoration: underline; }

/* Status dot legend */
body.bt-v2 .btc-dot-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: var(--bt-border);
}
body.bt-v2 .btc-dot-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--bt-muted);
}

/* ── Empty state ── */
body.bt-v2 .btc-empty-state {
  text-align: center;
  padding: 32px 20px;
}
body.bt-v2 .btc-empty-icon { margin-bottom: 16px; }
body.bt-v2 .btc-empty-title {
  font-family: var(--bt-font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--bt-ink);
  margin: 0 0 8px;
}
body.bt-v2 .btc-empty-body { font-size: 14px; color: var(--bt-muted); margin: 0; }

/* ── Invitations sections ── */
body.bt-v2 .btc-inv-section--received .btc-panel-hd { color: var(--bt-accent2); }
body.bt-v2 .btc-inv-list { list-style: none; margin: 0; padding: 0; }
body.bt-v2 .btc-inv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: var(--bt-border);
}
body.bt-v2 .btc-inv-item:last-child { border-bottom: none; }
body.bt-v2 .btc-inv-none { font-size: 13.5px; color: var(--bt-muted); margin: 0; }

/* Invitation avatars */
body.bt-v2 .btc-inv-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--bt-radius-full);
  flex-shrink: 0;
  object-fit: cover;
}
body.bt-v2 .btc-inv-avatar--init,
body.bt-v2 .btc-inv-avatar--email {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
body.bt-v2 .btc-inv-avatar--email { background: var(--bt-muted); font-size: 16px; }

body.bt-v2 .btc-inv-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
body.bt-v2 .btc-inv-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--bt-ink);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
body.bt-v2 .btc-inv-dest     { font-size: 12px; color: var(--bt-muted); }
body.bt-v2 .btc-inv-lastseen { font-size: 11.5px; color: var(--bt-muted); }
body.bt-v2 .btc-inv-location { font-weight: 400; color: var(--bt-muted); }
body.bt-v2 .btc-inv-date     { font-size: 11.5px; color: var(--bt-muted); white-space: nowrap; flex-shrink: 0; }

body.bt-v2 .btc-email-status { font-size: 11.5px; font-weight: 600; }
body.bt-v2 .btc-email-status--done    { color: var(--bt-accent2); }
body.bt-v2 .btc-email-status--pending { color: var(--bt-muted); }

/* ── Pager ── */
body.bt-v2 .btc-pager {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  margin-top: 4px;
}
body.bt-v2 .btc-pager-btn {
  width: 28px;
  height: 28px;
  border: var(--bt-border);
  border-radius: var(--bt-radius-md);
  background: var(--bt-white);
  color: var(--bt-ink);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
  padding: 0;
}
body.bt-v2 .btc-pager-btn:hover:not(:disabled) { background: var(--bt-paper); }
body.bt-v2 .btc-pager-btn:disabled { color: var(--bt-warm); cursor: default; }
body.bt-v2 .btc-pager-info { font-size: 12px; color: var(--bt-muted); }

/* ── Right rail ── */
body.bt-v2 .btc-rail { padding-top: 8px; }
body.bt-v2 .btc-rail-panel {
  background: var(--bt-white);
  border: var(--bt-border);
  border-radius: var(--bt-radius-lg);
  padding: 20px;
  margin-bottom: 14px;
}

/* Explainer in rail */
body.bt-v2 .btc-rail-explainer-hd { margin-bottom: 18px; }
body.bt-v2 .btc-rail-title {
  font-family: var(--bt-font-display);
  font-size: 17px;
  font-weight: 400;
  color: var(--bt-ink);
  margin: 0 0 5px;
}
body.bt-v2 .btc-rail-sub   { font-size: 13px; color: var(--bt-muted); margin: 0; line-height: 1.5; }
body.bt-v2 .btc-rail-hint  {
  margin-top: 18px;
  padding: 10px 12px;
  background: var(--bt-paper);
  border-radius: var(--bt-radius-md);
  font-size: 12.5px;
  color: var(--bt-muted);
  text-align: center;
  font-style: italic;
}

/* Pillars in rail */
body.bt-v2 .btc-pillars     { display: flex; flex-direction: column; gap: 14px; }
body.bt-v2 .btc-pillar      { display: flex; align-items: flex-start; gap: 12px; }
body.bt-v2 .btc-pillar-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: rgba(201,168,124,.12);
  border-radius: var(--bt-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
body.bt-v2 .btc-pillar-title { font-size: 13px; font-weight: 700; color: var(--bt-ink); margin-bottom: 2px; }
body.bt-v2 .btc-pillar-body  { font-size: 12px; color: var(--bt-muted); line-height: 1.5; }

/* Rail: selected circle — detail block (date + members) */
body.bt-v2 .btc-rail-circle-detail {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: var(--bt-border);
}
body.bt-v2 .btc-rail-detail-date {
  font-size: 11.5px;
  color: var(--bt-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
}
body.bt-v2 .btc-rail-detail-members {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
body.bt-v2 .btc-rail-detail-members .btc-circle-member {
  font-size: 13.5px;
  gap: 6px;
}
body.bt-v2 .btc-rail-detail-members .btc-circle-member-link {
  font-size: 13.5px;
}

/* Rail: selected circle view */
body.bt-v2 .btc-rail-circle-hd {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: var(--bt-border);
}
body.bt-v2 .btc-rail-circle-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--bt-radius-md);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
body.bt-v2 .btc-rail-circle-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--bt-ink);
  word-break: break-word;
  flex: 1;
}
body.bt-v2 .btc-rail-circle-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body.bt-v2 .btc-rail-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--bt-radius-md);
  border: var(--bt-border);
  background: var(--bt-white);
  font-family: var(--bt-font-ui);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  text-align: left;
}
body.bt-v2 .btc-rail-btn--invite { color: var(--bt-accent); border-color: rgba(196,83,26,.3); }
body.bt-v2 .btc-rail-btn--invite:hover { background: rgba(196,83,26,.06); }
body.bt-v2 .btc-rail-btn--delete { color: #c0392b; border-color: rgba(192,57,43,.28); }
body.bt-v2 .btc-rail-btn--delete:hover { background: rgba(192,57,43,.06); }

/* ── Delete overlay ── */
body.bt-v2 .btc-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(28,19,9,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
body.bt-v2 .btc-overlay-box {
  background: var(--bt-white);
  border-radius: var(--bt-radius-lg);
  padding: 28px 28px 24px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(28,19,9,.14);
}
body.bt-v2 .btc-overlay-title {
  font-family: var(--bt-font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--bt-ink);
  margin: 0 0 10px;
}
body.bt-v2 .btc-overlay-body {
  font-size: 14px;
  color: var(--bt-muted);
  line-height: 1.55;
  margin: 0 0 22px;
}
body.bt-v2 .btc-overlay-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
body.bt-v2 .btc-overlay-err {
  margin-top: 12px;
  font-size: 12.5px;
  color: #c0392b;
  font-weight: 500;
}

/* ── Mobile: single-column (rail drops below) ── */
@media (max-width: 899px) {
  body.bt-v2 .btc-rail { padding-top: 0; }
  body.bt-v2 .btc-panel { padding: 16px; }
  body.bt-v2 .btc-circle-row { padding: 10px 6px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Phase 10b: /circle/{id} detail page — btc-cp- prefix
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Page shell ────────────────────────────────────────────────────────── */
body.bt-v2 .btc-cp-page {
  background: var(--bt-paper);
  min-height: 100vh;
  padding-bottom: 48px;
}
body.bt-v2 .btc-cp-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px 0;
}

/* ── Header ────────────────────────────────────────────────────────────── */
body.bt-v2 .btc-cp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
body.bt-v2 .btc-cp-header-identity {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
body.bt-v2 .btc-cp-short {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.3rem;
  color: var(--bt-muted);
  letter-spacing: .05em;
  flex-shrink: 0;
}
body.bt-v2 .btc-cp-full {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--bt-ink);
  margin: 0;
  line-height: 1.2;
}
body.bt-v2 .btc-cp-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding-top: 4px;
}
body.bt-v2 .btc-cp-icon-btn {
  background: none;
  border: 1px solid var(--bt-rule);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bt-muted);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
body.bt-v2 .btc-cp-icon-btn:hover { border-color: var(--bt-accent); color: var(--bt-accent); }
body.bt-v2 .btc-cp-exit-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--bt-muted);
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid var(--bt-rule);
  border-radius: 6px;
  transition: color .15s, border-color .15s;
}
body.bt-v2 .btc-cp-exit-btn:hover { color: var(--bt-ink); border-color: var(--bt-ink); }

/* ── Archived banner ───────────────────────────────────────────────────── */
body.bt-v2 .btc-cp-archived {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef9ec;
  border: 1px solid #e8d68a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: #7a6010;
  margin-bottom: 16px;
}

/* ── Rename form ───────────────────────────────────────────────────────── */
body.bt-v2 .btc-cp-rename-wrap {
  background: #f7f1e8;
  border: 1px solid var(--bt-rule);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
body.bt-v2 .btc-cp-rename-form {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
body.bt-v2 .btc-cp-rename-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body.bt-v2 .btc-cp-rename-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--bt-muted);
  text-transform: uppercase;
}
body.bt-v2 .btc-cp-rename-input {
  font-family: inherit;
  font-size: 14px;
  padding: 7px 10px;
  border: 1px solid var(--bt-rule);
  border-radius: 6px;
  background: #fff;
  color: var(--bt-ink);
  transition: border-color .15s;
}
body.bt-v2 .btc-cp-rename-input:focus { outline: none; border-color: var(--bt-accent); }
body.bt-v2 .btc-cp-rename-ok  { color: #2a6e3a; font-size: 13px; }
body.bt-v2 .btc-cp-rename-err { color: #b04040; font-size: 13px; }

/* ── Tab bar ───────────────────────────────────────────────────────────── */
body.bt-v2 .btc-cp-tabbar-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--bt-rule);
}
body.bt-v2 .btc-cp-tabbar {
  display: flex;
  gap: 0;
  min-width: max-content;
}
body.bt-v2 .btc-cp-tab {
  font-family: inherit;
  font-size: 13.5px;
  color: var(--bt-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 18px 11px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
  position: relative;
}
body.bt-v2 .btc-cp-tab:hover { color: var(--bt-ink); }
body.bt-v2 .btc-cp-tab.pace-tab--active {
  color: var(--bt-accent);
  border-bottom-color: var(--bt-accent);
  font-weight: 600;
}
body.bt-v2 .btc-cp-tab-badge,
body.bt-v2 .btc-cp-tabbar .cp-tab-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bt-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  padding: 1px 5px;
  margin-left: 5px;
  vertical-align: middle;
}

/* ── Pane ──────────────────────────────────────────────────────────────── */
body.bt-v2 .btc-cp-pane { animation: btFadeIn .18s ease; }

/* ── Setup pane: circle stage override (keep structure, refresh palette) ── */
body.bt-v2 .circle-stage {
  background: linear-gradient(160deg, #2a1f14 0%, #1e1510 100%);
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
}
body.bt-v2 .circle-center-stats { position: relative; z-index: 2; }
body.bt-v2 .btc-cp-stat { color: var(--bt-cream); }
body.bt-v2 .btc-cp-stat .circle-stat-value { color: var(--bt-cream); }
body.bt-v2 .btc-cp-stat .circle-stat-label { color: rgba(240,223,192,.65); }
body.bt-v2 .circle-stat-item--link:hover .circle-stat-value { color: var(--bt-gold); }

/* ── Action buttons row ─────────────────────────────────────────────────── */
body.bt-v2 .btc-cp-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

/* ── Section headings + dividers ────────────────────────────────────────── */
body.bt-v2 .btc-cp-section-hd {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--bt-ink);
  margin: 0 0 16px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
body.bt-v2 .btc-cp-section-count {
  font-size: 13px;
  color: var(--bt-muted);
  font-family: inherit;
}
body.bt-v2 .btc-cp-divider {
  border: none;
  border-top: 1px solid var(--bt-rule);
  margin: 28px 0;
}
body.bt-v2 .btc-cp-empty-note {
  color: var(--bt-muted);
  font-size: 14px;
  padding: 12px 0;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
body.bt-v2 .btc-cp-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
}
body.bt-v2 .btc-cp-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13.5px;
}
body.bt-v2 .btc-cp-table th {
  background: #f0e9db;
  color: var(--bt-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 8px 12px;
  text-align: left;
  white-space: nowrap;
}
body.bt-v2 .btc-cp-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--bt-rule);
  vertical-align: top;
  color: var(--bt-ink);
}
body.bt-v2 .btc-cp-table tr:last-child td { border-bottom: none; }
body.bt-v2 .btc-cp-table tr:hover td { background: #faf7f2; }

/* ── Exchanges table ─────────────────────────────────────────────────────── */
body.bt-v2 .btc-cp-ex-cover {
  width: 32px;
  height: 46px;
  object-fit: cover;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 8px;
}
body.bt-v2 .btc-cp-ex-title { color: var(--bt-accent); text-decoration: none; font-weight: 500; }
body.bt-v2 .btc-cp-ex-title:hover { text-decoration: underline; }
body.bt-v2 .btc-cp-ex-date { white-space: nowrap; color: var(--bt-muted); font-size: 12.5px; }
body.bt-v2 .btc-cp-ex-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
body.bt-v2 .btc-cp-ex-status--borrowed  { background: #e8f4ee; color: #2a6e3a; }
body.bt-v2 .btc-cp-ex-status--returned  { background: #f0f0f0; color: #888; }

/* ── Stats table overrides ───────────────────────────────────────────────── */
body.bt-v2 .btc-cp-stats-table { min-width: 500px; }
body.bt-v2 .btc-cp-stats-th-label {
  min-width: 160px;
  background: #ede4d4;
  font-size: 10.5px;
}
body.bt-v2 .btc-cp-stats-th-member {
  background: #f0e9db;
  text-align: center;
  font-size: 11px;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
body.bt-v2 .btc-cp-pager {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
body.bt-v2 .btc-cp-pager-btn {
  font-family: inherit;
  font-size: 13px;
  color: var(--bt-accent);
  background: none;
  border: 1px solid var(--bt-rule);
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
body.bt-v2 .btc-cp-pager-btn:hover:not(:disabled) { border-color: var(--bt-accent); }
body.bt-v2 .btc-cp-pager-btn:disabled { opacity: .4; cursor: default; }

/* ── Charts pane ──────────────────────────────────────────────────────────── */
body.bt-v2 .btc-cp-chart-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
body.bt-v2 .btc-cp-nav-btn {
  font-family: inherit;
  font-size: 13px;
  background: none;
  border: 1px solid var(--bt-rule);
  border-radius: 6px;
  padding: 6px 13px;
  color: var(--bt-accent);
  cursor: pointer;
  transition: border-color .15s;
}
body.bt-v2 .btc-cp-nav-btn:hover:not(:disabled) { border-color: var(--bt-accent); }
body.bt-v2 .btc-cp-nav-btn:disabled { opacity: .4; cursor: default; }
body.bt-v2 .btc-cp-nav-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--bt-ink);
}
body.bt-v2 .btc-cp-loading {
  color: var(--bt-muted);
  font-size: 14px;
  padding: 24px 0;
}
body.bt-v2 .btc-cp-chart-section {
  background: #fff;
  border: 1px solid var(--bt-rule);
  border-radius: 12px;
  padding: 20px 18px;
  margin-bottom: 18px;
}
body.bt-v2 .btc-cp-chart-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--bt-ink);
  margin-bottom: 16px;
}
body.bt-v2 .btc-cp-beta-badge {
  display: inline-block;
  background: var(--bt-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  padding: 1px 6px;
  letter-spacing: .05em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 6px;
}

/* ── Genre cloud ─────────────────────────────────────────────────────────── */
body.bt-v2 .btc-cp-gc-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
body.bt-v2 .btc-cp-lang-toggle { display: flex; border: 1px solid var(--bt-rule); border-radius: 6px; overflow: hidden; }
body.bt-v2 .btc-cp-lang-btn {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  background: none;
  border: none;
  padding: 5px 12px;
  color: var(--bt-muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
body.bt-v2 .btc-cp-lang-btn.cp-lang-btn--active { background: var(--bt-accent); color: #fff; }
body.bt-v2 .btc-cp-gc-min-label { font-size: 13px; color: var(--bt-muted); display: flex; align-items: center; gap: 4px; }
body.bt-v2 .btc-cp-gc-min-input {
  width: 48px;
  font-family: inherit;
  font-size: 13px;
  padding: 4px 7px;
  border: 1px solid var(--bt-rule);
  border-radius: 5px;
  background: #fff;
  color: var(--bt-ink);
}
body.bt-v2 .btc-cp-gc-empty { color: var(--bt-muted); font-size: 13.5px; padding: 12px 0; }
body.bt-v2 .btc-cp-gc-sep { border: none; border-top: 1px solid var(--bt-rule); margin: 18px 0; }

/* ── Challenges table ─────────────────────────────────────────────────────── */
body.bt-v2 .btc-cp-chall-thead th {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
body.bt-v2 .btc-cp-chall-link { color: var(--bt-accent); text-decoration: none; }
body.bt-v2 .btc-cp-chall-link:hover { text-decoration: underline; }
body.bt-v2 .btc-cp-chall-cta {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--bt-rule);
}

/* ── Overlays ──────────────────────────────────────────────────────────────── */
body.bt-v2 .btc-cp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30,20,12,.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
body.bt-v2 .btc-cp-overlay-box {
  background: var(--bt-paper);
  border-radius: 14px;
  padding: 28px 28px 24px;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
body.bt-v2 .btc-cp-overlay-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--bt-muted);
  cursor: pointer;
  padding: 2px 6px;
}
body.bt-v2 .btc-cp-overlay-close:hover { color: var(--bt-ink); }
body.bt-v2 .btc-cp-overlay-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--bt-ink);
  margin: 0 0 10px;
}
body.bt-v2 .btc-cp-overlay-body {
  font-size: 13.5px;
  color: var(--bt-muted);
  line-height: 1.55;
  margin: 0 0 22px;
}
body.bt-v2 .btc-cp-overlay-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
body.bt-v2 .btc-cp-overlay-err {
  margin-top: 12px;
  font-size: 12.5px;
  color: #c0392b;
  font-weight: 500;
}

/* ── Invite overlay specific ─────────────────────────────────────────────── */
body.bt-v2 .btc-cp-invite-box { max-width: 480px; }
body.bt-v2 .btc-cp-inv-type-row {
  display: flex;
  gap: 18px;
  margin-bottom: 16px;
  font-size: 13.5px;
  color: var(--bt-ink);
}
body.bt-v2 .btc-cp-inv-type-label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
body.bt-v2 .btc-cp-inv-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body.bt-v2 .btc-cp-inv-input {
  font-family: inherit;
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid var(--bt-rule);
  border-radius: 8px;
  background: #fff;
  color: var(--bt-ink);
  width: 100%;
  box-sizing: border-box;
  transition: border-color .15s;
}
body.bt-v2 .btc-cp-inv-input:focus { outline: none; border-color: var(--bt-accent); }
body.bt-v2 .btc-cp-inv-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
body.bt-v2 .btc-cp-inv-ok  { color: #2a6e3a; font-size: 13px; }
body.bt-v2 .btc-cp-inv-err { color: #b04040; font-size: 13px; }

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
  body.bt-v2 .btc-cp-inner { padding: 16px 12px 0; }
  body.bt-v2 .btc-cp-full { font-size: 1.35rem; }
  body.bt-v2 .btc-cp-actions { gap: 8px; }
  body.bt-v2 .btc-cp-chart-section { padding: 14px 12px; }
  body.bt-v2 .btc-cp-overlay-box { padding: 22px 18px 20px; }
}

/* ── Sidebar utility links (desktop only) ──────────────────────────────── */
@media (min-width:900px) {
  body.bt-v2 .bt-side-utils { display:flex; flex-direction:column; gap:4px; padding:8px 0 4px; border-top:1px solid var(--bt-warm); margin-bottom:2px; }
  body.bt-v2 .bt-side-util { font-size:12.5px; color:var(--bt-muted); text-decoration:none; padding:4px 12px; border-radius:8px; transition:color .12s,background .12s; }
  body.bt-v2 .bt-side-util:hover { color:var(--bt-ink); background:var(--bt-paper); }
  body.bt-v2 .bt-side-util--premium { color:var(--bt-gold); font-weight:600; }
  body.bt-v2 .bt-side-util--premium:hover { background:rgba(184,134,11,.08); color:var(--bt-gold); }
  body.bt-v2 .bt-side-util--admin { color:var(--bt-accent); font-weight:600; }
  body.bt-v2 .bt-side-util-row { display:flex; gap:2px; flex-wrap:wrap; }
}

/* ── Mobile Me-menu dropdown ───────────────────────────────────────────── */
body.bt-v2 .bt-avatar-wrap { position:relative; display:inline-flex; }
body.bt-v2 .bt-avatar-wrap .bt-avatar { cursor:pointer; border:none; padding:0; }
body.bt-v2 .bt-me-menu { display:none; position:absolute; top:calc(100% + 10px); right:0; min-width:200px; background:var(--bt-white); border:1px solid var(--bt-warm); border-radius:14px; box-shadow:0 8px 28px rgba(28,19,9,.13); z-index:200; overflow:hidden; flex-direction:column; }
body.bt-v2 .bt-me-menu.is-open { display:flex; }
body.bt-v2 .bt-me-menu a { display:block; padding:11px 16px; font-size:14px; color:var(--bt-ink); text-decoration:none; transition:background .1s; }
body.bt-v2 .bt-me-menu a:hover { background:var(--bt-paper); }
body.bt-v2 .bt-me-menu .bt-me-menu__premium { color:var(--bt-gold); font-weight:600; }
body.bt-v2 .bt-me-menu .bt-me-menu__div { height:1px; background:var(--bt-warm); margin:4px 0; }
body.bt-v2 .bt-me-menu .bt-me-menu__signout { color:#c0392b; }
}

/* ── Profile completion nudge — sidebar badge (v10) ─────────────────────── */
.bt-side-completion {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 2px 8px 4px;
  border-radius: 10px;
  background: var(--bt-paper);
  border: 1px solid var(--bt-warm);
  text-decoration: none;
  color: var(--bt-ink);
  font-size: 12px;
  line-height: 1.35;
  transition: background .15s;
}
.bt-side-completion:hover { background: #ede5d4; }
.bt-side-comp-ring {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}
.bt-side-comp-svg { display: block; width: 36px; height: 36px; }
.bt-side-comp-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--bt-accent);
  z-index: 1;
}
.bt-side-comp-label { flex: 1; color: var(--bt-muted); }

@keyframes bt-comp-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}
.bt-side-completion--pulse {
  animation: bt-comp-pulse 2s ease-in-out infinite;
}
.bt-side-completion--pulse:hover {
  animation: none;
  opacity: 1;
}

/* ── Buy modal — region delivery hint ───────────────────────────────────── */
.bd-buy-prov-name { display: flex; flex-direction: column; gap: 2px; }
.bd-buy-region-hint {
  font-size: 11px;
  color: var(--bt-muted);
  font-style: italic;
}

/* ── Mobile topbar completion ring ──────────────────────────────────────── */
.bt-avatar-wrap { position: relative; }
.bt-topbar-comp-ring {
  position: absolute;
  inset: -4px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}
.bt-topbar-comp-svg { width: 44px; height: 44px; }

/* ── Mobile Add-book FAB (BT-MOBILE-ADD-BOOK) ───────────────────────────── */
@media (max-width: 899px) {
  body.bt-v2 .bt-fab {
    position: fixed;
    bottom: 80px; /* above tabbar */
    right: 18px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bt-accent);
    color: #fff;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 3px 14px rgba(196,83,26,.45);
    z-index: 50;
    transition: opacity .15s, transform .15s;
    line-height: 1;
  }
  body.bt-v2 .bt-fab:hover {
    opacity: .88;
    transform: scale(1.06);
  }
  /* Hide on add-book page itself */
  body.bt-v2.bt-page-add-book .bt-fab {
    display: none;
  }
}
/* Hidden on desktop — sidebar button handles it */
@media (min-width: 900px) {
  body.bt-v2 .bt-fab { display: none; }
}

/* ── Mobile topbar search reveal (BT-MOBILE-SEARCH-FIX) ─────────────────── */
@media (max-width: 899px) {
  body.bt-v2 .bt-search.only-desktop.is-open {
    display: flex !important;
    position: absolute;
    top: calc(100% + 1px);
    left: 10px;
    right: 10px;
    z-index: 35;
    background: var(--bt-white);
    border: 1px solid var(--bt-warm);
    box-shadow: 0 6px 18px rgba(28,19,9,.12);
    padding: 8px 14px;
  }
}
