/* ============================================================
   THE PROMPT POWERHOUSE — LAYER TWO — MEMBERSHIP LIBRARY
   main.css — FINAL PRODUCTION BUILD
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ── Variables ── */
:root {
  --bg-primary:    #09090b;
  --bg-secondary:  #0e0e11;
  --bg-tertiary:   #131316;
  --bg-card:       #111114;
  --bg-card-hover: #17171b;
  --bg-surface:    #1a1a1f;
  --bg-elevated:   #1e1e24;

  --gold:          #c9a84c;
  --gold-muted:    #9e7e36;
  --gold-dim:      #6b5420;
  --gold-glow:     rgba(201,168,76,0.07);
  --gold-glow-md:  rgba(201,168,76,0.13);
  --gold-border:   rgba(201,168,76,0.12);
  --gold-border-md:rgba(201,168,76,0.28);
  --gold-border-hi:rgba(201,168,76,0.45);

  --text-primary:  #e6e2d9;
  --text-secondary:#a29c90;
  --text-muted:    #68635a;
  --text-inverse:  #09090b;

  --border-faint:  rgba(255,255,255,0.03);
  --border-subtle: rgba(255,255,255,0.06);
  --border-light:  rgba(255,255,255,0.09);
  --border-medium: rgba(255,255,255,0.13);

  --font-serif:    'Cormorant Garamond','Georgia',serif;
  --font-sans:     'DM Sans','Helvetica Neue',sans-serif;

  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  --header-h: 60px;
  --search-h:  50px;
  --max-w:   1300px;
  --radius:    3px;

  --ease:   cubic-bezier(0.22,1,0.36,1);
  --t-fast: 140ms var(--ease);
  --t-base: 240ms var(--ease);
  --t-slow: 380ms var(--ease);

  --space-md:  var(--sp-4);
  --space-lg:  var(--sp-6);
  --space-xl:  var(--sp-8);
  --space-3xl: var(--sp-12);
  --space-4xl: var(--sp-16);
  --text-tertiary: var(--text-muted);
}

/* ── Reset ── */
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { font-size:16px; -webkit-font-smoothing:antialiased; scroll-behavior:smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration:none; color:inherit; transition:color var(--t-fast); }
img { display:block; max-width:100%; height:auto; }
button { font-family:var(--font-sans); cursor:pointer; border:none; background:none; color:inherit; }
ul,ol { list-style:none; }

/* ── Layout ── */
.page-wrapper {
  padding-top: calc(var(--header-h) + var(--search-h));
  min-height: 100vh;
}
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* ════════════════════════════════════════
   HEADER
════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-faint);
  z-index: 1000;
  display: flex;
  align-items: center;
}
.header-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.header-logo-mark {
  width: 26px; height: 26px;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-inverse);
  flex-shrink: 0;
}
.header-logo-text {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}
.header-logo-text span { color: var(--gold); }

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}
.header-nav-link {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--t-fast);
  position: relative;
  padding: var(--sp-1) 0;
}
.header-nav-link:hover,
.header-nav-link.active { color: var(--gold); }
.header-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
}

.header-user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.header-user-name {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 400;
  font-style: italic;
  font-family: var(--font-serif);
}
.header-user-avatar {
  width: 30px; height: 30px;
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--gold);
  background: var(--bg-tertiary);
}

