/* =========================================================
   enhancements.css
   Zeroth Business Solutions — augmentation layer
   Loaded last. Wins over style.css and *-hub.css where intended.
   Sections:
     0. Tokens
     1. Advert banner (marquee, real images)
     2. Toast notifications
     3. Deposit buttons
     4. Receipt modal
     5. Social share bar
     6. Lesson plan cards
     7. Entertainment engagement
       7a. Card-level engagement bar
       7b. Post detail modal
       7c. Like / dislike / view / share bar
       7d. Comment section
     8. Responsive
     9. Motion / a11y
    10. Print
   ========================================================= */

/* =========================================================
   0. TOKENS
   ========================================================= */
:root {
  --zbs-green:        #1f7a3d;
  --zbs-green-light:  #2a9d52;
  --zbs-green-dark:   #145a2b;
  --zbs-red:          #c62828;
  --zbs-blue:         #1565c0;
  --zbs-amber:        #f9a825;
  --zbs-purple:       #6a1b9a;

  --zbs-ink:          #1a1d21;
  --zbs-muted:        #6b7280;
  --zbs-line:         #e5e7eb;
  --zbs-surface:      #ffffff;
  --zbs-surface-2:    #f6f7f9;

  /* overwritten at runtime by enhancements.js */
  --header-h:   70px;
  --advert-h:   52px;
  --advert-duration: 60s;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 999px;

  --sh-sm: 0 1px 3px rgba(0, 0, 0, .12);
  --sh-md: 0 4px 12px rgba(0, 0, 0, .14);
  --sh-lg: 0 14px 38px rgba(0, 0, 0, .18);

  --ease-out:   cubic-bezier(.16, 1, .3, 1);
  --ease-slide: cubic-bezier(.65, .05, .36, 1);

  /* entertainment engagement */
  --eng-like:    #1f7a3d;
  --eng-dislike: #c62828;
  --eng-share:   #1565c0;
  --eng-view:    #6b7280;
}

/* =========================================================
   1. ADVERT BANNER — continuous marquee with images
   ========================================================= */
.adverts-banner {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  height: var(--advert-h);
  z-index: 940;
  overflow: hidden;
  display: block !important;
  color: #fff;
  background: linear-gradient(
    90deg,
    var(--zbs-green-dark) 0%,
    var(--zbs-green) 50%,
    var(--zbs-green-dark) 100%
  );
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);

  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 40px,
    #000 calc(100% - 40px),
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 40px,
    #000 calc(100% - 40px),
    transparent 100%
  );
}

.adverts-track {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  will-change: transform;
  animation: adverts-scroll var(--advert-duration, 60s) linear infinite;
}

.adverts-banner:hover .adverts-track,
.adverts-banner:focus-within .adverts-track {
  animation-play-state: paused;
}

@keyframes adverts-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.advert-item {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  height: 100%;
  padding: 0 1.4rem;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: background .18s;
}

.advert-item:hover,
.advert-item:focus-visible {
  background: rgba(255, 255, 255, .08);
  outline: none;
}

.advert-img {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, .12);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.advert-emoji {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  line-height: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}

.advert-text {
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .01em;
}

.advert-tag {
  flex: 0 0 auto;
  padding: .12rem .5rem;
  border-radius: var(--r-pill);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.advert-tag.tag-hot  { background: #e53935;              color: #fff; }
.advert-tag.tag-new  { background: var(--zbs-green-light); color: #fff; }
.advert-tag.tag-sale { background: var(--zbs-amber);     color: #2b2100; }
.advert-tag.tag-best { background: #ffd54f;              color: #3a2c00; }
.advert-tag.tag-fire { background: #ff6f00;              color: #fff; }
.advert-tag.tag-cool { background: var(--zbs-blue);      color: #fff; }
.advert-tag.tag-star { background: var(--zbs-purple);    color: #fff; }
.advert-tag.tag-plain{ background: rgba(255, 255, 255, .18); color: #fff; }

/* =========================================================
   2. TOAST
   ========================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 24px);
  min-width: 240px;
  max-width: 92vw;
  padding: .75rem 1rem;
  border-radius: var(--r-md);
  background: var(--zbs-ink);
  color: #fff;
  font-size: .9rem;
  line-height: 1.35;
  text-align: center;
  box-shadow: var(--sh-lg);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease-out);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.toast.success { background: var(--zbs-green); }
.toast.error   { background: var(--zbs-red);   }
.toast.warn    { background: var(--zbs-amber); color: #2b2100; }
.toast.info    { background: var(--zbs-blue);  }

/* =========================================================
   3. DEPOSIT BUTTONS
   ========================================================= */
.zbs-deposit-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.1rem;
  border: 0;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--zbs-green), var(--zbs-green-light));
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  box-shadow: var(--sh-sm);
  transition: transform .15s var(--ease-out), box-shadow .15s;
}

.zbs-deposit-btn:hover  { transform: translateY(-1px); box-shadow: var(--sh-md); }
.zbs-deposit-btn:active { transform: translateY(0); }
.zbs-deposit-btn[disabled] { opacity: .55; pointer-events: none; }

.zbs-deposit-btn.is-loading {
  pointer-events: none;
  opacity: .85;
}

.zbs-deposit-btn.is-loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: zbs-spin .7s linear infinite;
}

@keyframes zbs-spin { to { transform: rotate(360deg); } }

/* =========================================================
   4. RECEIPT MODAL
   ========================================================= */
.zbs-receipt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 10100;
  opacity: 0;
  transition: opacity .2s;
}

.zbs-receipt-overlay.show { opacity: 1; }

.zbs-receipt {
  width: min(420px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--zbs-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  transform: translateY(16px);
  transition: transform .3s var(--ease-out);
}

.zbs-receipt-overlay.show .zbs-receipt { transform: translateY(0); }

.zbs-receipt-head {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--zbs-green), var(--zbs-green-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.zbs-receipt-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.zbs-receipt-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.zbs-receipt-close:hover { background: rgba(255, 255, 255, .35); }

.zbs-receipt-body { padding: 1rem 1.25rem; }

.zbs-receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .45rem 0;
  font-size: .9rem;
  border-bottom: 1px dashed var(--zbs-line);
}

.zbs-receipt-row:last-child { border-bottom: 0; }
.zbs-receipt-row .label { color: var(--zbs-muted); }
.zbs-receipt-row .value {
  font-weight: 500;
  text-align: right;
  word-break: break-word;
}

.zbs-receipt-row.total {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--zbs-green-dark);
  padding-top: .75rem;
  margin-top: .5rem;
  border-top: 2px solid var(--zbs-line);
  border-bottom: 0;
}

.zbs-receipt-footer {
  padding: .75rem 1.25rem 1.25rem;
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
}

.zbs-receipt-btn {
  padding: .5rem 1rem;
  border: 0;
  border-radius: var(--r-md);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}

.zbs-receipt-btn.primary {
  background: var(--zbs-green);
  color: #fff;
}

.zbs-receipt-btn.primary:hover { background: var(--zbs-green-dark); }

.zbs-receipt-btn.ghost {
  background: transparent;
  color: var(--zbs-muted);
  border: 1px solid var(--zbs-line);
}

.zbs-receipt-btn.ghost:hover {
  background: var(--zbs-surface-2);
  color: var(--zbs-ink);
}

/* =========================================================
   5. SOCIAL SHARE BAR
   ========================================================= */
.zbs-social-bar {
  position: fixed;
  right: 1rem;
  bottom: 96px;
  z-index: 9400;
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem;
  border-radius: var(--r-pill);
  background: var(--zbs-surface);
  box-shadow: var(--sh-md);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease-out);
}

.zbs-social-bar.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.zbs-social-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--zbs-surface-2);
  color: var(--zbs-ink);
  font-size: .9rem;
  cursor: pointer;
  transition: transform .15s, background .15s;
}

.zbs-social-btn:hover { transform: scale(1.08); }

.zbs-social-btn.wa { background: #25d366; color: #fff; }
.zbs-social-btn.fb { background: #1877f2; color: #fff; }
.zbs-social-btn.tw { background: #000;    color: #fff; }
.zbs-social-btn.li { background: #0a66c2; color: #fff; }
.zbs-social-btn.cp { background: var(--zbs-green); color: #fff; }

/* =========================================================
   6. LESSON PLAN CARDS
   ========================================================= */
.zbs-lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.zbs-lesson-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--zbs-surface);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  transition: transform .18s var(--ease-out), box-shadow .18s;
}

.zbs-lesson-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
}

.zbs-lesson-head {
  padding: .75rem 1rem;
  background: linear-gradient(135deg, var(--zbs-green), var(--zbs-green-light));
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.zbs-lesson-head .subject {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .85;
}

.zbs-lesson-head .title {
  font-size: .95rem;
  font-weight: 600;
}

.zbs-lesson-body {
  padding: .85rem 1rem;
  flex: 1;
}

.zbs-lesson-meta {
  display: flex;
  gap: 1rem;
  font-size: .75rem;
  color: var(--zbs-muted);
  margin-bottom: .5rem;
}

.zbs-lesson-meta i { margin-right: .25rem; }

.zbs-lesson-summary {
  font-size: .85rem;
  line-height: 1.45;
  color: var(--zbs-ink);
  margin: 0;
}

.zbs-lesson-foot {
  padding: .65rem 1rem;
  border-top: 1px solid var(--zbs-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
}

.zbs-lesson-tag {
  padding: .15rem .55rem;
  border-radius: var(--r-pill);
  background: rgba(31, 122, 61, .12);
  color: var(--zbs-green-dark);
  font-weight: 600;
}

.zbs-lesson-open {
  border: 0;
  background: transparent;
  color: var(--zbs-green);
  font-weight: 600;
  cursor: pointer;
  font-size: inherit;
}

.zbs-lesson-open:hover { text-decoration: underline; }

/* =========================================================
   7. ENTERTAINMENT ENGAGEMENT
   Likes · Dislikes · View stats · Comments
   ========================================================= */

/* ---------- 7a. Card-level engagement bar ---------- */
/* Works with .ent-card from entertainment-hub.css (any container). */
.ent-card {
  position: relative;
}

.ent-card-engage {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem .65rem;
  border-top: 1px solid var(--zbs-line);
  background: var(--zbs-surface-2);
  font-size: .75rem;
  color: var(--zbs-muted);
  flex-wrap: wrap;
  row-gap: .25rem;
}

.ent-card-engage .ent-card-engage-spacer {
  flex: 1;
}

.ent-card-engage-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .55rem;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--zbs-muted);
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, transform .12s;
  line-height: 1;
}

.ent-card-engage-btn:hover {
  background: rgba(31, 122, 61, .08);
  color: var(--zbs-green-dark);
}

.ent-card-engage-btn:active { transform: scale(.96); }

.ent-card-engage-btn i { font-size: .85rem; }
.ent-card-engage-btn b { font-weight: 700; }

.ent-card-engage-btn.is-active {
  color: var(--zbs-green-dark);
  background: rgba(31, 122, 61, .12);
}

.ent-card-engage-btn.like.is-active {
  color: var(--eng-like);
  background: rgba(31, 122, 61, .12);
}

.ent-card-engage-btn.dislike.is-active {
  color: var(--eng-dislike);
  background: rgba(198, 40, 40, .1);
}

.ent-card-engage-btn.views {
  cursor: default;
  pointer-events: none;
}

.ent-card-engage-btn.views:hover {
  background: transparent;
  color: var(--zbs-muted);
}

/* ---------- 7b. Post detail modal ---------- */
.ent-post-modal {
  position: fixed;
  inset: 0;
  z-index: 10200;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  transition: opacity .22s var(--ease-out);
  overflow-y: auto;
}

.ent-post-modal[hidden] { display: none; }
.ent-post-modal.show       { opacity: 1; }

.ent-post-container {
  width: min(880px, 100%);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--zbs-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  transform: translateY(18px) scale(.98);
  transition: transform .28s var(--ease-out);
}

.ent-post-modal.show .ent-post-container {
  transform: translateY(0) scale(1);
}

/* Header */
.ent-post-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  background: linear-gradient(135deg, var(--zbs-green-dark), var(--zbs-green));
  color: #fff;
  flex: 0 0 auto;
}

.ent-post-back {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  cursor: pointer;
  transition: background .15s;
  flex: 0 0 auto;
}

.ent-post-back:hover { background: rgba(255, 255, 255, .32); }

.ent-post-header-text {
  flex: 1;
  min-width: 0;
}

.ent-post-type {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .15rem .55rem;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .22);
  margin-bottom: .2rem;
}

.ent-post-header-text h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ent-post-header .window-close-btn {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .15s;
  display: grid;
  place-items: center;
}

.ent-post-header .window-close-btn:hover {
  background: rgba(255, 255, 255, .34);
}

/* Body */
.ent-post-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.1rem 1.25rem;
  -webkit-overflow-scrolling: touch;
}

