.ki-grs {
  --ki-grs-nav-w: 36px;
  --ki-grs-track-pad-x: 8px;
  --ki-grs-ui-button: #d80120;
  --ki-grs-ui-button-radius: 8px;
  --ki-grs-ui-dot: #d80120;
  --ki-grs-gap: 12px;
  --ki-grs-radius: 10px;
  --ki-grs-header-radius: 8px;
  --ki-grs-nav-btn-radius: 999px;
  --ki-grs-bg: #ffffff;
  --ki-grs-border: #e5e7eb;
  --ki-grs-text: #1f2937;
  --ki-grs-muted: #6b7280;
  --ki-grs-star: #fbbf24;
  --ki-grs-star-empty: #d1d5db;
  --ki-grs-accent: #1a73e8;
  --ki-grs-font-body: 1em;
  --ki-grs-font-author: 1em;
  --ki-grs-font-when: 0.875em;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ki-grs-text);
}

.ki-grs *,
.ki-grs *::before,
.ki-grs *::after {
  box-sizing: border-box;
}

.ki-grs--empty {
  padding: 16px;
  text-align: center;
  color: var(--ki-grs-muted);
  font-size: var(--ki-grs-font-body);
}

.ki-grs__top,
.ki-grs__dots-row {
  display: flex;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.ki-grs__top {
  align-items: stretch;
  padding: 0 8px;
  margin: 0 0 2px;
}

.ki-grs__dots-row {
  align-items: center;
  margin-top: 8px;
}

.ki-grs__nav-spacer {
  flex: 0 0 var(--ki-grs-nav-w);
  width: var(--ki-grs-nav-w);
  min-width: var(--ki-grs-nav-w);
  pointer-events: none;
  visibility: hidden;
}

.ki-grs__header {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0;
  min-width: 0;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: var(--ki-grs-header-radius);
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.ki-grs__header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0px;
  min-width: 0;
  flex: 1 1 auto;
}

.ki-grs__google-logo {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 36px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
  object-position: left center;
}

.ki-grs__header-rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 4px;
  font-size: 1em;
  line-height: 1.25;
}

.ki-grs__header-rating .ki-grs__stars {
  font-size: 1.25em;
  line-height: 1;
  letter-spacing: 0.02em;
}

.ki-grs__header .ki-grs__rating-value {
  font-weight: 700;
  font-size: 1em;
  color: #111111;
}

.ki-grs__header .ki-grs__rating-count {
  color: #6b6b6b;
  font-size: 0.8125em;
  font-weight: 400;
  line-height: 1;
}

.ki-grs__header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--ki-grs-ui-button-radius);
  background: var(--ki-grs-ui-button);
  color: #ffffff;
  font-size: 1em;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition:
    filter 0.15s ease,
    box-shadow 0.15s ease;
}

.ki-grs__header-cta:hover,
.ki-grs__header-cta:focus {
  color: #ffffff;
  text-decoration: none;
  filter: brightness(0.92);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  outline: none;
}