/* ════════════════════════════════════════
   SEARCH BAND
════════════════════════════════════════ */
.search-band {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  height: var(--search-h);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 999;
  display: flex;
  align-items: center;
}
.search-band-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.search-input-wrap {
  flex: 1;
  position: relative;
}
.search-icon {
  position: absolute;
  left: var(--sp-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-dim);
  width: 15px; height: 15px;
  pointer-events: none;
  transition: color var(--t-fast);
}
.search-input-wrap:focus-within .search-icon { color: var(--gold-muted); }
.search-input {
  width: 100%;
  height: 34px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 0 var(--sp-4) 0 calc(var(--sp-4) + 22px);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--t-fast), background var(--t-fast);
  letter-spacing: 0.01em;
}
.search-input::placeholder { color: var(--text-muted); font-weight: 300; }
.search-input:focus {
  border-color: var(--gold-border-md);
  background: var(--bg-surface);
}
.search-scope {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0; right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1001;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.search-results-dropdown.active { display: block; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border-faint);
  cursor: pointer;
  transition: background var(--t-fast);
}
.search-result-item:hover { background: var(--bg-card-hover); }
.search-result-item:last-child { border-bottom: none; }
.search-result-cover {
  width: 28px; height: 38px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-faint);
}
.search-result-cover-ph {
  width: 28px; height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  font-size: 0.75rem;
  flex-shrink: 0;
  color: var(--gold-dim);
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-title {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: 2px;
  font-size: 0.68rem;
  color: var(--text-muted);
}
.search-result-meta-sep { opacity: 0.4; }
.search-no-results {
  padding: var(--sp-4) var(--sp-6);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  font-style: italic;
  font-family: var(--font-serif);
}

/* ════════════════════════════════════════
   ARRIVAL STRIP
════════════════════════════════════════ */
.arrival-strip {
  padding: var(--sp-12) 0 var(--sp-8);
  border-bottom: 1px solid var(--border-faint);
  margin-bottom: var(--sp-10);
  text-align: center;
}
.arrival-label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: var(--sp-4);
}
.arrival-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.8rem,4vw,2.8rem);
  color: var(--text-primary);
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin-bottom: var(--sp-3);
}
.arrival-subtitle {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.75;
}
.arrival-rule {
  width: 48px;
  height: 1px;
  background: var(--gold-dim);
  margin: var(--sp-8) auto 0;
  opacity: 0.6;
}

/* ════════════════════════════════════════
   HALL GATEWAY
════════════════════════════════════════ */
.hall-gateway { padding-bottom: var(--sp-20); }
.hall-gateway-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: var(--sp-5);
  max-width: 720px;
  margin: 0 auto;
}
.hall-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: var(--sp-10) var(--sp-8);
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-base);
}
.hall-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold-glow);
  opacity: 0;
  transition: opacity var(--t-base);
}
.hall-card:hover { border-color: var(--gold-border-md); }
.hall-card:hover::before { opacity: 1; }
.hall-card-icon {
  width: 36px; height: 36px;
  margin: 0 auto var(--sp-5);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}
.hall-card-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.hall-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 240px;
  margin: 0 auto;
}
.hall-card-count {
  margin-top: var(--sp-5);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-muted);
}

/* ════════════════════════════════════════
   HALL PAGE HEADER
════════════════════════════════════════ */
.platform-page-header { padding: var(--sp-12) 0 var(--sp-8); }
.platform-page-label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: var(--sp-3);
}
.platform-page-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.4rem,3vw,2rem);
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

/* ════════════════════════════════════════
   FAE — FOR ALL ENTREPRENEURS
════════════════════════════════════════ */
.fae-featured-strip {
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  border-left: 3px solid var(--gold-dim);
  padding: var(--sp-6) var(--sp-8);
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  margin-bottom: var(--sp-8);
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--t-base), background var(--t-base);
  position: relative;
  overflow: hidden;
}
.fae-featured-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.fae-featured-strip:hover {
  border-color: var(--gold-border-md);
  border-left-color: var(--gold-muted);
}
.fae-strip-mark {
  width: 44px; height: 44px;
  border: 1px solid var(--gold-border-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  background: var(--bg-tertiary);
  flex-shrink: 0;
}
.fae-strip-body { flex: 1; min-width: 0; }
.fae-strip-eyebrow {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: var(--sp-1);
}
.fae-strip-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}
.fae-strip-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.fae-strip-arrow {
  font-size: 0.9rem;
  color: var(--gold-dim);
  flex-shrink: 0;
  transition: color var(--t-fast), transform var(--t-fast);
}
.fae-featured-strip:hover .fae-strip-arrow {
  color: var(--gold-muted);
  transform: translateX(3px);
}
.platform-identity--fae {
  padding: var(--sp-8) 0 var(--sp-6);
  border-left: 3px solid rgba(201,168,76,0.3);
  padding-left: var(--sp-6);
  margin-left: calc(-1 * var(--sp-6));
  margin-bottom: var(--sp-2);
  background: linear-gradient(90deg, rgba(201,168,76,0.05) 0%, transparent 55%);
}
.fae-identity-mark {
  width: 44px; height: 44px;
  border: 1px solid var(--gold-border-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  background: var(--bg-tertiary);
  margin-bottom: var(--sp-4);
}
.platform-identity-group-label {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: var(--sp-2);
}
.platform-identity-name {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.3rem,3vw,1.8rem);
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--sp-2);
}
.platform-identity-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 560px;
}