/* Media area */
.ent-post-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0e0f11;
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: .9rem;
  display: grid;
  place-items: center;
}

.ent-post-media img,
.ent-post-media video,
.ent-post-media audio {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ent-post-media audio {
  height: auto;
  padding: 1rem;
  background: var(--zbs-surface-2);
}

.ent-post-media .ent-post-media-placeholder {
  display: grid;
  place-items: center;
  gap: .5rem;
  color: rgba(255, 255, 255, .55);
  font-size: 2rem;
  text-align: center;
  padding: 1rem;
}

.ent-post-media .ent-post-media-placeholder span {
  font-size: .8rem;
  color: rgba(255, 255, 255, .5);
  font-weight: 500;
}

/* Meta row (artist + view stats) */
.ent-post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .6rem;
}

.ent-post-meta-left {
  min-width: 0;
  flex: 1;
}

.ent-post-artist {
  font-size: .85rem;
  font-weight: 600;
  color: var(--zbs-green-dark);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.ent-post-artist:empty { display: none; }

.ent-post-meta-right {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}

.ent-post-stat {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .78rem;
  color: var(--zbs-muted);
  background: var(--zbs-surface-2);
  padding: .3rem .6rem;
  border-radius: var(--r-pill);
  font-weight: 500;
}

.ent-post-stat i { font-size: .8rem; color: var(--zbs-green-dark); }
.ent-post-stat b { font-weight: 700; color: var(--zbs-ink); }

/* Description */
.ent-post-desc {
  font-size: .9rem;
  line-height: 1.55;
  color: var(--zbs-ink);
  margin: 0 0 1rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.ent-post-desc:empty { display: none; }

/* ---------- 7c. Like / dislike / share bar ---------- */
.ent-engagement-bar {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  padding: .6rem;
  border-radius: var(--r-md);
  background: var(--zbs-surface-2);
  border: 1px solid var(--zbs-line);
  margin-bottom: 1.25rem;
}

.ent-engage-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .85rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--zbs-surface);
  color: var(--zbs-ink);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s var(--ease-out), background .15s, color .15s, border-color .15s, box-shadow .15s;
  line-height: 1;
  box-shadow: var(--sh-sm);
}

.ent-engage-btn i { font-size: .95rem; }

.ent-engage-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--sh-md);
}

.ent-engage-btn:active { transform: translateY(0) scale(.98); }

.ent-engage-btn b {
  font-weight: 700;
  font-size: .82rem;
  margin-left: .05rem;
}

.ent-engage-btn.like:hover { color: var(--eng-like); border-color: rgba(31, 122, 61, .35); }
.ent-engage-btn.dislike:hover { color: var(--eng-dislike); border-color: rgba(198, 40, 40, .35); }
.ent-engage-btn.comment:hover { color: var(--eng-share); border-color: rgba(21, 101, 192, .35); }
.ent-engage-btn.share:hover { color: var(--eng-share); border-color: rgba(21, 101, 192, .35); }

.ent-engage-btn.like.is-active {
  background: var(--eng-like);
  color: #fff;
  border-color: var(--eng-like);
}

.ent-engage-btn.dislike.is-active {
  background: var(--eng-dislike);
  color: #fff;
  border-color: var(--eng-dislike);
}

.ent-engage-btn.is-active i::before { font-weight: 900; }

.ent-engage-spacer { flex: 1; }

/* subtle pulse feedback when clicked */
@keyframes ent-engage-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(31, 122, 61, .45); }
  100% { box-shadow: 0 0 0 12px rgba(31, 122, 61, 0); }
}

.ent-engage-btn.like.just-pressed  { animation: ent-engage-pulse .5s ease-out; }
.ent-engage-btn.dislike.just-pressed {
  animation-name: ent-engage-pulse-dislike;
}

@keyframes ent-engage-pulse-dislike {
  0%   { box-shadow: 0 0 0 0 rgba(198, 40, 40, .45); }
  100% { box-shadow: 0 0 0 12px rgba(198, 40, 40, 0); }
}

/* ---------- 7d. Comment section ---------- */
.ent-comments-section {
  border-top: 1px solid var(--zbs-line);
  padding-top: 1rem;
}

.ent-comments-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .85rem;
  font-size: .95rem;
  font-weight: 700;
  color: var(--zbs-ink);
}

.ent-comments-title i { color: var(--zbs-green-dark); }

.ent-comments-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 .45rem;
  border-radius: var(--r-pill);
  background: rgba(31, 122, 61, .12);
  color: var(--zbs-green-dark);
  font-size: .72rem;
  font-weight: 700;
}

/* Form */
.ent-comment-form {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-bottom: 1rem;
}

.ent-comment-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--zbs-surface-2);
  color: var(--zbs-muted);
  font-size: 1.4rem;
}

.ent-comment-input-wrap {
  flex: 1;
  min-width: 0;
}

.ent-comment-input-wrap textarea {
  width: 100%;
  min-height: 46px;
  max-height: 180px;
  padding: .6rem .8rem;
  border: 1px solid var(--zbs-line);
  border-radius: var(--r-md);
  background: var(--zbs-surface);
  color: var(--zbs-ink);
  font-size: .88rem;
  font-family: inherit;
  line-height: 1.4;
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}

.ent-comment-input-wrap textarea:focus {
  outline: none;
  border-color: var(--zbs-green);
  box-shadow: 0 0 0 3px rgba(31, 122, 61, .12);
}

.ent-comment-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .4rem;
}

.ent-comment-charcount {
  font-size: .72rem;
  color: var(--zbs-muted);
  font-weight: 500;
}

.ent-comment-submit {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .95rem;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--zbs-green);
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--sh-sm);
  transition: background .15s, transform .12s;
}

.ent-comment-submit:hover { background: var(--zbs-green-dark); }
.ent-comment-submit:active { transform: scale(.97); }
.ent-comment-submit[disabled] {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Comment list */
.ent-comments-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.ent-comment-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .65rem .8rem;
  border-radius: var(--r-md);
  background: var(--zbs-surface-2);
  border: 1px solid transparent;
  transition: border-color .15s, background .15s;
}

