.grcw-widget {
  --grcw-bg: #fff;
  --grcw-text: #181818;
  --grcw-muted: #8b8b8b;
  --grcw-accent: #ef5d68;
  --grcw-link: #2f7ff7;
  --grcw-star: #f4b400;
  --grcw-radius: 18px;
  --grcw-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
  --grcw-font: inherit;
  font-family: var(--grcw-font);
}

.grcw-widget * { box-sizing: border-box; }

.grcw-card {
  background: var(--grcw-bg);
  border-radius: var(--grcw-radius);
  box-shadow: var(--grcw-shadow);
  padding: 26px 30px 28px;
  min-height: var(--grcw-min-height, 300px);
}

.grcw-grid {
  display: grid;
  grid-template-columns: minmax(250px, 340px) 1fr;
  gap: 56px;
  align-items: start;
}

.grcw-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 4px;
}

.grcw-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #ededed;
  color: var(--grcw-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 22px;
}

.grcw-title {
  margin: 0 0 16px;
  max-width: none;
  color: var(--grcw-text);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.grcw-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.grcw-google-label {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(90deg, #4285F4 0 25%, #DB4437 25% 50%, #F4B400 50% 75%, #0F9D58 75% 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.grcw-score {
  font-size: 15px;
  font-weight: 700;
  color: var(--grcw-text);
  line-height: 1;
}

.grcw-stars {
  font-size: 15px;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--grcw-star);
}

.grcw-count {
  font-size: 14px;
  line-height: 1;
  color: var(--grcw-muted);
}

.grcw-right {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.grcw-quote-wrap {
  min-height: 188px;
}

.grcw-animated {
  transition: opacity .32s ease, transform .32s ease;
  will-change: opacity, transform;
}

.grcw-widget.is-fading .grcw-animated {
  opacity: 0;
  transform: translateY(8px);
}

.grcw-quote {
  margin: 0 0 18px;
  color: var(--grcw-text);
  font-size: clamp(28px, 2.1vw, 34px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.018em;
  max-width: 1000px;
  overflow-wrap: anywhere;
}

.grcw-line {
  width: 100%;
  height: 2px;
  margin-bottom: 20px;
  background-color: transparent;
  background-position: left center;
  background-repeat: no-repeat;
  background-size: 100% 2px;
}

.grcw-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.grcw-author {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--grcw-text);
}

.grcw-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 18px;
  margin-top: 18px;
}

.grcw-controls {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 0;
}

.grcw-btn {
  appearance: none;
  border: 1px solid var(--grcw-accent);
  background: rgba(255,255,255,.32);
  width: 50px;
  height: 50px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.grcw-btn:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0,0,0,.06);
}

.grcw-btn:focus-visible {
  outline: 2px solid var(--grcw-link);
  outline-offset: 2px;
}

.grcw-btn-icon {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.grcw-footer {
  margin-top: 0;
  text-align: right;
}

.grcw-google-link {
  display: inline-block;
  font-size: 14px;
  color: var(--grcw-muted);
  text-decoration: none;
  white-space: nowrap;
}

.grcw-google-link:hover { color: var(--grcw-text); }

.grcw-loading .grcw-quote,
.grcw-loading .grcw-author,
.grcw-loading .grcw-score,
.grcw-loading .grcw-count,
.grcw-loading .grcw-stars { opacity: 0.35; }

.grcw-error {
  padding: 16px 18px;
  border-left: 4px solid #d63638;
  background: #fff1f1;
  color: #6b0a0a;
}

@media (max-width: 1180px) {
  .grcw-card { padding: 24px 24px 24px; }
  .grcw-grid { grid-template-columns: minmax(220px, 300px) 1fr; gap: 34px; }
  .grcw-title { font-size: 24px; }
  .grcw-quote { font-size: 28px; }
}

@media (max-width: 1024px) {
  .grcw-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .grcw-title { max-width: none; }
  .grcw-quote-wrap { min-height: auto; }
  .grcw-bottom {
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
  }
  .grcw-footer,
  .grcw-controls { text-align: left; justify-content: flex-start; }
}

@media (max-width: 767px) {
  .grcw-card {
    padding: 20px 16px 18px;
    min-height: auto;
  }

  .grcw-badge {
    margin-bottom: 16px;
  }

  .grcw-title {
    font-size: 22px;
    line-height: 1.15;
  }

  .grcw-score,
  .grcw-stars {
    font-size: 14px;
  }

  .grcw-count,
  .grcw-google-link,
  .grcw-author {
    font-size: 14px;
  }

  .grcw-quote {
    font-size: 21px;
    margin-bottom: 16px;
  }

  .grcw-line {
    margin-bottom: 16px;
  }

  .grcw-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .grcw-btn-icon {
    width: 16px;
    height: 16px;
  }
}