/* ════════════════════════════════════════
   PLATFORM GRID (Hall pages)
════════════════════════════════════════ */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px,1fr));
  gap: var(--sp-4);
  padding-bottom: var(--sp-20);
}
.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: var(--sp-6) var(--sp-5);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-base), background var(--t-base);
  position: relative;
  display: block;
}
.platform-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold-glow);
  opacity: 0;
  transition: opacity var(--t-base);
  pointer-events: none;
}
.platform-card:hover { border-color: var(--gold-border-md); }
.platform-card:hover::after { opacity: 1; }
.platform-card-logo-placeholder {
  width: 38px; height: 38px;
  margin: 0 auto var(--sp-4);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  background: var(--bg-tertiary);
}
.platform-logo--card {
  width: 38px; height: 38px;
  object-fit: contain;
  display: block;
  margin: 0 auto var(--sp-4);
}
.platform-card-name {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}
.platform-card-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ════════════════════════════════════════
   PLATFORM IDENTITY BAND
════════════════════════════════════════ */
.platform-identity {
  padding: var(--sp-8) var(--sp-6);
  border-left: 3px solid transparent;
  margin-left: calc(-1 * var(--sp-6));
  margin-bottom: var(--sp-6);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}
.platform-identity-logo-placeholder {
  width: 48px; height: 48px;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold);
  background: var(--bg-tertiary);
  flex-shrink: 0;
}
.platform-logo--header {
  width: 48px; height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}
.platform-identity-info { flex: 1; }

/* ════════════════════════════════════════
   LIBRARY LINKS
════════════════════════════════════════ */
.library-links {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: var(--sp-4);
  padding-bottom: var(--sp-16);
}
.library-link-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: var(--sp-6);
  cursor: pointer;
  transition: border-color var(--t-base);
  position: relative;
  display: block;
}
.library-link-card:hover { border-color: var(--gold-border-md); }
.library-link-label {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: var(--sp-2);
}
.library-link-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.library-link-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.62;
  padding-right: var(--sp-6);
}
.library-link-arrow {
  position: absolute;
  top: var(--sp-6);
  right: var(--sp-6);
  color: var(--gold-dim);
  font-size: 0.85rem;
  transition: color var(--t-fast), transform var(--t-fast);
}
.library-link-card:hover .library-link-arrow {
  color: var(--gold-muted);
  transform: translateX(3px);
}

/* ════════════════════════════════════════
   LIBRARY PAGE HEADER
════════════════════════════════════════ */
.library-header { padding: var(--sp-10) 0 var(--sp-6); }
.library-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-5);
  letter-spacing: 0.02em;
}
.library-breadcrumb a {
  color: var(--text-muted);
  transition: color var(--t-fast);
}
.library-breadcrumb a:hover { color: var(--gold); }
.library-breadcrumb .sep { opacity: 0.35; }
.library-breadcrumb .current { color: var(--text-secondary); }
.library-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.3rem,3vw,1.85rem);
  color: var(--text-primary);
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.library-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: var(--sp-2);
  line-height: 1.6;
}

/* ════════════════════════════════════════
   SHELF (horizontal scroll rows)
════════════════════════════════════════ */
.shelf {
  padding: var(--sp-8) 0 var(--sp-4);
  border-top: 1px solid var(--border-faint);
}
.shelf:first-child { border-top: none; }
.shelf-label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: var(--sp-5);
}
.shelf-scroll {
  display: flex;
  gap: 36px;
  overflow-x: auto;
  padding-bottom: var(--sp-4);
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) transparent;
}
.shelf-scroll::-webkit-scrollbar { height: 3px; }
.shelf-scroll::-webkit-scrollbar-track { background: transparent; }
.shelf-scroll::-webkit-scrollbar-thumb { background: var(--gold-dim); }
.shelf-scroll .book-card {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  flex-shrink: 0;
}