.ent-comment-item:hover {
  border-color: var(--zbs-line);
  background: var(--zbs-surface);
}

.ent-comment-item-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--zbs-green), var(--zbs-green-light));
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ent-comment-item-body {
  flex: 1;
  min-width: 0;
}

.ent-comment-item-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .2rem;
}

.ent-comment-item-name {
  font-size: .82rem;
  font-weight: 700;
  color: var(--zbs-ink);
}

.ent-comment-item-time {
  font-size: .72rem;
  color: var(--zbs-muted);
}

.ent-comment-item-text {
  font-size: .86rem;
  line-height: 1.5;
  color: var(--zbs-ink);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.ent-comment-item-delete {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--zbs-muted);
  font-size: .78rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.ent-comment-item-delete:hover {
  background: rgba(198, 40, 40, .1);
  color: var(--eng-dislike);
}

/* Empty state */
.ent-comments-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--zbs-muted);
}

.ent-comments-empty i {
  font-size: 1.8rem;
  opacity: .5;
}

.ent-comments-empty p {
  margin: 0;
  font-size: .85rem;
}

.ent-comments-empty[hidden] { display: none; }

/* =========================================================
   8. RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .zbs-social-bar { bottom: 92px; right: .75rem; }
}

@media (max-width: 720px) {
  .ent-post-container {
    max-height: 94vh;
    border-radius: var(--r-md);
  }

  .ent-post-header-text h2 { font-size: .95rem; }

  .ent-post-body { padding: .85rem .9rem 1.1rem; }

  .ent-engagement-bar {
    gap: .3rem;
    padding: .5rem;
  }

  .ent-engage-btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: .5rem .6rem;
    font-size: .78rem;
  }

  .ent-engage-btn .ent-engage-label {
    display: none;
  }

  .ent-engage-btn.share .ent-engage-label { display: inline; }

  .ent-engage-spacer { display: none; }
}

@media (max-width: 640px) {
  :root { --advert-h: 46px; }

  .advert-item { padding: 0 .9rem; gap: .45rem; }
  .advert-img,
  .advert-emoji { width: 22px; height: 22px; }
  .advert-emoji { font-size: .95rem; }
  .advert-text  { font-size: .8rem; }
  .advert-tag   { font-size: .6rem; padding: .1rem .4rem; }

  .zbs-social-bar {
    right: .5rem;
    bottom: 88px;
    gap: .3rem;
    padding: .4rem;
  }
  .zbs-social-btn { width: 30px; height: 30px; font-size: .8rem; }

  .zbs-receipt { border-radius: var(--r-md); }
  .zbs-receipt-head { padding: .85rem 1rem; }
  .zbs-receipt-body { padding: .85rem 1rem; }
  .zbs-receipt-footer { padding: .65rem 1rem 1rem; }

  .toast { bottom: 88px; font-size: .85rem; }

  .ent-post-modal { padding: 0; }

  .ent-post-container {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .ent-post-media { aspect-ratio: 4 / 3; }

  .ent-comment-avatar { width: 34px; height: 34px; font-size: 1.2rem; }
  .ent-comment-item-avatar { width: 30px; height: 30px; font-size: .72rem; }
}

@media (max-width: 400px) {
  .advert-item { padding: 0 .7rem; }
  .advert-text { max-width: 60vw; overflow: hidden; text-overflow: ellipsis; }

  .ent-post-meta { gap: .5rem; }
  .ent-post-stat { font-size: .72rem; padding: .25rem .5rem; }

  .ent-engage-btn { font-size: .74rem; padding: .45rem .5rem; }
  .ent-engage-btn i { font-size: .88rem; }
}

/* =========================================================
   9. MOTION PREFERENCES
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .adverts-track,
  .toast,
  .zbs-receipt,
  .zbs-receipt-overlay,
  .zbs-social-bar,
  .zbs-social-btn,
  .zbs-lesson-card,
  .zbs-deposit-btn,
  .ent-post-modal,
  .ent-post-container,
  .ent-engage-btn,
  .ent-card-engage-btn,
  .ent-comment-submit {
    transition: none !important;
    animation: none !important;
  }

  .adverts-track {
    /* still show ads — just don't scroll */
    transform: translateX(0) !important;
  }

  /* engagement pulse is disabled, but active states still render */
  .ent-engage-btn.like.just-pressed,
  .ent-engage-btn.dislike.just-pressed {
    animation: none !important;
  }
}

/* =========================================================
   10. PRINT
   ========================================================= */
@media print {
  .adverts-banner,
  .zbs-social-bar,
  .toast,
  .ent-engage-spacer,
  .ent-card-engage,
  .ent-engagement-bar,
  .ent-comment-form {
    display: none !important;
  }

  .zbs-receipt-overlay {
    position: static;
    background: none;
    padding: 0;
  }

  .zbs-receipt {
    box-shadow: none;
    max-height: none;
    transform: none;
  }

  .zbs-receipt-footer { display: none; }

  .ent-post-modal {
    position: static;
    background: none;
    padding: 0;
    opacity: 1;
  }

  .ent-post-container {
    box-shadow: none;
    max-height: none;
    transform: none;
    width: 100%;
  }

  .ent-post-media,
  .ent-post-header .window-close-btn,
  .ent-post-back { display: none !important; }

  .ent-comments-list { break-inside: avoid; }
  .ent-comment-item { break-inside: avoid; }
}
/* =========================================================
   enhancements.css
   Zeroth Business Solutions — augmentation layer
   Loaded last. Wins over style.css and *-hub.css where intended.
   Sections:
     0. Tokens
     1. Advert banner (marquee, real images)
     2. Toast notifications
     3. Deposit buttons
     4. Receipt modal
     5. Social share bar
     6. Lesson plan cards
     7. Entertainment engagement
       7a. Card-level engagement bar   ← COMPACTED (single row)
       7b. Post detail modal
       7c. Like / dislike / view / share bar
       7d. Comment section
     8. Responsive
     9. Motion / a11y
    10. Print
   ========================================================= */

/* =========================================================
   0. TOKENS
   ========================================================= */
:root {
  --zbs-green:        #1f7a3d;
  --zbs-green-light:  #2a9d52;
  --zbs-green-dark:   #145a2b;
  --zbs-red:          #c62828;
  --zbs-blue:         #1565c0;
  --zbs-amber:        #f9a825;
  --zbs-purple:       #6a1b9a;

  --zbs-ink:          #1a1d21;
  --zbs-muted:        #6b7280;
  --zbs-line:         #e5e7eb;
  --zbs-surface:      #ffffff;
  --zbs-surface-2:    #f6f7f9;

  /* overwritten at runtime by enhancements.js */
  --header-h:   70px;
  --advert-h:   52px;
  --advert-duration: 60s;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 999px;

  --sh-sm: 0 1px 3px rgba(0, 0, 0, .12);
  --sh-md: 0 4px 12px rgba(0, 0, 0, .14);
  --sh-lg: 0 14px 38px rgba(0, 0, 0, .18);

  --ease-out:   cubic-bezier(.16, 1, .3, 1);
  --ease-slide: cubic-bezier(.65, .05, .36, 1);

  /* entertainment engagement */
  --eng-like:    #1f7a3d;
  --eng-dislike: #c62828;
  --eng-share:   #1565c0;
  --eng-view:    #6b7280;
}

/* =========================================================
   1. ADVERT BANNER — continuous marquee with images
   ========================================================= */
.adverts-banner {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  height: var(--advert-h);
  z-index: 940;
  overflow: hidden;
  display: block !important;
  color: #fff;
  background: linear-gradient(
    90deg,
    var(--zbs-green-dark) 0%,
    var(--zbs-green) 50%,
    var(--zbs-green-dark) 100%
  );
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);

  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 40px,
    #000 calc(100% - 40px),
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 40px,
    #000 calc(100% - 40px),
    transparent 100%
  );
}

.adverts-track {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  will-change: transform;
  animation: adverts-scroll var(--advert-duration, 60s) linear infinite;
}

.adverts-banner:hover .adverts-track,
.adverts-banner:focus-within .adverts-track {
  animation-play-state: paused;
}

@keyframes adverts-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.advert-item {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  height: 100%;
  padding: 0 1.4rem;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: background .18s;
}

.advert-item:hover,
.advert-item:focus-visible {
  background: rgba(255, 255, 255, .08);
  outline: none;
}

.advert-img {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, .12);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.advert-emoji {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  line-height: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}

.advert-text {
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .01em;
}

