:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #1f2530;
  --muted: #667085;
  --line: #ead7e1;
  --soft: #fff6fa;
  --pink: #d74383;
  --pink-dark: #9f285e;
  --gold: #f5b301;
  --green: #167b45;
  --error-bg: #fdecec;
  --error: #a51d17;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

button,
textarea,
input {
  font: inherit;
}

.client-top {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 24px;
  background: var(--paper);
  border-bottom: 2px solid var(--pink);
}

.client-top img {
  width: auto;
  height: 44px;
  object-fit: contain;
}

.client-top .meta {
  text-align: right;
}

.client-top b {
  display: block;
  font-size: 13px;
}

.client-top span {
  color: var(--muted);
  font-size: 11px;
}

.client-wrap {
  width: 100%;
  margin: 0;
  padding: 18px 24px 30px;
  background: var(--paper);
}

.progress-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 18px;
}

.progress {
  height: 6px;
  overflow: hidden;
  background: #f0f1f4;
  border-radius: 99px;
}

.progress span {
  display: block;
  width: 12.5%;
  height: 100%;
  background: var(--pink);
  border-radius: inherit;
  transition: width 180ms ease;
}

.progress-label {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.section-panel {
  min-height: calc(100vh - 124px);
  padding: 0;
  background: var(--paper);
}

.section-kicker {
  display: none;
}

.section-panel h1 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
}

.screen-description {
  max-width: 620px;
  margin: 6px auto 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

#screenContent {
  width: 100%;
}

.question {
  width: min(100%, 1080px);
  margin: 0 auto;
}

.question-line {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 10px 0 12px;
  border-bottom: 1px dashed #dbcbd3;
}

.question-title {
  min-width: 0;
  text-align: center;
}

.question-title b {
  display: block;
  font-size: 15px;
  line-height: 1.3;
}

.question-title span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.stars {
  display: flex;
  justify-content: center;
  gap: 1px;
  white-space: nowrap;
}

.stars button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c9ccd0;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.stars button:hover,
.stars button:focus-visible,
.stars button.sel {
  color: var(--gold);
}

.stars button:focus-visible,
.btn:focus-visible,
.mode-card:focus-within,
.chips label:focus-within,
.work-select-card:focus-within {
  outline: 2px solid rgba(215, 67, 131, 0.35);
  outline-offset: 2px;
}

.follow {
  width: min(100%, 820px);
  display: grid;
  gap: 9px;
  margin: 12px auto 0;
}

.feedback-block {
  text-align: center;
}

.feedback-block b {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
}

.chips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
}

.chips label {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  cursor: pointer;
  font-size: 11px;
  text-align: left;
}

.chips label:has(input:checked) {
  background: var(--soft);
  border-color: var(--pink);
  color: var(--pink-dark);
}

.chips input {
  width: 13px;
  height: 13px;
  margin: 0;
}

textarea {
  width: 100%;
  min-height: 66px;
  padding: 8px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: var(--paper);
  font-size: 12px;
  line-height: 1.35;
}

textarea:focus {
  border-color: var(--pink);
  outline: 2px solid rgba(215, 67, 131, 0.12);
}

.actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid #d8c4ce;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--pink);
}

.btn.primary {
  background: var(--pink);
  border-color: var(--pink);
  color: #ffffff;
}

.btn[hidden] {
  display: none;
}