.ki-grs__slider {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.ki-grs__viewport {
  overflow: hidden;
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.ki-grs__track {
  display: flex;
  gap: var(--ki-grs-gap);
  transition: transform 400ms ease;
  will-change: transform;
  margin: 10px 0;
  min-width: 0;
  padding: 0 var(--ki-grs-track-pad-x);
  box-sizing: border-box;
}

.ki-grs__slide {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.ki-grs__card {
  background: var(--ki-grs-bg);
  border: 1px solid var(--ki-grs-border);
  border-radius: var(--ki-grs-radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  height: 100%;
  max-width: 100%;
  overflow: hidden;
}

.ki-grs__author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ki-grs__avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ki-grs-muted);
  font-weight: 600;
  font-size: 0.9375em;
  text-transform: uppercase;
}

.ki-grs__author-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.ki-grs__author-name {
  font-weight: 600;
  font-size: var(--ki-grs-font-author);
  line-height: 1.25;
  color: var(--ki-grs-text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ki-grs__author-name:hover,
.ki-grs__author-name:focus {
  text-decoration: underline;
}

.ki-grs__when {
  font-size: var(--ki-grs-font-when);
  line-height: 1.25;
  color: var(--ki-grs-muted);
}

.ki-grs__rating {
  display: inline-flex;
  gap: 2px;
  font-size: 1.125em;
  line-height: 1;
}

.ki-grs__star--full,
.ki-grs__star--half {
  color: var(--ki-grs-star);
}

.ki-grs__star--empty {
  color: var(--ki-grs-star-empty);
}

.ki-grs__star--half {
  position: relative;
  display: inline-block;
  color: var(--ki-grs-star-empty);
}

.ki-grs__star--half::before {
  content: '\2605';
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  overflow: hidden;
  color: var(--ki-grs-star);
}

.ki-grs__review-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  min-height: 0;
}

.ki-grs__text {
  color: var(--ki-grs-text);
  margin: 0;
  line-height: 1.5;
  font-size: var(--ki-grs-font-body);
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

.ki-grs__card:not(.ki-grs__card--expanded) .ki-grs__text--collapsible {
  display: -webkit-box;
  line-clamp: 4;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ki-grs__card.ki-grs__card--expanded .ki-grs__text--collapsible {
  display: block;
  line-clamp: unset;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.ki-grs__toggle {
  align-self: flex-start;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.875em;
  font-weight: 600;
  color: var(--ki-grs-text);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ki-grs__toggle:hover,
.ki-grs__toggle:focus {
  color: var(--ki-grs-text);
  outline: none;
  opacity: 0.88;
  text-decoration: underline;
  background: none;
}

.ki-grs__btn {
  background: var(--ki-grs-bg);
  border: 1px solid var(--ki-grs-border);
  border-radius: var(--ki-grs-nav-btn-radius);
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 0.875em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ki-grs-text);
  transition:
    background 120ms ease,
    border-color 120ms ease;
  flex-shrink: 0;
  padding: 0;
}

.ki-grs__btn--side {
  align-self: center;
}

.ki-grs__btn:hover,
.ki-grs__btn:focus {
  background: #f9fafb;
  border-color: #9ca3af;
  outline: none;
  color: var(--ki-grs-text);
}

.ki-grs__dots {
  display: flex;
  flex: 1 1 auto;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  min-width: 0;
  padding: 2px 0 0;
}

.ki-grs__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ki-grs-star-empty);
  border: 0;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.ki-grs__dot[aria-selected='true'] {
  background: var(--ki-grs-ui-dot);
}

/* Globalne a { … !important } z motywu: tylko własny root + klasy na <a> (bez .entry-content itd.). */
.ki-grs a.ki-grs__author-name,
.ki-grs a.ki-grs__author-name:link,
.ki-grs a.ki-grs__author-name:visited,
.ki-grs a.ki-grs__author-name:active,
.ki-grs a.ki-grs__author-name:focus {
  color: var(--ki-grs-text) !important;
}

.ki-grs a.ki-grs__header-cta,
.ki-grs a.ki-grs__header-cta:link,
.ki-grs a.ki-grs__header-cta:visited,
.ki-grs a.ki-grs__header-cta:active,
.ki-grs a.ki-grs__header-cta:focus,
.ki-grs a.ki-grs__header-cta:hover {
  color: #ffffff !important;
  background: var(--ki-grs-ui-button) !important;
}

@media (max-width: 639px) {
  .ki-grs {
    --ki-grs-nav-w: 32px;
    font-size: 16px;
  }

  /* Górna sekcja na pełną szerokość (bez wyrównania do strzałek slidera) */
  .ki-grs__top {
    padding: 0;
    gap: 0;
    margin: 0 0 10px;
  }

  .ki-grs__top .ki-grs__nav-spacer {
    display: none;
  }

  .ki-grs__top .ki-grs__header {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }

  .ki-grs__slider {
    gap: 0;
  }

  /* Strzałki wchodzą na kartę — mniejsza „dziura” po bokach */
  .ki-grs__btn--side.ki-grs__btn--prev {
    position: relative;
    z-index: 2;
    margin-right: -12px;
  }

  .ki-grs__btn--side.ki-grs__btn--next {
    position: relative;
    z-index: 2;
    margin-left: -12px;
  }

  .ki-grs__btn--side {
    width: 32px;
    height: 32px;
    font-size: 0.8125em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  }

  .ki-grs__header {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 14px;
    gap: 12px;
  }

  .ki-grs__header-cta {
    width: auto;
    max-width: 100%;
    align-self: flex-start;
  }

  .ki-grs {
    --ki-grs-track-pad-x: 6px;
  }
}