.advert-tag {
  flex: 0 0 auto;
  padding: .12rem .5rem;
  border-radius: var(--r-pill);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.advert-tag.tag-hot  { background: #e53935;              color: #fff; }
.advert-tag.tag-new  { background: var(--zbs-green-light); color: #fff; }
.advert-tag.tag-sale { background: var(--zbs-amber);     color: #2b2100; }
.advert-tag.tag-best { background: #ffd54f;              color: #3a2c00; }
.advert-tag.tag-fire { background: #ff6f00;              color: #fff; }
.advert-tag.tag-cool { background: var(--zbs-blue);      color: #fff; }
.advert-tag.tag-star { background: var(--zbs-purple);    color: #fff; }
.advert-tag.tag-plain{ background: rgba(255, 255, 255, .18); color: #fff; }

/* =========================================================
   2. TOAST
   ========================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 24px);
  min-width: 240px;
  max-width: 92vw;
  padding: .75rem 1rem;
  border-radius: var(--r-md);
  background: var(--zbs-ink);
  color: #fff;
  font-size: .9rem;
  line-height: 1.35;
  text-align: center;
  box-shadow: var(--sh-lg);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease-out);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.toast.success { background: var(--zbs-green); }
.toast.error   { background: var(--zbs-red);   }
.toast.warn    { background: var(--zbs-amber); color: #2b2100; }
.toast.info    { background: var(--zbs-blue);  }

/* =========================================================
   3. DEPOSIT BUTTONS
   ========================================================= */
.zbs-deposit-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.1rem;
  border: 0;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--zbs-green), var(--zbs-green-light));
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  box-shadow: var(--sh-sm);
  transition: transform .15s var(--ease-out), box-shadow .15s;
}

.zbs-deposit-btn:hover  { transform: translateY(-1px); box-shadow: var(--sh-md); }
.zbs-deposit-btn:active { transform: translateY(0); }
.zbs-deposit-btn[disabled] { opacity: .55; pointer-events: none; }

.zbs-deposit-btn.is-loading {
  pointer-events: none;
  opacity: .85;
}

.zbs-deposit-btn.is-loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: zbs-spin .7s linear infinite;
}

@keyframes zbs-spin { to { transform: rotate(360deg); } }

/* =========================================================
   4. RECEIPT MODAL
   ========================================================= */
.zbs-receipt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 10100;
  opacity: 0;
  transition: opacity .2s;
}

.zbs-receipt-overlay.show { opacity: 1; }

.zbs-receipt {
  width: min(420px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--zbs-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  transform: translateY(16px);
  transition: transform .3s var(--ease-out);
}

.zbs-receipt-overlay.show .zbs-receipt { transform: translateY(0); }

.zbs-receipt-head {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--zbs-green), var(--zbs-green-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.zbs-receipt-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.zbs-receipt-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.zbs-receipt-close:hover { background: rgba(255, 255, 255, .35); }

.zbs-receipt-body { padding: 1rem 1.25rem; }

.zbs-receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .45rem 0;
  font-size: .9rem;
  border-bottom: 1px dashed var(--zbs-line);
}

.zbs-receipt-row:last-child { border-bottom: 0; }
.zbs-receipt-row .label { color: var(--zbs-muted); }
.zbs-receipt-row .value {
  font-weight: 500;
  text-align: right;
  word-break: break-word;
}

.zbs-receipt-row.total {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--zbs-green-dark);
  padding-top: .75rem;
  margin-top: .5rem;
  border-top: 2px solid var(--zbs-line);
  border-bottom: 0;
}

.zbs-receipt-footer {
  padding: .75rem 1.25rem 1.25rem;
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
}

.zbs-receipt-btn {
  padding: .5rem 1rem;
  border: 0;
  border-radius: var(--r-md);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}

.zbs-receipt-btn.primary {
  background: var(--zbs-green);
  color: #fff;
}

.zbs-receipt-btn.primary:hover { background: var(--zbs-green-dark); }

.zbs-receipt-btn.ghost {
  background: transparent;
  color: var(--zbs-muted);
  border: 1px solid var(--zbs-line);
}

.zbs-receipt-btn.ghost:hover {
  background: var(--zbs-surface-2);
  color: var(--zbs-ink);
}

/* =========================================================
   5. SOCIAL SHARE BAR
   ========================================================= */
.zbs-social-bar {
  position: fixed;
  right: 1rem;
  bottom: 96px;
  z-index: 9400;
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem;
  border-radius: var(--r-pill);
  background: var(--zbs-surface);
  box-shadow: var(--sh-md);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease-out);
}

.zbs-social-bar.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.zbs-social-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--zbs-surface-2);
  color: var(--zbs-ink);
  font-size: .9rem;
  cursor: pointer;
  transition: transform .15s, background .15s;
}

.zbs-social-btn:hover { transform: scale(1.08); }

.zbs-social-btn.wa { background: #25d366; color: #fff; }
.zbs-social-btn.fb { background: #1877f2; color: #fff; }
.zbs-social-btn.tw { background: #000;    color: #fff; }
.zbs-social-btn.li { background: #0a66c2; color: #fff; }
.zbs-social-btn.cp { background: var(--zbs-green); color: #fff; }

/* =========================================================
   6. LESSON PLAN CARDS
   ========================================================= */
.zbs-lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.zbs-lesson-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--zbs-surface);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  transition: transform .18s var(--ease-out), box-shadow .18s;
}

.zbs-lesson-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
}

.zbs-lesson-head {
  padding: .75rem 1rem;
  background: linear-gradient(135deg, var(--zbs-green), var(--zbs-green-light));
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}

.zbs-lesson-head .subject {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .85;
}

.zbs-lesson-head .title {
  font-size: .95rem;
  font-weight: 600;
}

.zbs-lesson-body {
  padding: .85rem 1rem;
  flex: 1;
}

.zbs-lesson-meta {
  display: flex;
  gap: 1rem;
  font-size: .75rem;
  color: var(--zbs-muted);
  margin-bottom: .5rem;
}

.zbs-lesson-meta i { margin-right: .25rem; }

.zbs-lesson-summary {
  font-size: .85rem;
  line-height: 1.45;
  color: var(--zbs-ink);
  margin: 0;
}

.zbs-lesson-foot {
  padding: .65rem 1rem;
  border-top: 1px solid var(--zbs-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
}

.zbs-lesson-tag {
  padding: .15rem .55rem;
  border-radius: var(--r-pill);
  background: rgba(31, 122, 61, .12);
  color: var(--zbs-green-dark);
  font-weight: 600;
}

.zbs-lesson-open {
  border: 0;
  background: transparent;
  color: var(--zbs-green);
  font-weight: 600;
  cursor: pointer;
  font-size: inherit;
}

.zbs-lesson-open:hover { text-decoration: underline; }

/* =========================================================
   7. ENTERTAINMENT ENGAGEMENT
   Likes · Dislikes · View stats · Comments
   ========================================================= */

/* ---------- 7a. Card-level engagement bar (COMPACT · ONE ROW) ---------- */
.ent-card {
  position: relative;
}

.ent-card-engage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .1rem;
  padding: .28rem .35rem;
  border-top: 1px solid var(--zbs-line);
  background: var(--zbs-surface-2);
  color: var(--zbs-muted);
  flex-wrap: nowrap;           /* keep everything on a single row */
  overflow: hidden;            /* clip anything that would overflow */
  font-size: .62rem;
  line-height: 1;
}

.ent-card-engage .ent-card-engage-spacer {
  flex: 1 1 auto;
  min-width: 0;
}

.ent-card-engage-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .18rem;
  padding: .22rem .3rem;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--zbs-muted);
  font-size: .62rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s, transform .12s;
  line-height: 1;
  white-space: nowrap;
  flex: 0 0 auto;              /* never let buttons shrink */
  min-width: 0;
}

.ent-card-engage-btn:hover {
  background: rgba(31, 122, 61, .08);
  color: var(--zbs-green-dark);
}

.ent-card-engage-btn:active { transform: scale(.94); }

.ent-card-engage-btn i {
  font-size: .68rem;
  line-height: 1;
}

.ent-card-engage-btn b {
  font-weight: 700;
  font-size: .62rem;
  line-height: 1;
}

.ent-card-engage-btn.is-active {
  color: var(--zbs-green-dark);
  background: rgba(31, 122, 61, .12);
}

.ent-card-engage-btn.like.is-active {
  color: var(--eng-like);
  background: rgba(31, 122, 61, .12);
}

.ent-card-engage-btn.dislike.is-active {
  color: var(--eng-dislike);
  background: rgba(198, 40, 40, .1);
}

.ent-card-engage-btn.views {
  cursor: default;
  pointer-events: none;
  color: var(--eng-view);
  background: transparent;
}

.ent-card-engage-btn.views:hover {
  background: transparent;
  color: var(--eng-view);
}

/* ---------- 7b. Post detail modal ---------- */
.ent-post-modal {
  position: fixed;
  inset: 0;
  z-index: 10200;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  transition: opacity .22s var(--ease-out);
  overflow-y: auto;
}

.ent-post-modal[hidden] { display: none; }
.ent-post-modal.show       { opacity: 1; }

.ent-post-container {
  width: min(880px, 100%);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--zbs-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  transform: translateY(18px) scale(.98);
  transition: transform .28s var(--ease-out);
}

.ent-post-modal.show .ent-post-container {
  transform: translateY(0) scale(1);
}

/* Header */
.ent-post-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  background: linear-gradient(135deg, var(--zbs-green-dark), var(--zbs-green));
  color: #fff;
  flex: 0 0 auto;
}

.ent-post-back {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  cursor: pointer;
  transition: background .15s;
  flex: 0 0 auto;
}

.ent-post-back:hover { background: rgba(255, 255, 255, .32); }

.ent-post-header-text {
  flex: 1;
  min-width: 0;
}

.ent-post-type {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .15rem .55rem;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .22);
  margin-bottom: .2rem;
}

.ent-post-header-text h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ent-post-header .window-close-btn {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .15s;
  display: grid;
  place-items: center;
}

.ent-post-header .window-close-btn:hover {
  background: rgba(255, 255, 255, .34);
}

/* Body */
.ent-post-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.1rem 1.25rem;
  -webkit-overflow-scrolling: touch;
}