/* ════════════════════════════════════════
   BOOK GRID — Exact Kobo system
   Fixed 248px card columns.
   36px gap between cards.
   Grid centered in the container.
════════════════════════════════════════ */
.book-grid {
  display: grid;
  grid-template-columns: repeat(5, 198px);
  gap: 36px 20px;
  justify-content: center;
  padding-bottom: var(--sp-6);
}

/* ════════════════════════════════════════
   BOOK CARD — Exact Kobo system
   The entire card is one <a> link.
   Cover fills the full 248px column width.
   Aspect ratio ~1:1.6 (like real book covers).
   Text left-aligned beneath cover.
   Title: 2 lines max, medium weight.
   Author: muted, smaller.
   Hover: subtle background highlight on
   the whole card area — no lift, no zoom.
════════════════════════════════════════ */
.book-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: none;
  overflow: visible;
  padding: 10px;
  border-radius: 6px;
  transition: background 0.28s ease;
  cursor: pointer;
}
.book-card:hover {
  background: rgba(255,255,255,0.035);
}

/* Cover — fills full card width, tall ratio */
.book-card-cover-wrap {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 0.68;  /* 1:1.6 — Kobo book cover ratio */
  overflow: hidden;
  background: var(--bg-tertiary);
  border-radius: 3px;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.12),
    0 4px 12px rgba(0,0,0,0.06);
  transition: box-shadow 0.28s ease;
}
.book-card:hover .book-card-cover-wrap {
  box-shadow:
    0 2px 6px rgba(0,0,0,0.18),
    0 8px 24px rgba(0,0,0,0.12);
}
.book-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.book-card-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  background: var(--bg-tertiary);
}
.book-card-cover-placeholder .icon {
  font-size: 1.6rem;
  opacity: 0.3;
}
.book-card-cover-placeholder .label {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0 var(--sp-4);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Text beneath cover — left-aligned like Kobo */
.book-card-body {
  padding-top: 14px;
  width: 100%;
  text-align: left;
}
.book-card-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-card-author {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: color var(--t-fast);
  cursor: pointer;
  text-decoration: none;
}
.book-card-author:hover {
  color: var(--gold);
}

/* Legacy classes hidden */
.book-card-desc,
.book-card-stats,
.book-card-badges,
.book-card-actions,
.book-card-version,
.book-card-price { display: none; }

/* ════════════════════════════════════════
   BOOK ACTION BUTTONS (detail page + reader)
════════════════════════════════════════ */
.book-action {
  display: block;
  width: 100%;
  padding: 7px var(--sp-3);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  background: transparent;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
  cursor: pointer;
}
.book-action:hover {
  border-color: var(--gold-border-md);
  color: var(--gold);
}
.book-action.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--text-inverse);
  font-weight: 600;
}
.book-action.primary:hover {
  background: var(--gold-muted);
  border-color: var(--gold-muted);
  color: var(--text-inverse);
}

/* ═══ Badge styles (detail page + reader) ═══ */
.book-card-badge {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
}
.book-card-badge.full-form {
  border-color: var(--gold-border);
  color: var(--gold-muted);
}

