:root{
  --violet-600: #8b5cf6;
  --pink-500:  #ec4899;
  --accent:     #c77dff;
  --glass-0:    rgba(12,9,18,0.94);
  --glass-1:    rgba(18,15,24,0.88);
  --border-glow: rgba(199,125,255,0.07);
  --muted:      rgba(255,255,255,0.66);

  --testimonial-font-size: 14px;
  --testimonial-line-height: 1.45;
  --clamp-default-lines: 3;
}


.testimonial-card{
  box-sizing: border-box;
  width: 100%;
  background: linear-gradient(180deg, var(--glass-0), var(--glass-1));
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  padding: 14px;
  color: #efe9fb;
  box-shadow: 0 12px 34px rgba(0,0,0,0.55), 0 2px 18px rgba(139,92,246,0.03);
  overflow: hidden;
  margin: 0;
  --clamp-lines: var(--clamp-lines, var(--clamp-default-lines));
  -webkit-font-smoothing: antialiased;
}

.testimonial-card p { margin: 0; }

.t-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}


.t-stars { display:flex; gap:6px; align-items:center; }

.t-stars .star {
  width: 14px;
  height: 14px;
  opacity: 0.28;
  fill: transparent;
  stroke: #FFD700;
  stroke-width: 0;
  flex-shrink: 0;
}

.t-stars .star.filled {
  opacity: 1;
  fill: #FFD700;
  stroke: #FFD700;
}


.header-meta { text-align: right; min-width: 110px; }
.header-meta .items-label { font-weight: 600; color: #fff; font-size: 13px; }
.header-meta .date { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }


.message, .reply {
  box-sizing: border-box;
  color: #efe9fb;
  font-size: var(--testimonial-font-size);
  line-height: var(--testimonial-line-height);
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--clamp-lines);

  --_line_px: calc(var(--testimonial-font-size) * var(--testimonial-line-height));
  max-height: calc(var(--_line_px) * var(--clamp-lines));
  min-height: calc(var(--_line_px) * var(--clamp-lines));

  text-overflow: ellipsis;
  transition: max-height .28s cubic-bezier(.2,.9,.25,1), opacity .18s ease;
  will-change: max-height, opacity;
}


.message.is-open, .reply.is-open {
  -webkit-line-clamp: unset;
  max-height: 9999px;
  min-height: 0;
  transition: max-height .32s ease-out;
}


.toggle {
  display:inline-block;
  margin-top:8px;
  background:transparent;
  border:none;
  color:var(--accent);
  font-weight:700;
  cursor:pointer;
  padding:4px 0;
  text-decoration: underline;
}
.toggle:focus { outline: 3px solid rgba(199,125,255,0.16); outline-offset: 2px; border-radius: 6px; }

.reply-label { font-size:12px; color: var(--muted); margin-top:10px; margin-bottom:6px; }


.testimonial-card .t-footer { display:none; }

.testimonial-card:hover {
  transform: translateY(-3px);
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 18px 44px rgba(0,0,0,0.6), 0 4px 24px rgba(139,92,246,0.05);
}

@media (max-width: 600px){
  :root { --clamp-default-lines: 4; }
  .t-stars .star, .t-stars .star.filled { width: 13px; height:13px; }
  .header-meta { text-align: right; min-width: 90px; font-size:12px; }
  .message, .reply { font-size: 15px; }
}

@media print {
  .testimonial-card { box-shadow:none; border:1px solid #ddd; background:#fff; color:#000; }
  .toggle { display:none; }
}