/* Media area */
.ent-post-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0e0f11;
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: .9rem;
  display: grid;
  place-items: center;
}

.ent-post-media img,
.ent-post-media video,
.ent-post-media audio {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ent-post-media audio {
  height: auto;
  padding: 1rem;
  background: var(--zbs-surface-2);
}

.ent-post-media .ent-post-media-placeholder {
  display: grid;
  place-items: center;
  gap: .5rem;
  color: rgba(255, 255, 255, .55);
  font-size: 2rem;
  text-align: center;
  padding: 1rem;
}

.ent-post-media .ent-post-media-placeholder span {
  font-size: .8rem;
  color: rgba(255, 255, 255, .5);
  font-weight: 500;
}

/* Meta row (artist + view stats) */
.ent-post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .6rem;
}

.ent-post-meta-left {
  min-width: 0;
  flex: 1;
}

.ent-post-artist {
  font-size: .85rem;
  font-weight: 600;
  color: var(--zbs-green-dark);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.ent-post-artist:empty { display: none; }

.ent-post-meta-right {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}

.ent-post-stat {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  font-size: .76rem;
  color: var(--zbs-muted);
  background: var(--zbs-surface-2);
  padding: .28rem .55rem;
  border-radius: var(--r-pill);
  font-weight: 500;
}

.ent-post-stat i { font-size: .78rem; color: var(--zbs-green-dark); }
.ent-post-stat b { font-weight: 700; color: var(--zbs-ink); }

/* Description */
.ent-post-desc {
  font-size: .9rem;
  line-height: 1.55;
  color: var(--zbs-ink);
  margin: 0 0 1rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.ent-post-desc:empty { display: none; }

/* ---------- 7c. Like / dislike / share bar (modal) ---------- */
.ent-engagement-bar {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  padding: .6rem;
  border-radius: var(--r-md);
  background: var(--zbs-surface-2);
  border: 1px solid var(--zbs-line);
  margin-bottom: 1.25rem;
}

.ent-engage-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .85rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--zbs-surface);
  color: var(--zbs-ink);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s var(--ease-out), background .15s, color .15s, border-color .15s, box-shadow .15s;
  line-height: 1;
  box-shadow: var(--sh-sm);
}

.ent-engage-btn i { font-size: .95rem; }

.ent-engage-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--sh-md);
}

.ent-engage-btn:active { transform: translateY(0) scale(.98); }

.ent-engage-btn b {
  font-weight: 700;
  font-size: .82rem;
  margin-left: .05rem;
}

.ent-engage-btn.like:hover { color: var(--eng-like); border-color: rgba(31, 122, 61, .35); }
.ent-engage-btn.dislike:hover { color: var(--eng-dislike); border-color: rgba(198, 40, 40, .35); }
.ent-engage-btn.comment:hover { color: var(--eng-share); border-color: rgba(21, 101, 192, .35); }
.ent-engage-btn.share:hover { color: var(--eng-share); border-color: rgba(21, 101, 192, .35); }

.ent-engage-btn.like.is-active {
  background: var(--eng-like);
  color: #fff;
  border-color: var(--eng-like);
}

.ent-engage-btn.dislike.is-active {
  background: var(--eng-dislike);
  color: #fff;
  border-color: var(--eng-dislike);
}

.ent-engage-btn.is-active i::before { font-weight: 900; }

.ent-engage-spacer { flex: 1; }

/* subtle pulse feedback when clicked */
@keyframes ent-engage-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(31, 122, 61, .45); }
  100% { box-shadow: 0 0 0 12px rgba(31, 122, 61, 0); }
}

.ent-engage-btn.like.just-pressed  { animation: ent-engage-pulse .5s ease-out; }
.ent-engage-btn.dislike.just-pressed {
  animation-name: ent-engage-pulse-dislike;
}

@keyframes ent-engage-pulse-dislike {
  0%   { box-shadow: 0 0 0 0 rgba(198, 40, 40, .45); }
  100% { box-shadow: 0 0 0 12px rgba(198, 40, 40, 0); }
}

/* ---------- 7d. Comment section ---------- */
.ent-comments-section {
  border-top: 1px solid var(--zbs-line);
  padding-top: 1rem;
}

.ent-comments-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .85rem;
  font-size: .95rem;
  font-weight: 700;
  color: var(--zbs-ink);
}

.ent-comments-title i { color: var(--zbs-green-dark); }

.ent-comments-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 .45rem;
  border-radius: var(--r-pill);
  background: rgba(31, 122, 61, .12);
  color: var(--zbs-green-dark);
  font-size: .72rem;
  font-weight: 700;
}

/* Form */
.ent-comment-form {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-bottom: 1rem;
}

.ent-comment-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--zbs-surface-2);
  color: var(--zbs-muted);
  font-size: 1.4rem;
}

.ent-comment-input-wrap {
  flex: 1;
  min-width: 0;
}

.ent-comment-input-wrap textarea {
  width: 100%;
  min-height: 46px;
  max-height: 180px;
  padding: .6rem .8rem;
  border: 1px solid var(--zbs-line);
  border-radius: var(--r-md);
  background: var(--zbs-surface);
  color: var(--zbs-ink);
  font-size: .88rem;
  font-family: inherit;
  line-height: 1.4;
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}

.ent-comment-input-wrap textarea:focus {
  outline: none;
  border-color: var(--zbs-green);
  box-shadow: 0 0 0 3px rgba(31, 122, 61, .12);
}

.ent-comment-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .4rem;
}

.ent-comment-charcount {
  font-size: .72rem;
  color: var(--zbs-muted);
  font-weight: 500;
}

.ent-comment-submit {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .95rem;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--zbs-green);
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--sh-sm);
  transition: background .15s, transform .12s;
}

.ent-comment-submit:hover { background: var(--zbs-green-dark); }
.ent-comment-submit:active { transform: scale(.97); }
.ent-comment-submit[disabled] {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Comment list */
.ent-comments-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.ent-comment-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .65rem .8rem;
  border-radius: var(--r-md);
  background: var(--zbs-surface-2);
  border: 1px solid transparent;
  transition: border-color .15s, background .15s;
}

.ent-comment-item:hover {
  border-color: var(--zbs-line);
  background: var(--zbs-surface);
}

.ent-comment-item-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--zbs-green), var(--zbs-green-light));
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ent-comment-item-body {
  flex: 1;
  min-width: 0;
}

.ent-comment-item-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .2rem;
}

.ent-comment-item-name {
  font-size: .82rem;
  font-weight: 700;
  color: var(--zbs-ink);
}

.ent-comment-item-time {
  font-size: .72rem;
  color: var(--zbs-muted);
}

.ent-comment-item-text {
  font-size: .86rem;
  line-height: 1.5;
  color: var(--zbs-ink);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.ent-comment-item-delete {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--zbs-muted);
  font-size: .78rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.ent-comment-item-delete:hover {
  background: rgba(198, 40, 40, .1);
  color: var(--eng-dislike);
}

/* Empty state */
.ent-comments-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--zbs-muted);
}

.ent-comments-empty i {
  font-size: 1.8rem;
  opacity: .5;
}

.ent-comments-empty p {
  margin: 0;
  font-size: .85rem;
}

.ent-comments-empty[hidden] { display: none; }

/* =========================================================
   8. RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .zbs-social-bar { bottom: 92px; right: .75rem; }
}

/* Tighten the card-level bar even further on small screens */
@media (max-width: 520px) {
  .ent-card-engage {
    padding: .25rem .3rem;
    gap: .05rem;
  }
  .ent-card-engage-btn {
    padding: .2rem .25rem;
    gap: .15rem;
  }
  .ent-card-engage-btn i { font-size: .64rem; }
  .ent-card-engage-btn b { font-size: .58rem; }
}

/* Modal responsiveness */
@media (max-width: 720px) {
  .ent-post-container {
    max-height: 94vh;
    border-radius: var(--r-md);
  }

  .ent-post-header-text h2 { font-size: .95rem; }

  .ent-post-body { padding: .85rem .9rem 1.1rem; }

  .ent-engagement-bar {
    gap: .3rem;
    padding: .5rem;
  }

  .ent-engage-btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: .5rem .6rem;
    font-size: .78rem;
  }

  .ent-engage-btn .ent-engage-label {
    display: none;
  }

  .ent-engage-btn.share .ent-engage-label { display: inline; }

  .ent-engage-spacer { display: none; }
}

