/* Fellinora Quiz – Shared Components */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--c-tag);
  color: var(--c-acc);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-acc);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.5;
    transform: scale(1.6);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 11px 18px;
  border: 0;
  border-radius: var(--r-md);
  font-size: 0.88rem;
  font-weight: 700;
  transition: background 0.2s, box-shadow 0.2s, transform 0.25s var(--spring), opacity 0.2s;
}

.btn-primary {
  color: #fff;
  background: var(--c-acc);
  box-shadow: 0 4px 20px rgba(123, 92, 245, 0.3);
}

.btn-primary:hover {
  background: var(--c-acc-d);
  box-shadow: 0 8px 28px rgba(123, 92, 245, 0.35);
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.97);
}

.btn-ghost {
  border: 1.5px solid rgba(123, 92, 245, 0.18);
  color: var(--c-muted);
  background: transparent;
}

.btn-ghost:hover {
  color: var(--c-acc);
  background: var(--c-lav);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  transform: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  color: var(--c-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-label {
  color: var(--c-muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field input,
.field textarea,
.field select,
select {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid rgba(123, 92, 245, 0.18);
  border-radius: var(--r-md);
  outline: none;
  color: var(--c-ink);
  background: var(--c-surface);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237B5CF5' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
select:focus {
  border-color: var(--c-acc);
  box-shadow: 0 0 0 3px rgba(123, 92, 245, 0.12);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.val-hint,
.error-box {
  color: var(--c-err);
  font-size: 0.78rem;
}

.val-hint {
  display: none;
}

.val-hint.show {
  display: block;
}

.error-box {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--c-err-bg);
}

.chips,
.disease-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chips.nowrap {
  flex-wrap: nowrap;
  gap: 12px;
  width: auto;
  overflow-x: auto;
  padding-bottom: 4px;
}

.chips.nowrap .chip {
  flex: 0 0 auto;
}

.chips.nowrap .chip span {
  justify-content: center;
  width: auto;
  min-height: 58px;
  padding-right: 22px;
  padding-left: 22px;
  text-align: center;
  white-space: nowrap;
  font-size: 0.92rem;
  letter-spacing: 0;
  line-height: 1.15;
}

@media (max-width: 620px) {
  .chips.nowrap .chip span {
    padding-right: 16px;
    padding-left: 16px;
    font-size: 0.86rem;
  }
}

.chip,
.d-chip {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.chip input,
.d-chip input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.chip span,
.d-chip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1.5px solid rgba(123, 92, 245, 0.18);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-ink);
  font-size: 0.9rem;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s, transform 0.25s var(--spring), color 0.2s;
}

.chip:hover span,
.d-chip:hover span {
  border-color: var(--c-acc);
  color: var(--c-acc-d);
  background: var(--c-lav);
  box-shadow: 0 4px 16px rgba(123, 92, 245, 0.12);
  transform: translateY(-1px);
}

.chip.selected span,
.d-chip.selected span,
.chip input:checked + span,
.d-chip input:checked + span {
  border-color: var(--c-acc);
  color: var(--c-acc-d);
  background: var(--c-lav);
  box-shadow: 0 0 0 3px rgba(123, 92, 245, 0.14);
}

.chip:active span,
.d-chip:active span {
  transform: scale(0.96);
  transition-duration: 0.08s;
}

.info-banner,
.fact-box,
.weight-banner {
  padding: 14px 18px;
  border-radius: var(--r-md);
  color: var(--c-acc-d);
  background: var(--c-lav);
  font-size: 0.88rem;
  line-height: 1.55;
}

.info-banner {
  border-left: 3px solid var(--c-acc);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

.weight-banner.ok {
  color: var(--c-ok);
  background: var(--c-ok-bg);
}

.weight-banner.low {
  color: var(--c-warn);
  background: var(--c-warn-bg);
}

.weight-banner.high {
  color: var(--c-err);
  background: var(--c-err-bg);
}

.weight-banner {
  border-left: 3px solid currentColor;
}

.weight-banner strong {
  display: block;
  margin-bottom: 3px;
  font-weight: 600;
}

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

@media (min-width: 700px) {
  .card-grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.placeholder-img {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--c-acc);
  background: var(--c-lav);
  font-size: 2rem;
}


.allergy-item,
button.d-chip {
  border: 0;
  text-align: inherit;
}

.allergy-item,
button.d-chip {
  background: transparent;
}
