.rndf-tool {
  --rndf-accent: #fd9800;
  --rndf-dark: #24211f;
  --rndf-cream: #fef9e1;
  --rndf-soft: #f9f0c8;
  --rndf-white: #fff;
  --rndf-muted: #716a64;
  color: var(--rndf-dark);
  font-family: inherit;
  margin: 32px auto;
  max-width: 1180px;
}

.rndf-tool *,
.rndf-tool *::before,
.rndf-tool *::after {
  box-sizing: border-box;
}

.rndf-shell {
  background:
    radial-gradient(circle at 94% 8%, color-mix(in srgb, var(--rndf-accent) 16%, transparent), transparent 27%),
    linear-gradient(145deg, var(--rndf-cream), #fff 62%);
  border: 1px solid rgba(36, 33, 31, 0.12);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(57, 43, 29, 0.1);
  overflow: hidden;
  padding: clamp(24px, 5vw, 58px);
  position: relative;
}

.rndf-header {
  max-width: 760px;
}

.rndf-eyebrow,
.rndf-results-head span {
  color: var(--rndf-accent);
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.rndf-header h2,
.rndf-results-head h3 {
  color: var(--rndf-dark);
  font-family: "EB Garamond", Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.65rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0;
}

.rndf-header p {
  color: var(--rndf-muted);
  font-size: 1.04rem;
  line-height: 1.7;
  margin: 18px 0 0;
  max-width: 680px;
}

.rndf-form {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
}

.rndf-field label {
  color: var(--rndf-dark);
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.rndf-field select {
  appearance: none;
  background-color: var(--rndf-white);
  background-image: linear-gradient(45deg, transparent 50%, var(--rndf-dark) 50%), linear-gradient(135deg, var(--rndf-dark) 50%, transparent 50%);
  background-position: calc(100% - 18px) 51%, calc(100% - 13px) 51%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  border: 1px solid rgba(36, 33, 31, 0.18);
  border-radius: 12px;
  color: var(--rndf-dark);
  cursor: pointer;
  font: inherit;
  min-height: 50px;
  padding: 10px 42px 10px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.rndf-field select:focus {
  border-color: var(--rndf-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--rndf-accent) 18%, transparent);
  outline: 0;
}

.rndf-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.rndf-tool button,
.rndf-tool .rndf-card-link {
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.rndf-tool button:hover,
.rndf-tool .rndf-card-link:hover {
  transform: translateY(-2px);
}

.rndf-submit {
  background: var(--rndf-dark);
  border: 1px solid var(--rndf-dark);
  box-shadow: 0 10px 25px rgba(36, 33, 31, 0.18);
  color: #fff;
  min-height: 52px;
  padding: 14px 25px;
}

.rndf-submit:hover {
  background: var(--rndf-accent);
  border-color: var(--rndf-accent);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--rndf-accent) 28%, transparent);
}

.rndf-reset {
  background: transparent;
  border: 1px solid rgba(36, 33, 31, 0.2);
  color: var(--rndf-dark);
  min-height: 52px;
  padding: 14px 22px;
}

.rndf-status {
  color: var(--rndf-muted);
  font-size: 0.9rem;
  min-height: 1.4em;
}

.rndf-results {
  border-top: 1px solid rgba(36, 33, 31, 0.12);
  margin-top: 36px;
  padding-top: 34px;
}

.rndf-results[hidden] {
  display: none;
}

.rndf-results-head {
  align-items: end;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.rndf-results-head h3 {
  font-size: clamp(1.8rem, 3vw, 2.55rem);
}

.rndf-results-head p {
  color: var(--rndf-muted);
  font-size: 0.88rem;
  margin: 0;
  max-width: 360px;
  text-align: right;
}

.rndf-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rndf-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(36, 33, 31, 0.11);
  border-radius: 20px;
  box-shadow: 0 14px 32px rgba(57, 43, 29, 0.08);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.rndf-preview {
  align-items: end;
  background: linear-gradient(145deg, var(--rndf-soft), #fff7ea);
  display: flex;
  gap: 8px;
  height: 182px;
  justify-content: center;
  overflow: hidden;
  padding: 28px 22px 22px;
  position: relative;
}

.rndf-preview::after {
  background: rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  content: "";
  height: 150px;
  position: absolute;
  right: -54px;
  top: -64px;
  width: 150px;
}

.rndf-nail {
  background: var(--nail-color, #f5cab7);
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 22px 22px 10px 10px;
  box-shadow: 0 8px 17px rgba(36, 33, 31, 0.14), inset 0 4px 7px rgba(255, 255, 255, 0.35);
  display: block;
  height: 91px;
  position: relative;
  transform: rotate(var(--nail-rotate, 0deg));
  width: 38px;
  z-index: 1;
}

.rndf-nail:nth-child(1),
.rndf-nail:nth-child(5) {
  height: 70px;
}

.rndf-nail:nth-child(2),
.rndf-nail:nth-child(4) {
  height: 83px;
}

.rndf-nail::after {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.72), transparent 58%);
  border-radius: inherit;
  content: "";
  inset: 4px;
  position: absolute;
}

.rndf-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.rndf-card-kicker {
  color: var(--rndf-accent);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.rndf-card h4 {
  color: var(--rndf-dark);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.04;
  margin: 7px 0 10px;
}

.rndf-card p {
  color: var(--rndf-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
}

.rndf-swatches {
  display: flex;
  gap: 7px;
  margin: 16px 0 18px;
}

.rndf-swatch {
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(36, 33, 31, 0.16);
  height: 22px;
  width: 22px;
}

.rndf-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.rndf-card-link,
.rndf-card button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 38px;
  padding: 9px 13px;
}

.rndf-card-link {
  background: var(--rndf-dark);
  border: 1px solid var(--rndf-dark);
  color: #fff !important;
  flex: 1 1 100%;
}

.rndf-card button {
  background: #fff;
  border: 1px solid rgba(36, 33, 31, 0.18);
  color: var(--rndf-dark);
  flex: 1 1 auto;
}

.rndf-card button:focus-visible,
.rndf-card-link:focus-visible,
.rndf-tool button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--rndf-accent) 55%, #fff);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .rndf-form,
  .rndf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .rndf-tool {
    margin: 20px auto;
  }

  .rndf-shell {
    border-radius: 20px;
    padding: 24px 16px;
  }

  .rndf-form,
  .rndf-grid {
    grid-template-columns: 1fr;
  }

  .rndf-results-head {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }

  .rndf-results-head p {
    text-align: left;
  }

  .rndf-submit,
  .rndf-reset {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rndf-tool *,
  .rndf-tool *::before,
  .rndf-tool *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

