.review-qr {
  --review-qr-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --review-qr-body: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.review-qr-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.review-qr-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border-color, #c9cfcb);
  border-radius: 999px;
  cursor: pointer;
}

.review-qr-choice:has(input:checked) {
  border-color: currentColor;
  font-weight: 600;
}

.review-qr-choice:has(input:focus-visible) {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.review-qr-swatch {
  padding: 0.3rem;
}

.review-qr-swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.review-qr-swatch span {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
}

.review-qr-colour-group,
.review-qr-language-group,
.rq-print-empty,
.review-qr-sheet,
.rq-line {
  display: none;
}

.review-qr:has(#review-qr-frame-band:checked) .review-qr-colour-group,
.review-qr:has(#review-qr-frame-bilingual:checked) .review-qr-language-group {
  display: block;
}

.review-qr:has(#review-qr-frame-band:checked) .review-qr-sheet[data-frame="band"],
.review-qr:has(#review-qr-frame-classic:checked) .review-qr-sheet[data-frame="classic"],
.review-qr:has(#review-qr-frame-bilingual:checked) .review-qr-sheet[data-frame="bilingual"],
.review-qr:has(#review-qr-frame-quiet:checked) .review-qr-sheet[data-frame="quiet"] {
  display: block;
}

.review-qr:has(#review-qr-language-malayalam:checked) .rq-line[data-language="malayalam"],
.review-qr:has(#review-qr-language-hindi:checked) .rq-line[data-language="hindi"],
.review-qr:has(#review-qr-language-tamil:checked) .rq-line[data-language="tamil"] {
  display: block;
}

.review-qr-sheets {
  display: grid;
  gap: 1rem;
}

.review-qr-sheet {
  position: relative;
  width: 100%;
  max-width: 26rem;
  margin-inline: auto;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20, 30, 25, 0.14), 0 8px 24px rgba(20, 30, 25, 0.12);
  color-scheme: light;
}

.review-qr-page {
  position: absolute;
  inset: 0;
  container-type: size;
}

.review-qr-page > div {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--review-qr-body);
}

.review-qr-page .rq-headline {
  margin: 0;
  font-family: var(--review-qr-display);
  font-weight: 800;
  letter-spacing: normal;
  text-wrap: balance;
  color: inherit;
}

.rq-code-image,
.rq-code-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 1;
}

.rq-code-placeholder {
  background: repeating-linear-gradient(45deg, #e4e7e5 0 2cqw, #eef0ef 2cqw 4cqw);
}

.rq-stars {
  display: flex;
  justify-content: center;
  gap: 1.6cqw;
}

.rq-stars svg {
  width: 7cqw;
  height: 7cqw;
  color: #f2a900;
}

.rq-name {
  font-family: var(--review-qr-display);
  font-weight: 700;
  font-size: 5cqw;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.rq-name.is-long {
  font-size: 3.8cqw;
}

.rq-quiet .rq-name.is-long {
  font-size: 5cqw;
}

.rq-name.is-placeholder {
  opacity: 0.45;
}

.rq-hint {
  font-size: 3.1cqw;
  opacity: 0.7;
}

.rq-band {
  display: grid;
  grid-template-rows: 48% 1fr;
  background: #fbfaf6;
  color: #1b1f1d;
}

.rq-band-top {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 3cqw;
  padding: 9cqw 8cqw 0;
  text-align: center;
  background: var(--review-qr-band);
  color: #f4f7f2;
}

.rq-band .rq-stars svg {
  color: #ffd25a;
}

.rq-band .rq-headline {
  font-size: 10cqw;
  line-height: 1;
}

.rq-band .rq-headline span {
  display: block;
  white-space: nowrap;
}

.rq-sub {
  margin: 0;
  font-size: 3.6cqw;
  opacity: 0.85;
}

.rq-band .rq-code {
  position: absolute;
  left: 50%;
  top: 37%;
  transform: translateX(-50%);
  width: 54cqw;
  padding: 4.5cqw;
  box-sizing: border-box;
  background: #fff;
  border-radius: 4cqw;
  box-shadow: 0 2cqw 6cqw rgba(0, 0, 0, 0.18);
}

.rq-band .rq-foot {
  grid-row: 2;
  align-self: end;
  display: grid;
  gap: 1.5cqw;
  padding: 0 8cqw 8cqw;
  text-align: center;
}

.rq-classic {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: center;
  gap: 3.2cqw;
  padding: 10cqw 9cqw 8cqw;
  text-align: center;
  background: #fff;
  color: #1b1f1d;
}

.rq-kicker {
  font-weight: 600;
  font-size: 3.3cqw;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.65;
}

.rq-classic .rq-headline {
  font-size: 9.6cqw;
  line-height: 1.02;
}

.rq-classic .rq-code {
  align-self: center;
  width: 56cqw;
  padding: 3cqw;
  box-sizing: border-box;
  border: 0.6cqw solid #1b1f1d;
  border-radius: 3cqw;
}

.rq-classic .rq-foot,
.rq-bilingual .rq-foot {
  display: grid;
  gap: 1cqw;
}

.rq-bilingual {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: center;
  gap: 2.6cqw;
  padding: 9cqw 8cqw 7cqw;
  text-align: center;
  background: #fff8ec;
  color: #2a1d0e;
  border: 2.2cqw solid #b4471c;
}

.rq-bilingual .rq-headline {
  font-size: 8.4cqw;
  line-height: 1.05;
}

.rq-line {
  font-family: "Noto Sans Malayalam", "Noto Sans Devanagari", "Noto Sans Tamil", var(--review-qr-body);
  font-weight: 700;
  font-size: 4.6cqw;
  line-height: 1.5;
  color: #8a3613;
  text-wrap: balance;
}

.rq-bilingual .rq-code {
  align-self: center;
  width: 52cqw;
  padding: 3cqw;
  box-sizing: border-box;
  background: #fff;
  border-radius: 2cqw;
}

.rq-bilingual .rq-stars svg {
  color: #d98a00;
}

.rq-quiet {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 4cqw;
  padding: 9cqw;
  background: #fff;
  color: #111;
}

.rq-top {
  display: grid;
  gap: 2.4cqw;
}

.rq-quiet .rq-name {
  font-weight: 800;
  font-size: 7.2cqw;
  line-height: 1.05;
}

.rq-rule {
  width: 16cqw;
  height: 0.5cqw;
  background: #111;
}

.rq-quiet .rq-headline {
  font-family: var(--review-qr-body);
  font-weight: 500;
  font-size: 5.2cqw;
  line-height: 1.3;
  color: #333;
}

.rq-quiet .rq-code {
  align-self: center;
  justify-self: center;
  width: 60cqw;
}

.rq-bottom {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 4cqw;
  font-size: 3cqw;
  color: #555;
}

.rq-bottom .rq-stars {
  justify-content: start;
}

.rq-bottom .rq-stars svg {
  width: 5cqw;
  height: 5cqw;
  color: #111;
}

.review-qr-print {
  display: grid;
  gap: 0.5rem;
  max-width: 26rem;
  width: 100%;
  margin-inline: auto;
}

.rq-print-note {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.75;
  text-align: center;
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  body :not(:has(.review-qr-print-target)):not(.review-qr-print-target):not(.review-qr-print-target *) {
    display: none !important;
  }

  .rq-print-empty {
    display: block;
    margin: 2cm;
    font-size: 14pt;
    color: #000;
  }

  .review-qr-sheet.review-qr-print-target {
    position: fixed;
    inset: 0;
    width: 210mm;
    max-width: none;
    height: 297mm;
    margin: 0;
    box-shadow: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