/* ════════════════════════════════════════
   BOOK DETAIL PAGE (bkd-*)
   Full Kobo-style product page
════════════════════════════════════════ */
.bkd-header {
  padding: var(--sp-10) 0 var(--sp-6);
}
.bkd-layout {
  display: flex;
  gap: var(--sp-12);
  align-items: flex-start;
  padding-bottom: var(--sp-10);
}
.bkd-cover-col {
  flex-shrink: 0;
  width: 280px;
}
.bkd-cover {
  width: 100%;
  aspect-ratio: 0.625;  /* 1:1.6 — matches shelf cover ratio */
  object-fit: cover;
  display: block;
  border-radius: 3px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35), 0 2px 6px rgba(0,0,0,0.2);
}
.bkd-cover-placeholder {
  width: 100%;
  aspect-ratio: 0.625;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  border-radius: 2px;
}
.bkd-info-col {
  flex: 1;
  min-width: 0;
  padding-top: var(--sp-2);
}
.bkd-badges {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}
.bkd-badge {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
}
.bkd-badge--form {
  border-color: var(--gold-border);
  color: var(--gold-muted);
}
.bkd-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--text-primary);
  line-height: 1.18;
  margin-bottom: var(--sp-3);
}
.bkd-author {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text-secondary);
  transition: color var(--t-fast);
  margin-bottom: var(--sp-2);
}
.bkd-author:hover { color: var(--gold); }
.bkd-price {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-6);
}
.bkd-divider {
  width: 40px;
  height: 1px;
  background: var(--gold-dim);
  opacity: 0.5;
  margin-bottom: var(--sp-5);
}
.bkd-stats {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}
.bkd-stats strong {
  color: var(--text-secondary);
  font-weight: 600;
}
.bkd-stats-sep { opacity: 0.35; }
.bkd-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.78;
  margin-bottom: var(--sp-8);
  max-width: 500px;
}
.bkd-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: 260px;
}
.bkd-actions .book-action {
  width: 100%;
  padding: 10px var(--sp-5);
  font-size: 0.72rem;
}

/* Request link on detail page */
.bkd-request-link {
  display: inline-block;
  margin-top: var(--sp-5);
  font-size: 0.7rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text-muted);
  transition: color var(--t-fast);
  letter-spacing: 0.02em;
}
.bkd-request-link:hover { color: var(--gold); }

.bkd-footer {
  padding-top: var(--sp-8);
  border-top: 1px solid var(--border-faint);
  margin-top: var(--sp-4);
  padding-bottom: var(--sp-12);
}
.bkd-back-link {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--t-fast);
}
.bkd-back-link:hover { color: var(--gold); }

/* Empty states for book detail page */
.bkd-empty {
  padding: var(--sp-16) var(--sp-8);
  border: 1px solid var(--border-faint);
  text-align: center;
  margin: var(--sp-10) 0;
}
.bkd-empty-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}
.bkd-empty-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.7;
  line-height: 1.7;
}

/* ════════════════════════════════════════
   REQUEST STRIP — Concierge volume request
   Appears on library pages above footer
════════════════════════════════════════ */
.request-strip {
  border-top: 1px solid var(--border-faint);
  margin-top: var(--sp-12);
  padding: var(--sp-8) 0;
}
.request-strip-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.request-strip-icon {
  width: 38px; height: 38px;
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-dim);
  background: var(--bg-tertiary);
  flex-shrink: 0;
}
.request-strip-body {
  flex: 1;
  min-width: 0;
}
.request-strip-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.request-strip-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 480px;
}
.request-strip-link {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-muted);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color var(--t-fast);
}
.request-strip-link:hover {
  color: var(--gold);
}

/* ════════════════════════════════════════
   EMPTY STATE
════════════════════════════════════════ */
.empty-state {
  padding: var(--sp-16) var(--sp-8);
  border: 1px solid var(--border-faint);
  text-align: center;
  margin: var(--sp-8) 0;
}
.empty-state-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}
.empty-state-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.7;
  line-height: 1.7;
}

/* ════════════════════════════════════════
   PLATFORM MICRO-BADGE
════════════════════════════════════════ */
.platform-micro-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  padding: 2px 6px;
  font-size: 0.64rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.platform-micro-badge__logo {
  width: 11px; height: 11px;
  object-fit: contain;
  display: inline-block;
}

