.ynfs {
  --ynfs-bg: #f5f7fa;
  --ynfs-panel: #fff;
  --ynfs-ink: #17202a;
  --ynfs-muted: #667789;
  --ynfs-line: #dce4ed;
  --ynfs-accent: #0f8b8d;
  --ynfs-accent-dark: #0a6d70;
  --ynfs-accent-soft: #e3f5f3;
  --ynfs-good: #16794c;
  --ynfs-bad: #b42318;
  --ynfs-bad-soft: #fff1f0;
  --ynfs-radius: 8px;
  color: var(--ynfs-ink);
  margin: 28px 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ynfs * {
  box-sizing: border-box;
}

.ynfs-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--ynfs-line);
  border-radius: var(--ynfs-radius);
  background: var(--ynfs-panel);
}

.ynfs p {
  margin-top: 0;
}

.ynfs-title {
  margin-bottom: 6px;
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0;
}

.ynfs-lead {
  margin-bottom: 0;
  color: var(--ynfs-muted);
}

.ynfs-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.ynfs-questions {
  position: static;
  border: 1px solid var(--ynfs-line);
  border-radius: var(--ynfs-radius);
  background: var(--ynfs-panel);
  overflow: hidden;
}

.ynfs-filter-head {
  padding: 18px;
  border-bottom: 1px solid var(--ynfs-line);
  background: var(--ynfs-panel);
}

.ynfs-filter-title {
  margin: 0;
  color: var(--ynfs-ink);
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.35;
}

.ynfs-filter-lead {
  margin: 6px 0 0;
  color: var(--ynfs-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.ynfs-step {
  margin: 0;
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid var(--ynfs-line);
}

.ynfs-question-title {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 0;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.45;
}

.ynfs-options {
  display: grid;
  gap: 7px;
}

.ynfs-option {
  position: relative;
  display: block;
  min-height: 66px;
  padding: 11px 42px 11px 12px;
  border: 1px solid var(--ynfs-line);
  border-radius: var(--ynfs-radius);
  background: #fff;
  cursor: pointer;
}

.ynfs-option:hover {
  border-color: var(--ynfs-accent);
}

.ynfs-option:has(input:checked) {
  border-color: var(--ynfs-accent);
  background: var(--ynfs-accent-soft);
  box-shadow: inset 0 0 0 1px var(--ynfs-accent);
}

.ynfs-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ynfs-option::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 13px;
  width: 24px;
  height: 24px;
  border: 2px solid #b9c7d5;
  border-radius: var(--ynfs-radius);
  transform: translateY(-50%);
  background: #fff;
}

.ynfs-option:has(input:checked)::after {
  content: "✓";
  display: grid;
  place-items: center;
  border-color: var(--ynfs-accent);
  background: var(--ynfs-accent);
  color: #fff;
  font-weight: 900;
  line-height: 1;
}

.ynfs-option strong,
.ynfs-option small {
  display: block;
}

.ynfs-option strong {
  line-height: 1.4;
}

.ynfs-option small {
  margin-top: 1px;
  color: var(--ynfs-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.ynfs-progress {
  padding: 12px 18px 16px;
  background: #fbfcfe;
}

.ynfs-progress > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--ynfs-muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.ynfs-progress-text,
.ynfs-progress-text span {
  display: inline-block;
  width: auto;
  min-width: 0;
  white-space: nowrap;
}

.ynfs-progress-track {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #e7edf5;
  overflow: hidden;
}

.ynfs-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--ynfs-accent);
  transition: width 0.2s ease;
}

.ynfs-results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 16px 18px;
  border: 1px solid var(--ynfs-line);
  border-radius: var(--ynfs-radius);
  background: var(--ynfs-panel);
}

.ynfs-results-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.35;
}

.ynfs-results-head span {
  min-width: 84px;
  padding: 8px 12px;
  border-radius: var(--ynfs-radius);
  background: var(--ynfs-accent-soft);
  color: var(--ynfs-accent-dark);
  text-align: center;
  font-weight: 900;
}

.ynfs-results {
  display: grid;
  gap: 14px;
}

.ynfs-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--ynfs-line);
  border-radius: var(--ynfs-radius);
  background: var(--ynfs-panel);
  box-shadow: 0 8px 22px rgba(31, 47, 70, 0.06);
}

.ynfs-card-media {
  align-self: start !important;
  width: 180px !important;
  height: 180px !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border-radius: var(--ynfs-radius) !important;
  background: transparent !important;
}

.ynfs-card-media img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  background: transparent !important;
}

.ynfs-card-media-placeholder::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
}

.ynfs-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 8px;
}

.ynfs-card-title {
  margin-bottom: 0;
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.35;
}

.ynfs-score {
  min-width: 116px;
  padding: 7px 10px;
  border-radius: var(--ynfs-radius);
  background: #eef8f2;
  color: var(--ynfs-good);
  text-align: center;
  font-weight: 900;
  white-space: nowrap;
}

.ynfs-card p {
  margin-bottom: 10px;
  color: var(--ynfs-muted);
}

.ynfs-match-list {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.ynfs-match-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #dfe6ef;
  border-radius: var(--ynfs-radius);
  background: #fbfcfe;
  font-size: 0.86rem;
}

.ynfs-match-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: var(--ynfs-radius);
  font-weight: 900;
  white-space: nowrap;
}

.ynfs-match-status.match {
  background: #eef8f2;
  color: var(--ynfs-good);
}

.ynfs-match-status.miss {
  background: var(--ynfs-bad-soft);
  color: var(--ynfs-bad);
}

.ynfs-match-empty,
.ynfs-empty {
  padding: 10px;
  border-radius: var(--ynfs-radius);
  background: #fbfcfe;
  color: var(--ynfs-muted);
}

.ynfs-empty {
  display: none;
  margin-top: 12px;
  border: 1px dashed #c7d2df;
  text-align: center;
}

.ynfs-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ynfs-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--ynfs-line);
  border-radius: var(--ynfs-radius);
  background: var(--ynfs-panel);
  color: var(--ynfs-ink);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.ynfs-button.primary {
  border-color: var(--ynfs-accent);
  background: var(--ynfs-accent);
  color: #fff;
}

.ynfs-button.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

@media (max-width: 620px) {
  .ynfs-hero,
  .ynfs-results-head,
  .ynfs-card-top {
    align-items: stretch;
    flex-direction: column;
  }

  .ynfs-card {
    grid-template-columns: 1fr;
  }

  .ynfs-card-media,
  .ynfs-card-media img {
    min-height: 0 !important;
  }

  .ynfs-card-media {
    width: 100% !important;
    height: 220px !important;
  }
}