@media (max-width: 640px) {
  :root { --advert-h: 46px; }

  .advert-item { padding: 0 .9rem; gap: .45rem; }
  .advert-img,
  .advert-emoji { width: 22px; height: 22px; }
  .advert-emoji { font-size: .95rem; }
  .advert-text  { font-size: .8rem; }
  .advert-tag   { font-size: .6rem; padding: .1rem .4rem; }

  .zbs-social-bar {
    right: .5rem;
    bottom: 88px;
    gap: .3rem;
    padding: .4rem;
  }
  .zbs-social-btn { width: 30px; height: 30px; font-size: .8rem; }

  .zbs-receipt { border-radius: var(--r-md); }
  .zbs-receipt-head { padding: .85rem 1rem; }
  .zbs-receipt-body { padding: .85rem 1rem; }
  .zbs-receipt-footer { padding: .65rem 1rem 1rem; }

  .toast { bottom: 88px; font-size: .85rem; }

  .ent-post-modal { padding: 0; }

  .ent-post-container {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .ent-post-media { aspect-ratio: 4 / 3; }

  .ent-comment-avatar { width: 34px; height: 34px; font-size: 1.2rem; }
  .ent-comment-item-avatar { width: 30px; height: 30px; font-size: .72rem; }
}

@media (max-width: 400px) {
  .advert-item { padding: 0 .7rem; }
  .advert-text { max-width: 60vw; overflow: hidden; text-overflow: ellipsis; }

  .ent-post-meta { gap: .5rem; }
  .ent-post-stat { font-size: .72rem; padding: .25rem .5rem; }

  .ent-engage-btn { font-size: .74rem; padding: .45rem .5rem; }
  .ent-engage-btn i { font-size: .88rem; }

  /* Even tighter card bar on very narrow phones */
  .ent-card-engage { padding: .2rem .25rem; }
  .ent-card-engage-btn { padding: .18rem .22rem; gap: .12rem; }
  .ent-card-engage-btn i { font-size: .6rem; }
  .ent-card-engage-btn b { font-size: .55rem; }
}

/* =========================================================
   9. MOTION PREFERENCES
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .adverts-track,
  .toast,
  .zbs-receipt,
  .zbs-receipt-overlay,
  .zbs-social-bar,
  .zbs-social-btn,
  .zbs-lesson-card,
  .zbs-deposit-btn,
  .ent-post-modal,
  .ent-post-container,
  .ent-engage-btn,
  .ent-card-engage-btn,
  .ent-comment-submit {
    transition: none !important;
    animation: none !important;
  }

  .adverts-track {
    /* still show ads — just don't scroll */
    transform: translateX(0) !important;
  }

  /* engagement pulse is disabled, but active states still render */
  .ent-engage-btn.like.just-pressed,
  .ent-engage-btn.dislike.just-pressed {
    animation: none !important;
  }
}

/* =========================================================
   10. PRINT
   ========================================================= */
@media print {
  .adverts-banner,
  .zbs-social-bar,
  .toast,
  .ent-engage-spacer,
  .ent-card-engage,
  .ent-engagement-bar,
  .ent-comment-form {
    display: none !important;
  }

  .zbs-receipt-overlay {
    position: static;
    background: none;
    padding: 0;
  }

  .zbs-receipt {
    box-shadow: none;
    max-height: none;
    transform: none;
  }

  .zbs-receipt-footer { display: none; }

  .ent-post-modal {
    position: static;
    background: none;
    padding: 0;
    opacity: 1;
  }

  .ent-post-container {
    box-shadow: none;
    max-height: none;
    transform: none;
    width: 100%;
  }

  .ent-post-media,
  .ent-post-header .window-close-btn,
  .ent-post-back { display: none !important; }

  .ent-comments-list { break-inside: avoid; }
  .ent-comment-item { break-inside: avoid; }
}
/* ---------------------------------------------------------
   Entertainment upload — drop-zone, preview, progress
   --------------------------------------------------------- */

.file-drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: 1.25rem 1rem;
  text-align: center;
  border: 2px dashed var(--zbs-line);
  border-radius: var(--r-md);
  background: var(--zbs-surface-2);
  color: var(--zbs-muted);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}

.file-drop-zone:hover,
.file-drop-zone:focus-visible,
.file-drop-zone.is-dragover {
  border-color: var(--zbs-green);
  background: rgba(31, 122, 61, .06);
  color: var(--zbs-green-dark);
  outline: none;
}

.file-drop-zone > i {
  font-size: 1.6rem;
  color: var(--zbs-green);
}

.file-drop-zone p {
  margin: 0;
  font-size: .85rem;
}

.file-drop-zone small {
  font-size: .72rem;
  color: var(--zbs-muted);
}

.file-drop-zone .browse-link {
  color: var(--zbs-green);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.file-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .55rem .7rem;
  margin-top: .5rem;
  border-radius: var(--r-md);
  background: var(--zbs-surface);
  border: 1px solid var(--zbs-line);
}

.file-preview-info {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
}

.file-preview-info > i {
  color: var(--zbs-green);
  font-size: 1.1rem;
}

.file-preview-name {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--zbs-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60vw;
}

.file-preview-size {
  display: block;
  font-size: .72rem;
  color: var(--zbs-muted);
}

.file-remove-btn {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--zbs-surface-2);
  color: var(--zbs-muted);
  font-size: 1.05rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.file-remove-btn:hover {
  background: rgba(198, 40, 40, .1);
  color: var(--zbs-red);
}

.upload-progress {
  position: relative;
  height: 22px;
  margin: .6rem 0 .2rem;
  border-radius: var(--r-pill);
  background: var(--zbs-surface-2);
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--zbs-green), var(--zbs-green-light));
  transition: width .18s linear;
}

.upload-progress-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: .7rem;
  font-weight: 700;
  color: var(--zbs-ink);
}

.upload-status {
  margin-top: .6rem;
  padding: .5rem .7rem;
  border-radius: var(--r-md);
  font-size: .82rem;
  font-weight: 600;
  text-align: center;
  background: var(--zbs-surface-2);
  color: var(--zbs-ink);
}

.upload-status.error   { background: rgba(198, 40, 40, .1);  color: var(--zbs-red); }
.upload-status.success { background: rgba(31, 122, 61, .12); color: var(--zbs-green-dark); }

/* Card audio + placeholder (for uploaded audio/unknown content) */
.ent-card-audio-wrap {
  display: grid;
  place-items: center;
  gap: .5rem;
  width: 100%;
  height: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--zbs-green-dark), var(--zbs-green));
  color: #fff;
}

.ent-card-audio-wrap > i { font-size: 1.8rem; opacity: .85; }
.ent-card-audio-wrap audio { width: 90%; }

.ent-card-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: var(--zbs-surface-2);
  color: var(--zbs-muted);
  font-size: 2rem;
}
/* =========================================================
   11. FOOTER SEARCH BUTTON — compact icon group
   Keeps the search / mic / camera icons on one line inside
   .footer-search-btn and prevents overflow on small screens.
   ========================================================= */

.footer-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .35rem .6rem;
  min-width: 0;
  max-width: 100%;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}

.footer-search-btn .search-icon-group {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  flex: 0 1 auto;
  min-width: 0;
}

.footer-search-btn .search-icon-group > i {
  font-size: .7rem;              /* was ~1rem — enough to fit all three */
  width: 1.1em;
  height: 1.1em;
  display: inline-grid;
  place-items: center;
  line-height: 1;
  opacity: .9;
}

.footer-search-btn .search-icon-group > i + i {
  margin-left: -.05em;           /* slight overlap so they read as a set */
}

.footer-search-btn .footer-search-badge {
  font-size: .58rem;
  padding: .1rem .35rem;
  line-height: 1;
  flex: 0 0 auto;
}

/* Tighter still on small screens */
@media (max-width: 640px) {
  .footer-search-btn {
    gap: .25rem;
    padding: .3rem .5rem;
  }
  .footer-search-btn .search-icon-group { gap: .1rem; }
  .footer-search-btn .search-icon-group > i { font-size: .62rem; }
  .footer-search-btn .footer-search-badge { font-size: .52rem; padding: .08rem .28rem; }
}

@media (max-width: 400px) {
  .footer-search-btn .search-icon-group > i { font-size: .58rem; }
  .footer-search-btn .footer-search-badge { font-size: .48rem; }
}

@media (prefers-reduced-motion: reduce) {
  .footer-search-btn,
  .footer-search-btn .search-icon-group > i {
    transition: none !important;
    animation: none !important;
  }
}
/* =========================================================
   12. FOOTER NAV LINKS
   Compact pill-style navigation with icons.
   ========================================================= */

.footer-nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .35rem .15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav-links li {
  display: inline-flex;
  align-items: center;
  position: relative;
}

/* subtle divider between items (except the first) */
.footer-nav-links li + li::before {
  content: '';
  display: inline-block;
  width: 1px;
  height: 12px;
  margin: 0 .55rem;
  background: var(--zbs-line);
  opacity: .7;
}

.footer-nav-links a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem .1rem;
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--zbs-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s var(--ease-out);
  position: relative;
}

/* icon */
.footer-nav-links a > i {
  font-size: .85em;
  width: 1.05em;
  height: 1.05em;
  display: inline-grid;
  place-items: center;
  line-height: 1;
  color: var(--zbs-green);
  transition: transform .2s var(--ease-out), color .15s;
  flex: 0 0 auto;
}

.footer-nav-links a:hover > i,
.footer-nav-links a:focus-visible > i {
  color: var(--zbs-green-dark);
  transform: translateY(-1px) scale(1.08);
}

.footer-nav-links a:hover,
.footer-nav-links a:focus-visible {
  color: var(--zbs-green-dark);
  outline: none;
}

/* underline accent on hover / focus */
.footer-nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--zbs-green);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .22s var(--ease-out);
}

.footer-nav-links a:hover::after,
.footer-nav-links a:focus-visible::after {
  transform: scaleX(1);
}

/* active / current page state */
.footer-nav-links a.is-active,
.footer-nav-links a[aria-current="page"] {
  color: var(--zbs-green-dark);
  font-weight: 600;
}

.footer-nav-links a.is-active > i,
.footer-nav-links a[aria-current="page"] > i {
  color: var(--zbs-green-dark);
}

.footer-nav-links a.is-active::after,
.footer-nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-nav-links {
    justify-content: center;
    gap: .25rem .1rem;
  }
  .footer-nav-links li + li::before {
    margin: 0 .4rem;
    height: 10px;
  }
  .footer-nav-links a {
    font-size: .75rem;
    gap: .3rem;
  }
}

