/* Basic, clean portfolio-style profile */
.cebc-cover{position:relative;height:220px;background:#f3f4f6;border-radius:16px;overflow:hidden;margin-bottom: -60px;}
.cebc-cover img{width:100%;height:100%;object-fit:cover;display:block;}
.cebc-card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;box-shadow:0 6px 18px rgba(0,0,0,.05);padding:24px}
.cebc-avatar{width:120px;height:120px;border-radius:9999px;overflow:hidden;border:4px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.1)}
.cebc-avatar img{width:100%;height:100%;object-fit:cover}
.cebc-header{display:flex;gap:16px;align-items:flex-end}
.cebc-meta{margin-left:auto;text-align:right}
.cebc-tabs{display:flex;gap:16px;margin-top:16px}
.cebc-tabs a{padding:8px 12px;border-radius:8px;border:1px solid #e5e7eb;text-decoration:none;color:#111827}
.cebc-tabs a.active{background:#111827;color:#fff}
.cebc-follow{margin-top:12px}
.cebc-grid{display:grid;grid-template-columns:1fr;gap:16px}
@media(min-width:900px){.cebc-grid{grid-template-columns:340px 1fr}}
.cebc-panel{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:16px}
.cebc-small{color:#6b7280;font-size:12px}

/* --- Improved cover: send to back as true background layer --- */
.cebc-wrapper{position:relative}
.cebc-cover{position:absolute; top:0; left:0; right:0; height:240px; z-index:0; background:#f3f4f6; border-radius:0; margin:0;}
.cebc-cover::after{content:""; position:absolute; inset:0; background:linear-gradient(to bottom, rgba(0,0,0,.12), rgba(0,0,0,0) 40%);}
.cebc-main{position:relative; z-index:1; margin-top:160px;}
/* Cards hover polish */
.cebc-card{transition:transform .2s ease, box-shadow .2s ease}
.cebc-card:hover{transform:translateY(-2px); box-shadow:0 10px 24px rgba(0,0,0,.08)}
/* Avatar above cover */
.cebc-avatar{ position:relative; z-index:3; }
.cebc-header, .cebc-main{ position:relative; z-index:2; }


/* v7.2.6: Hide any Favorite Books blocks on profile cards defensively */
.cebc-profile .favorite-books,
.cebc-profile #favorite-books,
.cebc-profile [data-block="favorite-books"],
.cebc-profile .cebc-favorite-books { display: none !important; }


/* Best quote block in reviews */
.best-quote { margin: 10px 0 0 0; padding: 10px 12px; border-left: 4px solid #d1d5db; background: #f9fafb; font-style: italic; }
.best-quote p { margin: 0; }


/* === Mobile Overflow Hardening (2025-10) ===
   Ensures long paragraphs, links, usernames, or unbroken strings wrap safely on small screens.
   Also removes accidental fixed heights and hidden overflow in content blocks. */
@media (max-width: 768px){
  .cebc-activity,
  .cebc-activity *{
    -webkit-hyphens: auto;
    hyphens: auto;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  /* Primary text containers */
  .cebc-activity .review,
  .cebc-activity .review .content,
  .cebc-activity .excerpt,
  .cebc-activity .comment,
  .cebc-activity .note,
  .cebc-activity .card,
  .cebc-activity .card .content,
  .cebc-activity .composer textarea{
    white-space: normal !important;
    overflow: visible !important;
    max-width: 100% !important;
  }

  /* Avoid fixed heights that can cause clipping on mobile */
  .cebc-activity [style*="height:"],
  .cebc-activity .viewerSlide,
  .cebc-activity .review{
    height: auto !important;
    min-height: 0 !important;
  }

  /* Images and embeds scale to container */
  .cebc-activity img,
  .cebc-activity iframe,
  .cebc-activity video{
    max-width: 100% !important;
    height: auto !important;
  }

  /* Prevent layout shift from long book titles or ratings line */
  .cebc-activity .header,
  .cebc-activity .bar,
  .cebc-activity .meta{
    flex-wrap: wrap;
    min-width: 0;
  }

  /* Cards should never let content spill horizontally */
  .cebc-activity .wrap,
  .cebc-activity main,
  .cebc-activity section{
    overflow-x: hidden;
  }
}

