/* Styles from review draft C and its collection, scoped to the live review sections. */
.kr-reviews {
  --rd-ink: #0a152a;
  --rd-navy: #142d5b;
  --rd-muted: #536786;
  --rd-border: #d7dee8;
  --rd-paper: #f3f4f6;
  color: var(--rd-ink);
}

#reviews.kr-reviews { background: #fff; }

.kr-reviews :is(h2, h3, h4, p) {
  margin: 0;
  text-wrap: initial;
}

.kr-reviews ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.kr-reviews :is(a, button, select):focus-visible { outline: 2px solid var(--rd-ink); outline-offset: 3px; }

.kr-reviews .kr-reviews-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 24px;
}

.kr-reviews .kr-reviews-heading p {
  margin-top: 10px;
  color: var(--rd-muted);
  font-size: 17px;
  line-height: 1.5;
}

.kr-reviews :is(.kr-reviews-link, .rd-button, .kr-reviews-more, .kr-reviews-reset) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  font-size: 14px;
  font-weight: 700;
}

.kr-reviews .kr-reviews-link { color: var(--rd-navy); white-space: nowrap; }
.kr-reviews .kr-reviews-link:hover { text-decoration: underline; }

.kr-reviews .kr-reviews-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 24px;
}

.kr-reviews .kr-reviews-lane {
  margin-bottom: 8px;
  color: var(--rd-navy);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.4;
}

.kr-reviews .kr-reviews-latest {
  display: grid;
  align-content: start;
  gap: 8px;
}

.kr-reviews .rd-card {
  min-width: 0;
  border: 1px solid var(--rd-border);
  border-radius: 10px;
  background: #fff;
}

.kr-reviews .rd-card > a { display: block; color: inherit; border-radius: inherit; }

.kr-reviews .rd-thumb-card > a:hover .rd-thumb-title { text-decoration: underline; }

.kr-reviews .rd-thumb-media {
  position: relative;
  overflow: hidden;
  border-radius: 9px 9px 0 0;
}

.kr-reviews .rd-thumb-art {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--rd-paper);
}

.kr-reviews .rd-thumb-art--photo { background: var(--rd-navy); }

.kr-reviews .rd-thumb-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.kr-reviews .rd-thumb-art--photo .rd-thumb-image { object-position: center bottom; }

.kr-reviews .rd-thumb-copy { min-width: 0; padding: 7px 12px; }