@media (max-width: 640px) {
  .footer-nav-links {
    gap: .25rem;
  }
  .footer-nav-links li + li::before {
    display: none;
  }
  .footer-nav-links a {
    font-size: .72rem;
    padding: .35rem .6rem;
    border-radius: var(--r-pill);
    background: var(--zbs-surface-2);
    gap: .35rem;
  }
  .footer-nav-links a:hover,
  .footer-nav-links a:focus-visible {
    background: rgba(31, 122, 61, .1);
  }
  .footer-nav-links a::after { display: none; }
}

/* Very narrow — icon-only pills, labels hidden */
@media (max-width: 400px) {
  .footer-nav-links a {
    padding: .35rem .55rem;
    gap: 0;
  }
  .footer-nav-links a > span {
    display: none;
  }
  .footer-nav-links a > i {
    font-size: 1rem;
    width: 1em;
    height: 1em;
  }
}

/* ---------- Motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  .footer-nav-links a,
  .footer-nav-links a::after,
  .footer-nav-links a > i {
    transition: none !important;
    transform: none !important;
  }
}

@media print {
  .footer-nav-links {
    display: none !important;
  }
}
/* =========================================================
   13. SOCIAL HUB — CONTACTS DRAWER
   ========================================================= */

.zbs-contacts-overlay {
  position: fixed;
  inset: 0;
  z-index: 10300;
  background: rgba(0, 0, 0, .55);
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity .22s var(--ease-out);
}
.zbs-contacts-overlay.show { opacity: 1; }
.zbs-contacts-overlay[hidden] { display: none; }

.zbs-contacts-drawer {
  width: min(760px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--zbs-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  overflow: hidden;
  transform: translateY(18px) scale(.98);
  transition: transform .28s var(--ease-out);
}
.zbs-contacts-overlay.show .zbs-contacts-drawer {
  transform: translateY(0) scale(1);
}

/* Head */
.zbs-contacts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .9rem 1rem;
  background: linear-gradient(135deg, var(--zbs-green-dark), var(--zbs-green));
  color: #fff;
}
.zbs-contacts-head-left {
  display: flex; align-items: center; gap: .65rem; min-width: 0;
}
.zbs-contacts-head-left > i { font-size: 1.35rem; }
.zbs-contacts-head h3 {
  margin: 0; font-size: 1rem; font-weight: 700;
}
.zbs-contacts-sub {
  font-size: .75rem; opacity: .9; display: block;
}
.zbs-contacts-close {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #fff; font-size: 1.15rem; cursor: pointer;
  transition: background .15s;
}
.zbs-contacts-close:hover { background: rgba(255, 255, 255, .32); }

/* Toolbar */
.zbs-contacts-toolbar {
  display: flex; gap: .4rem; flex-wrap: wrap;
  padding: .75rem 1rem;
  background: var(--zbs-surface-2);
  border-bottom: 1px solid var(--zbs-line);
}
.zbs-contacts-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .8rem;
  border: 1px solid var(--zbs-line);
  border-radius: var(--r-pill);
  background: var(--zbs-surface);
  color: var(--zbs-ink);
  font-size: .8rem; font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
}
.zbs-contacts-btn:hover {
  background: var(--zbs-surface);
  border-color: var(--zbs-green);
  color: var(--zbs-green-dark);
  transform: translateY(-1px);
}
.zbs-contacts-btn.primary {
  background: var(--zbs-green); border-color: var(--zbs-green); color: #fff;
}
.zbs-contacts-btn.primary:hover {
  background: var(--zbs-green-dark); color: #fff;
}
.zbs-contacts-btn.danger {
  color: var(--zbs-red); border-color: rgba(198, 40, 40, .3);
}
.zbs-contacts-btn.danger:hover {
  background: rgba(198, 40, 40, .08); color: var(--zbs-red);
}

/* Search */
.zbs-contacts-search {
  position: relative;
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--zbs-line);
}
.zbs-contacts-search > i {
  position: absolute; left: 1.6rem; top: 50%;
  transform: translateY(-50%);
  color: var(--zbs-muted); font-size: .85rem; pointer-events: none;
}
.zbs-contacts-search input {
  width: 100%;
  padding: .55rem .8rem .55rem 2.1rem;
  border: 1px solid var(--zbs-line);
  border-radius: var(--r-md);
  background: var(--zbs-surface);
  font-size: .85rem; font-family: inherit;
  color: var(--zbs-ink);
  transition: border-color .15s, box-shadow .15s;
}
.zbs-contacts-search input:focus {
  outline: none;
  border-color: var(--zbs-green);
  box-shadow: 0 0 0 3px rgba(31, 122, 61, .12);
}