/* ════════════════════════════════════════
   READER
════════════════════════════════════════ */
.reader-wrapper {
  max-width: 820px;
  margin: 0 auto;
  padding: var(--sp-12) var(--sp-6) var(--sp-16);
}
.reader-header {
  display: flex;
  gap: var(--sp-8);
  padding-bottom: var(--sp-8);
  border-bottom: 1px solid var(--border-faint);
  margin-bottom: var(--sp-8);
  align-items: flex-start;
}
.reader-cover-wrap { flex-shrink: 0; }
.reader-cover {
  width: 148px; height: 204px;
  object-fit: cover;
  border: 1px solid var(--border-light);
  display: block;
}
.reader-cover-placeholder {
  width: 148px; height: 204px;
  border: 1px solid var(--border-light);
  background: var(--bg-tertiary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
}
.reader-info { flex: 1; min-width: 0; }
.reader-meta-top {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}
.reader-form-badge {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-muted);
  border: 1px solid var(--gold-border);
  padding: 2px 7px;
}
.reader-version {
  font-size: 0.6rem;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 2px 7px;
}
.reader-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.35rem,3vw,1.9rem);
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: var(--sp-3);
}
.reader-stats {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.reader-stats strong { color: var(--text-secondary); font-weight: 600; }
.reader-stats-sep { opacity: 0.35; }
.reader-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.72;
  margin-bottom: var(--sp-6);
  max-width: 480px;
}
.reader-actions {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.reader-actions .book-action {
  width: auto;
  padding: 8px var(--sp-5);
  display: inline-block;
}
.reader-content { padding: var(--sp-8) 0; }
.reader-content-placeholder {
  padding: var(--sp-10) var(--sp-8);
  border: 1px solid var(--border-faint);
  text-align: center;
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.8;
}
.reader-footer {
  display: flex;
  justify-content: space-between;
  padding-top: var(--sp-8);
  border-top: 1px solid var(--border-faint);
  margin-top: var(--sp-8);
}
.reader-footer-link {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--t-fast);
}
.reader-footer-link:hover { color: var(--gold); }

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border-faint);
  padding: var(--sp-8) 0;
  text-align: center;
  margin-top: var(--sp-16);
}
.footer-text {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ════════════════════════════════════════
   MOBILE MENU
════════════════════════════════════════ */
.mobile-menu-toggle {
  display: none;
  width: 30px; height: 30px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.mobile-menu-toggle span {
  display: block;
  width: 18px; height: 1px;
  background: var(--text-secondary);
  transition: all var(--t-fast);
}
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1100;
}
.mobile-overlay.active { display: block; }
.mobile-drawer {
  position: fixed;
  top: 0; right: -280px;
  width: 280px; height: 100%;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-light);
  z-index: 1101;
  transition: right var(--t-base);
  padding: var(--sp-8);
}
.mobile-drawer.active { right: 0; }
.mobile-drawer-close {
  position: absolute;
  top: var(--sp-4); right: var(--sp-4);
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}
.mobile-drawer-nav {
  margin-top: var(--sp-10);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
.mobile-drawer-nav a {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mobile-drawer-nav a:hover,
.mobile-drawer-nav a.active { color: var(--gold); }
.mobile-drawer-user {
  margin-top: var(--sp-10);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border-faint);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* ════════════════════════════════════════
   LOADING SKELETON
════════════════════════════════════════ */
.loading-skeleton {
  background: linear-gradient(90deg,
    var(--bg-tertiary) 25%,
    var(--bg-surface) 50%,
    var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-sweep 1.6s ease-in-out infinite;
}
@keyframes skeleton-sweep {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ════════════════════════════════════════
   FADE IN
════════════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.45s var(--ease) forwards;
}
@keyframes fadeUp {
  to { opacity:1; transform:translateY(0); }
}
.fade-in:nth-child(1)  { animation-delay: 0.04s; }
.fade-in:nth-child(2)  { animation-delay: 0.08s; }
.fade-in:nth-child(3)  { animation-delay: 0.12s; }
.fade-in:nth-child(4)  { animation-delay: 0.16s; }
.fade-in:nth-child(5)  { animation-delay: 0.20s; }
.fade-in:nth-child(6)  { animation-delay: 0.24s; }
.fade-in:nth-child(7)  { animation-delay: 0.28s; }
.fade-in:nth-child(8)  { animation-delay: 0.32s; }
.fade-in:nth-child(9)  { animation-delay: 0.36s; }
.fade-in:nth-child(10) { animation-delay: 0.40s; }

/* ════════════════════════════════════════
   RESPONSIVE — TABLET
════════════════════════════════════════ */
@media (max-width: 900px) {
  .platform-grid { grid-template-columns: repeat(3,1fr); }
  .book-grid { grid-template-columns: repeat(3, 113px); gap: 32px 20px; }

  .bkd-cover-col { width: 220px; }
  .bkd-layout { gap: var(--sp-8); }
}

/* ════════════════════════════════════════
   RESPONSIVE — MOBILE
════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --sp-6: 1.25rem; }

  .header-nav,
  .header-user-name { display: none; }
  .mobile-menu-toggle { display: flex; }

  .page-wrapper { padding-top: calc(var(--header-h) + var(--search-h)); }
  .container { padding: 0 var(--sp-4); }

  .arrival-strip { padding: var(--sp-8) 0 var(--sp-6); }
  .arrival-title { font-size: 1.6rem; }
  .arrival-subtitle { font-size: 0.8rem; }

  .hall-gateway-grid { grid-template-columns: 1fr; max-width: 100%; }
  .hall-card { padding: var(--sp-8) var(--sp-6); }

  .platform-grid { grid-template-columns: repeat(2,1fr); gap: var(--sp-3); }
  .platform-card { padding: var(--sp-5) var(--sp-4); }

  .library-links { grid-template-columns: 1fr; }
  .library-link-card { padding: var(--sp-5); }

  /* Kobo mobile: 2 books per row, fluid */
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 16px;
  }
  .book-card {
    padding: 8px;
  }

  .shelf-scroll { gap: 20px; }
  .shelf-scroll .book-card {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
  }

  .platform-identity {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-3);
    padding-left: var(--sp-4);
    margin-left: calc(-1 * var(--sp-4));
  }
  .platform-identity-name { font-size: 1.3rem; }

  .fae-featured-strip { padding: var(--sp-4) var(--sp-5); gap: var(--sp-4); }

  .search-scope { display: none; }

  .reader-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--sp-6);
  }
  .reader-stats,
  .reader-meta-top,
  .reader-actions { justify-content: center; }
  .reader-desc { max-width: 100%; }
  .reader-footer { flex-direction: column; align-items: center; gap: var(--sp-4); }
  .reader-wrapper { padding: var(--sp-8) var(--sp-4) var(--sp-12); }

  /* Book detail page — stack vertically */
  .bkd-layout {
    flex-direction: column;
    align-items: center;
    gap: var(--sp-6);
  }
  .bkd-cover-col { width: 200px; }
  .bkd-info-col { text-align: center; }
  .bkd-badges { justify-content: center; }
  .bkd-stats { justify-content: center; }
  .bkd-desc { max-width: 100%; }
  .bkd-actions {
    max-width: 100%;
    align-items: center;
    margin: 0 auto;
  }
  .bkd-divider { margin: 0 auto var(--sp-5); }
  .bkd-footer { text-align: center; }
  .bkd-request-link { display: block; margin-top: var(--sp-4); }

  /* Request strip mobile — stack */
  .request-strip-inner {
    flex-direction: column;
    text-align: center;
    gap: var(--sp-4);
    padding: 0 var(--sp-4);
  }
  .request-strip-desc {
    max-width: 100%;
  }
}

/* ════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE
════════════════════════════════════════ */
@media (max-width: 480px) {
  .platform-grid { grid-template-columns: repeat(2,1fr); gap: var(--sp-2); }

  .book-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 12px;
  }

  .library-title { font-size: 1.15rem; }
  .shelf-scroll .book-card { width: 135px; min-width: 135px; max-width: 135px; }
  .fae-strip-desc { display: none; }

  .bkd-cover-col { width: 170px; }
  .bkd-title { font-size: 1.3rem; }
}


/* ── WordPress identity bridge additions ── */
.header-user { gap: .55rem; border: 1px solid var(--border-subtle); padding: .28rem .35rem .28rem .65rem; border-radius: 999px; transition: border-color var(--t-fast), background var(--t-fast); }
.header-user:hover { border-color: var(--gold-border-md); background: rgba(201,168,76,.045); }
.header-user-avatar-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--gold-border-md); }
.pp-mode-badge { font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--gold-border-md); padding: .16rem .36rem; border-radius: 999px; }
.pp-mode-badge--member { color: #d9c27a; }
.pp-preview-lock-note { display:block; margin-top:.65rem; font-size:.74rem; color:var(--text-muted); line-height:1.55; max-width:320px; }
.pp-issue-notice { color: var(--gold); }