.kr-reviews .rd-thumb-title {
  position: absolute;
  inset: auto 12px 12px;
  padding-inline: .24em;
  color: var(--rd-ink);
  font-size: clamp(14px, 6.4cqi, 23px);
  font-weight: 760;
  letter-spacing: normal;
  line-height: 1.48;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.kr-reviews .rd-thumb-title > span {
  background-color: #ffe45c;
  box-shadow: .24em 0 #ffe45c, -.24em 0 #ffe45c, 0 1px 3px rgb(20 45 91 / 18%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.kr-reviews .rd-thumb-art--photo .rd-thumb-title {
  color: #fff;
  padding-inline: 0;
  line-height: 1.32;
  text-shadow: 0 1px 3px rgb(10 21 42 / 80%);
}

.kr-reviews .rd-thumb-art--photo .rd-thumb-title > span { background: none; box-shadow: none; }

.kr-reviews .rd-thumb-source {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  align-items: baseline;
  color: var(--rd-muted);
  font-size: 12px;
  line-height: 1.4;
}

.kr-reviews .rd-thumb-source > span { white-space: nowrap; }

.kr-reviews .rd-thumb-card--featured .rd-thumb-media:has(.rd-thumb-preview) {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.kr-reviews .rd-thumb-preview {
  position: relative;
  overflow: hidden;
  border-left: 1px solid var(--rd-border);
  background: #fff;
}

.kr-reviews .rd-thumb-preview img {
  position: absolute;
  inset: 0 auto auto 0;
  display: block;
  width: 100%;
  height: auto;
}

.kr-reviews .rd-thumb-card--featured .rd-thumb-copy { padding: 9px 12px; }
.kr-reviews .rd-thumb-card--featured .rd-thumb-title { font-size: clamp(15px, 6.4cqi, 26px); }

.kr-reviews .rd-thumb-card--latest > a:has(.rd-thumb-media) {
  display: grid;
  grid-template-columns: min(38%, 148px) minmax(0, 1fr);
  align-items: center;
}

.kr-reviews .rd-thumb-card--latest .rd-thumb-media { border-radius: 9px 0 0 9px; }
.kr-reviews .rd-thumb-card--latest .rd-thumb-art { aspect-ratio: 4 / 3; }
.kr-reviews .rd-thumb-card--latest .rd-thumb-art:not(.rd-thumb-art--photo) .rd-thumb-image {
  object-position: left top;
}

.kr-reviews .rd-thumb-card--latest .rd-thumb-title {
  position: static;
  display: -webkit-box;
  overflow: hidden;
  padding: 0;
  font-size: 17px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.kr-reviews .rd-thumb-card--latest .rd-thumb-copy { display: grid; gap: 4px; }
.kr-reviews :is(.rd-thumb-card--featured, .rd-thumb-card--latest) .rd-thumb-source { column-gap: 4px; }

.kr-reviews .rd-thumb-card--latest .rd-thumb-source > span:last-child {
  display: inline-flex;
  align-items: baseline;
  column-gap: inherit;
}

.kr-reviews.kr-reviews-collection {
  padding-block: 33px 42px;
  border-top: 1px solid var(--rd-border);
  background: var(--rd-paper);
}

.kr-reviews-collection > .fb-shell > h2 {
  font-size: clamp(27px, 3.2vw, 44px);
  font-weight: 760;
}

.kr-reviews .kr-reviews-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 10px 18px;
  margin: 12px 0;
}

.kr-reviews .kr-reviews-toolbar p, .kr-reviews .kr-reviews-empty { color: var(--rd-muted); font-size: 14px; line-height: 1.5; }

.kr-reviews .kr-reviews-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.kr-reviews .kr-reviews-filters label {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: var(--rd-navy);
  font-size: 13px;
  font-weight: 690;
}

.kr-reviews .kr-reviews-filters select, .kr-reviews .kr-reviews-reset {
  min-height: 40px;
  max-width: 100%;
  padding: 6px 9px;
  border: 1px solid var(--rd-border);
  border-radius: 5px;
  background: #fff;
  color: var(--rd-navy);
}

.kr-reviews .kr-reviews-filters select { cursor: pointer; }

.kr-reviews .kr-reviews-empty { padding-block: 26px; }

.kr-reviews .kr-reviews-more-row { display: flex; justify-content: center; }

.kr-reviews .kr-reviews-more {
  margin-top: 12px;
  padding-inline: 17px;
  border: 1px solid var(--rd-border);
  border-radius: 6px;
  background: #fff;
  color: var(--rd-navy);
}

.kr-reviews .kr-reviews-more:hover, .kr-reviews .kr-reviews-reset:hover { border-color: var(--rd-ink); background: #d7dee8; }

.kr-reviews .kr-reviews-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

html:has(.kr-reviews .rd-capture-dialog[open]) { overflow: hidden; }

.kr-reviews .rd-capture-dialog {
  position: fixed;
  inset: 0;
  width: min(780px, calc(100% - 48px));
  max-width: none;
  max-height: none;
  height: fit-content;
  margin: auto;
  padding: 0;
  border: 1px solid var(--rd-border);
  border-radius: 12px;
  color: var(--rd-ink);
  background: #fff;
  overflow: hidden;
}

.kr-reviews .rd-capture-dialog::backdrop { background: rgb(10 21 42 / 78%); }

.kr-reviews .rd-capture-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(90dvh, 980px);
}

.kr-reviews .rd-capture-header, .kr-reviews .rd-capture-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
}

.kr-reviews .rd-capture-header { border-bottom: 1px solid var(--rd-border); }
.kr-reviews .rd-capture-footer { justify-content: flex-end; border-top: 1px solid var(--rd-border); }

.kr-reviews .rd-button {
  padding-inline: 16px;
  border: 1px solid #8d9bb0;
  border-radius: 6px;
  background: #fff;
  color: var(--rd-navy);
}

.kr-reviews .rd-button:hover { background: #d7dee8; }
.kr-reviews .rd-capture-header h2 { min-width: 0; overflow-wrap: anywhere; font-size: clamp(16px, 2.1vw, 23px); line-height: 1.3; }

.kr-reviews .rd-capture-close {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rd-border);
  border-radius: 6px;
  color: var(--rd-navy);
  background: #fff;
  font-size: 26px;
  line-height: 1;
}

.kr-reviews .rd-capture-close:hover { background: var(--rd-paper); }
.kr-reviews .rd-capture-scroll { overflow: auto; overscroll-behavior: contain; background: var(--rd-paper); }
.kr-reviews .rd-capture-scroll:focus-visible { outline: 2px solid var(--rd-ink); outline-offset: -2px; }
.kr-reviews .rd-capture-thanks {
  margin: 12px 16px;
  padding: 12px 14px;
  border-radius: 6px;
  background: #d7dee8;
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.kr-reviews .rd-capture-scroll img { display: block; width: 100%; height: auto; margin-inline: auto; }

@media (max-width: 900px) {
  .kr-reviews .kr-reviews-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .kr-reviews .kr-reviews-heading {
    align-items: start;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
  }

  .kr-reviews .kr-reviews-heading p { font-size: 15px; }
  .kr-reviews .kr-reviews-feature { grid-template-columns: minmax(0, 1fr); gap: 15px; }

  .kr-reviews.kr-reviews-collection { padding-block: 22px; }
  .kr-reviews .kr-reviews-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .kr-reviews .kr-reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

  .kr-reviews .rd-capture-dialog {
    width: 100%;
    height: 100dvh;
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
  }
  .kr-reviews .rd-capture-panel { height: 100%; max-height: none; }
  .kr-reviews .rd-capture-thanks {
    margin-inline: 10px;
    padding-inline: 10px;
    font-size: 15px;
    word-break: normal;
  }
  .kr-reviews .rd-capture-footer { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
}

@media (max-width: 540px) {
  .kr-reviews .kr-reviews-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Featured review fills the same height as the three latest reviews beside it. */
@media (min-width: 761px) {
  .kr-reviews .kr-reviews-feature > section:first-child { display: flex; flex-direction: column; }
  .kr-reviews .kr-reviews-feature .rd-thumb-card--featured { display: flex; flex: 1 1 auto; flex-direction: column; }
  .kr-reviews .kr-reviews-feature .rd-thumb-card--featured > a { display: flex; flex: 1 1 auto; flex-direction: column; }
  .kr-reviews .kr-reviews-feature .rd-thumb-card--featured .rd-thumb-media { display: grid; flex: 1 1 auto; grid-template-rows: minmax(0, 1fr); }
  .kr-reviews .kr-reviews-feature .rd-thumb-card--featured .rd-thumb-art { aspect-ratio: auto; height: 100%; min-height: 12rem; }
}