/* List */
.zbs-contacts-list {
  flex: 1;
  overflow-y: auto;
  padding: .5rem .5rem .5rem;
  display: flex; flex-direction: column; gap: .25rem;
}
.zbs-contact-row {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .6rem;
  border-radius: var(--r-md);
  transition: background .12s;
}
.zbs-contact-row:hover { background: var(--zbs-surface-2); }
.zbs-contact-row.is-selected {
  background: rgba(31, 122, 61, .08);
  box-shadow: inset 0 0 0 1px rgba(31, 122, 61, .2);
}
.zbs-contact-check {
  flex: 0 0 auto; display: grid; place-items: center;
}
.zbs-contact-check input {
  width: 18px; height: 18px; accent-color: var(--zbs-green); cursor: pointer;
}
.zbs-contact-avatar {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--zbs-green), var(--zbs-green-light));
  color: #fff; font-weight: 700; font-size: .8rem;
  text-transform: uppercase;
}
.zbs-contact-body {
  flex: 1; min-width: 0;
}
.zbs-contact-name {
  font-size: .88rem; font-weight: 600; color: var(--zbs-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.zbs-contact-org {
  font-weight: 500; color: var(--zbs-muted); font-size: .78rem;
}
.zbs-contact-meta {
  display: flex; flex-wrap: wrap; gap: .65rem;
  font-size: .74rem; color: var(--zbs-muted);
  margin-top: .1rem;
}
.zbs-contact-meta > span {
  display: inline-flex; align-items: center; gap: .25rem;
  min-width: 0; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.zbs-contact-meta i { color: var(--zbs-green); font-size: .72rem; }

.zbs-contact-quick {
  flex: 0 0 auto; display: inline-flex; gap: .25rem;
}
.zbs-contact-mini {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--zbs-surface-2);
  color: var(--zbs-muted);
  font-size: .78rem; cursor: pointer;
  transition: background .15s, color .15s, transform .12s;
}
.zbs-contact-mini:hover { transform: scale(1.08); }
.zbs-contact-mini.email:hover { background: rgba(21, 101, 192, .12); color: #1565c0; }
.zbs-contact-mini.sms:hover   { background: rgba(31, 122, 61, .12); color: var(--zbs-green-dark); }
.zbs-contact-mini.delete:hover{ background: rgba(198, 40, 40, .12); color: var(--zbs-red); }

/* Empty */
.zbs-contacts-empty {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  padding: 2.5rem 1rem; text-align: center; color: var(--zbs-muted);
}
.zbs-contacts-empty > i { font-size: 2rem; opacity: .5; }
.zbs-contacts-empty p { margin: 0; font-size: .9rem; font-weight: 600; }
.zbs-contacts-empty small { font-size: .78rem; max-width: 280px; }
.zbs-contacts-empty[hidden] { display: none; }

/* Foot */
.zbs-contacts-foot {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  padding: .65rem 1rem;
  border-top: 1px solid var(--zbs-line);
  background: var(--zbs-surface-2);
}
.zbs-contacts-selectall {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; color: var(--zbs-ink); cursor: pointer;
}
.zbs-contacts-selectall input { accent-color: var(--zbs-green); }
.zbs-contacts-selcount {
  font-size: .78rem; color: var(--zbs-muted); font-weight: 600;
}
.zbs-contacts-actions {
  margin-left: auto; display: inline-flex; gap: .35rem; flex-wrap: wrap;
}
.zbs-contacts-action {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .45rem .8rem;
  border: 0; border-radius: var(--r-pill);
  background: var(--zbs-surface);
  color: var(--zbs-ink);
  font-size: .78rem; font-weight: 600; cursor: pointer;
  box-shadow: var(--sh-sm);
  transition: transform .12s, background .15s, color .15s, box-shadow .15s;
}
.zbs-contacts-action:hover { transform: translateY(-1px); box-shadow: var(--sh-md); }
.zbs-contacts-action[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.zbs-contacts-action.email:hover:not([disabled])     { background: #1565c0; color: #fff; }
.zbs-contacts-action.sms:hover:not([disabled])       { background: var(--zbs-green); color: #fff; }
.zbs-contacts-action.wa:hover:not([disabled])        { background: #25d366; color: #fff; }
.zbs-contacts-action.broadcast:hover:not([disabled]) { background: var(--zbs-purple); color: #fff; }

/* Social Hub target chips (broadcast integration) */
.shub-target-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .55rem;
  border-radius: var(--r-pill);
  background: rgba(31, 122, 61, .12);
  color: var(--zbs-green-dark);
  font-size: .74rem; font-weight: 600;
}
.shub-target-chip .shub-target-remove {
  width: 16px; height: 16px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .12); color: inherit;
  font-size: .9rem; line-height: 1; cursor: pointer;
}

/* Responsive */
@media (max-width: 640px) {
  .zbs-contacts-overlay { padding: 0; }
  .zbs-contacts-drawer {
    width: 100%; max-height: 100vh;
    border-radius: 0;
  }
  .zbs-contacts-toolbar {
    padding: .6rem .75rem; gap: .35rem;
  }
  .zbs-contacts-btn {
    padding: .45rem .65rem; font-size: .74rem;
  }
  .zbs-contacts-foot {
    padding: .6rem .75rem;
  }
  .zbs-contacts-action {
    padding: .4rem .6rem; font-size: .72rem;
  }
  .zbs-contacts-action i { font-size: .78rem; }
  .zbs-contact-meta { gap: .4rem; font-size: .7rem; }
  .zbs-contact-avatar { width: 32px; height: 32px; font-size: .72rem; }
}

@media (max-width: 400px) {
  .zbs-contacts-btn span,
  .zbs-contacts-action span { display: none; }
  .zbs-contacts-action { padding: .4rem .55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .zbs-contacts-overlay,
  .zbs-contacts-drawer,
  .zbs-contacts-btn,
  .zbs-contact-mini,
  .zbs-contacts-action {
    transition: none !important;
    transform: none !important;
    animation: none !important;
  }
}

@media print {
  .zbs-contacts-overlay { display: none !important; }
}
/* =========================================================
   16. ADVERT BANNER — transparent + compact
   · Removes the green gradient background and shadow
   · Shrinks the strip height so the ad cards sit flush
     right under the header
   · Each advert becomes its own readable pill so the
     page behind it shows through the gaps
   ========================================================= */

:root {
  --advert-h: 38px;          /* was 52px — slimmer strip */
  --advert-gap: .35rem;
}

/* ---------- The strip itself: transparent ---------- */
.adverts-banner {
  background: transparent !important;
  box-shadow: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  height: var(--advert-h) !important;
  padding: 0 .35rem;
  /* subtle blur so text stays legible over busy pages */
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

/* ---------- The scrolling track ---------- */
.adverts-track {
  gap: var(--advert-gap);
  padding-block: .25rem;
  align-items: center;
  height: 100%;
}

/* ---------- Each advert becomes a self-contained pill ---------- */
.advert-item {
  height: calc(var(--advert-h) - .5rem);
  padding: 0 .7rem;
  border-radius: var(--r-pill);
  border-right: 0;
  background: rgba(238, 241, 239, 0.82);            /* tinted green */
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background .18s var(--ease-out),
              transform .18s var(--ease-out);
}

.advert-item:hover,
.advert-item:focus-visible {
  background: rgba(239, 241, 240, 0.95);
  transform: translateY(-1px);
}

/* Compact icon / emoji / text / tag sizing to match the shorter strip */
.advert-img,
.advert-emoji {
  width: 20px;
  height: 20px;
  font-size: .95rem;
  background: rgba(255, 255, 255, .18);
}

.advert-text {
  font-size: .78rem;
  line-height: 1.1;
}

.advert-tag {
  font-size: .58rem;
  padding: .08rem .42rem;
  line-height: 1;
}

/* Keep the coloured tag backgrounds readable on the pill */
.advert-tag.tag-plain { background: rgba(241, 239, 239, 0.89); }

/* =========================================================
   16.1 Responsive — even slimmer on phones
   ========================================================= */
@media (max-width: 640px) {
  :root {
    --advert-h: 34px;
    --advert-gap: .3rem;
  }

  .adverts-banner { padding: 0 .25rem; }

  .advert-item {
    height: calc(var(--advert-h) - .4rem);
    padding: 0 .55rem;
    gap: .35rem;
    background: rgba(216, 224, 219, 0.9);
  }

  .advert-img,
  .advert-emoji {
    width: 18px;
    height: 18px;
    font-size: .85rem;
  }

  .advert-text { font-size: .72rem; }
  .advert-tag  { font-size: .52rem; padding: .06rem .35rem; }
}

@media (max-width: 400px) {
  :root { --advert-h: 32px; }
  .advert-item { padding: 0 .45rem; gap: .3rem; }
  .advert-text { font-size: .68rem; max-width: 55vw; }
}

/* =========================================================
   16.2 Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .advert-item { transition: none !important; }
}

/* =========================================================
   16.3 Print — never show the marquee
   ========================================================= */
@media print {
  .adverts-banner { display: none !important; }
}
/* ================================================================
   LuSE Market tab
   ================================================================ */
#etf-panel-luse { display:flex; flex-direction:column; gap:16px; }

/* KPI bar */
.luse-summary-bar{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:10px; padding:14px; border-radius:12px;
  background:linear-gradient(135deg,#0f3d22 0%,#1f7a3d 100%);
  color:#fff;
}
.luse-kpi{ display:flex; flex-direction:column; gap:2px; }
.luse-kpi-label{ font-size:10px; text-transform:uppercase; letter-spacing:.06em; opacity:.75; }
.luse-kpi-value{ font-size:16px; font-weight:700; }
.luse-kpi-sub{ font-size:11px; opacity:.8; }
.luse-kpi-change{ font-size:12px; font-weight:600; }
.luse-kpi-change.luse-pos{ color:#86efac; }
.luse-kpi-change.luse-neg{ color:#fca5a5; }

/* Movers */
.luse-movers-row{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media(max-width:640px){ .luse-movers-row{ grid-template-columns:1fr; } }
.luse-movers-card{
  background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:12px 14px;
}
.luse-movers-card h4{ margin:0 0 8px; font-size:13px; color:#374151; }
.luse-movers-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:6px; }
.luse-mover-row{ display:flex; justify-content:space-between; font-size:12px; padding:4px 0; border-bottom:1px dashed #f1f5f9; }
.luse-mover-sym{ font-weight:700; color:#111827; }
.luse-mover-price{ color:#4b5563; }
.luse-mover-pct.luse-pos{ color:#16a34a; font-weight:700; }
.luse-mover-pct.luse-neg{ color:#dc2626; font-weight:700; }

/* Toolbar */
.luse-toolbar{ display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; }
.luse-search-box{
  display:flex; align-items:center; gap:8px; padding:6px 12px;
  border:1px solid #cbd5e1; border-radius:8px; background:#fff; flex:1; max-width:380px;
}
.luse-search-box input{ border:0; outline:0; flex:1; font-size:13px; background:transparent; }
.luse-source{ font-size:11px; color:#6b7280; }

/* Table */
.luse-table-wrap{ overflow-x:auto; border:1px solid #e5e7eb; border-radius:10px; background:#fff; }
.luse-table{ width:100%; border-collapse:collapse; font-size:12px; min-width:1200px; }
.luse-table th{
  background:#f8fafc; text-align:left; padding:8px 10px; font-size:11px;
  text-transform:uppercase; letter-spacing:.04em; color:#475569;
  border-bottom:1px solid #e5e7eb; white-space:nowrap; user-select:none;
}
.luse-table th.sort-asc::after{ content:" ▲"; color:#1f7a3d; }
.luse-table th.sort-desc::after{ content:" ▼"; color:#1f7a3d; }
.luse-table td{ padding:8px 10px; border-bottom:1px solid #f1f5f9; vertical-align:middle; }
.luse-table td.num{ text-align:right; font-variant-numeric:tabular-nums; }
.luse-table td.luse-sym strong{ display:block; font-size:12px; color:#0f172a; }
.luse-table td.luse-sym small{ display:block; font-size:10px; color:#64748b; }
.luse-table tr:hover{ background:#f8fafc; }
.luse-pos{ color:#16a34a; font-weight:600; }
.luse-neg{ color:#dc2626; font-weight:600; }
.luse-flat{ color:#6b7280; }
.luse-empty{ text-align:center; padding:20px; color:#6b7280; }

/* Two-column cards */
.luse-two-col{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media(max-width:820px){ .luse-two-col{ grid-template-columns:1fr; } }
.luse-card{ background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:14px; }
.luse-card h4{ margin:0 0 10px; font-size:13px; color:#374151; }
.luse-mini-table{ width:100%; border-collapse:collapse; font-size:12px; }
.luse-mini-table th{ text-align:left; padding:6px 8px; font-size:10px; text-transform:uppercase; color:#64748b; border-bottom:1px solid #e5e7eb; }
.luse-mini-table td{ padding:6px 8px; border-bottom:1px solid #f1f5f9; }
.luse-mini-table td.num{ text-align:right; font-variant-numeric:tabular-nums; }

/* Macro grid */
.luse-macro-grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.luse-macro-item{ display:flex; flex-direction:column; padding:8px 10px; background:#f8fafc; border-radius:8px; }
.luse-macro-label{ font-size:10px; color:#64748b; line-height:1.3; }
.luse-macro-value{ font-size:14px; font-weight:700; color:#0f172a; margin-top:2px; }

/* Announcements */
.luse-announcements{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.luse-announcements li{ display:flex; gap:8px; font-size:12px; color:#334155; line-height:1.5; padding:6px 0; border-bottom:1px dashed #f1f5f9; }
.luse-ann-num{
  flex-shrink:0; width:20px; height:20px; border-radius:50%;
  background:#1f7a3d; color:#fff; font-size:10px; font-weight:700;
  display:flex; align-items:center; justify-content:center;
}

/* Disclaimer */
.luse-disclaimer{ font-size:11px; color:#6b7280; padding:10px 12px; background:#f8fafc; border-radius:8px; }
.luse-disclaimer a{ color:#1f7a3d; font-weight:600; }