.mode-grid {
  width: min(100%, 780px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0 auto;
  border: 0;
}

.mode-grid legend {
  display: none;
}

.mode-card {
  min-height: 70px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  cursor: pointer;
}

.mode-card:has(input:checked) {
  background: var(--soft);
  border-color: var(--pink);
}

.mode-card input {
  margin-top: 2px;
}

.mode-card b {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.mode-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.selection-list {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 auto;
}

.work-select-card {
  min-height: 58px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
}

.work-select-card:has(input:checked) {
  background: var(--soft);
  border-color: var(--pink);
}

.work-select-card input {
  margin-top: 2px;
}

.work-select-card b,
.work-heading b,
.work-list b {
  display: block;
  font-size: 12px;
}

.work-select-card small,
.work-heading span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.work-list {
  width: min(100%, 820px);
  display: grid;
  gap: 5px;
  margin: 12px auto 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fffdfd;
}

.work-list > b {
  margin-bottom: 2px;
  text-align: center;
}

.work-row {
  display: grid;
  grid-template-columns: 100px 1fr 1fr 96px;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid #f0e4ea;
  color: var(--muted);
  font-size: 11px;
}

.work-row:first-of-type {
  border-top: 0;
}

.individual-list {
  width: min(100%, 1120px);
  display: grid;
  gap: 12px;
  margin: 0 auto;
}

.work-evaluation {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fffdfd;
}

.work-heading {
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
  text-align: left;
}

.work-evaluation .question,
.work-evaluation .question-line,
.work-evaluation .follow {
  width: 100%;
}

.error {
  display: none;
  width: min(100%, 820px);
  margin: 0 auto 12px;
  padding: 9px 10px;
  border: 1px solid #efb6b1;
  border-radius: 5px;
  background: var(--error-bg);
  color: var(--error);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.review {
  width: min(100%, 720px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 auto;
}

.review > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fffdfd;
  text-align: center;
}

.review span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.review b {
  display: block;
  font-size: 13px;
  line-height: 1.3;
}

.card {
  width: min(100%, 760px);
  margin: 0 auto 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.card-body {
  padding: 14px;
}

.card-body p {
  margin: 0 0 10px;
  line-height: 1.45;
}

.success {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 42px 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
}

.success .icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #e8f5ed;
  color: var(--green);
  font-size: 28px;
}

.success h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.success p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .client-top {
    align-items: flex-start;
    padding: 7px 10px;
  }

  .client-top img {
    height: 40px;
  }

  .client-wrap {
    padding: 12px 10px 24px;
  }

  .section-panel {
    min-height: calc(100vh - 110px);
  }

  .section-panel h1 {
    font-size: 19px;
  }

  .stars button {
    width: 33px;
    height: 33px;
    font-size: 27px;
  }

  .mode-grid,
  .selection-list,
  .review {
    grid-template-columns: 1fr;
  }

  .work-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .actions {
    justify-content: stretch;
  }

  .btn {
    flex: 1 1 140px;
  }
}

/* ===================================================================
   Motor de encuestas: estilos del runtime configurable
   =================================================================== */
.rt-shell .error {
  display: block;
}

.rt-shell .section-kicker {
  display: block;
  margin: 0 0 4px;
  color: var(--pink-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
}

.rt-shell.compact .section-panel {
  min-height: 0;
}

.stars {
  flex-wrap: wrap;
  align-items: center;
}

.stars-hint {
  width: 100%;
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.area-tag {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.intro-card {
  width: min(100%, 780px);
  margin: 0 auto;
  text-align: center;
}

.intro-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.intro-count {
  display: inline-grid;
  gap: 2px;
  margin: 6px auto 12px;
  padding: 12px 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.intro-count b {
  font-size: 30px;
  line-height: 1;
  color: var(--pink-dark);
}

.intro-count span {
  color: var(--muted);
  font-size: 11px;
}

.follow.is-low .feedback-block > b {
  color: var(--pink-dark);
}

.feedback-block .req,
.feedback-block .opt {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 99px;
  font-size: 9px;
  font-style: normal;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.feedback-block .req {
  background: #fdecec;
  color: var(--error);
}

.feedback-block .opt {
  background: #eef4ff;
  color: #2f5fa8;
}

.case-link {
  padding: 11px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #fffdfe;
}

.inline-choice {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.inline-choice label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
}

.inline-choice label:has(input:checked) {
  background: var(--soft);
  border-color: var(--pink);
  color: var(--pink-dark);
}

.selection-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dim-picker {
  width: min(100%, 820px);
  margin: 0 auto 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdfe;
  text-align: center;
}

.dim-picker > b {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
}

.option-list {
  display: grid;
  gap: 6px;
  width: min(100%, 520px);
  margin: 0 auto;
}

.option-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}

.option-list label:has(input:checked) {
  background: var(--soft);
  border-color: var(--pink);
}

.rt-input {
  width: min(100%, 520px);
  margin: 0 auto;
  display: block;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 13px;
}

.review-area {
  width: min(100%, 820px);
  margin: 12px auto 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.review-area header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 11px;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.review-area header span {
  color: var(--muted);
  font-size: 11px;
}

.review-row {
  display: grid;
  grid-template-columns: 1fr 70px 150px;
  gap: 8px;
  align-items: center;
  padding: 7px 11px;
  border-top: 1px solid #f4e9ef;
  font-size: 12px;
}

.review-row:first-of-type {
  border-top: 0;
}

.review-row b {
  color: var(--pink-dark);
  text-align: center;
}

.review-row small {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.muted {
  color: var(--muted);
}

.small,
p.muted.small {
  font-size: 11px;
  text-align: center;
}

.success.closed .icon {
  background: #fff4e5;
  color: #b26a00;
}

@media (max-width: 760px) {
  .review-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .review-row b,
  .review-row small {
    text-align: left;
  }
}
