/* Yüz Şekli Bulucu — aracın kendi parçaları. Temel (renkler, kart, düğme, ipucu, SSS) /tests/quiz.css'ten gelir.
   Telefon önce: kamera alanı 3:4, en çok 440 px; yazılar kameranın DIŞINDA ya da üstünde okunur kontrastta. */

.fs-card {
  overflow: hidden;
}

.fs-start {
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.fs-start-art {
  aspect-ratio: 3 / 4;
  background: var(--plum);
  border-radius: 22px;
  display: grid;
  max-width: 260px;
  overflow: hidden;
  place-items: center;
  position: relative;
  width: 62%;
}

.fs-start-art img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  opacity: 0.92;
  position: absolute;
  width: 100%;
}

.fs-start-art svg {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.fs-start h2 {
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-wrap: balance;
}

.fs-start p {
  color: var(--ink-2);
  max-width: 44ch;
}

.fs-buttons {
  display: grid;
  gap: 10px;
  max-width: 360px;
  width: 100%;
}

.fs-buttons .btn {
  font-size: 17px;
  min-height: 52px;
  width: 100%;
}

.fs-buttons .btn svg {
  height: 20px;
  margin-inline-end: 8px;
  width: 20px;
}

.fs-private {
  align-items: center;
  color: var(--ink-3);
  display: inline-flex;
  font-size: 13px;
  gap: 6px;
  line-height: 1.4;
  max-width: 40ch;
  text-align: start;
}

.fs-private svg {
  flex: none;
  height: 16px;
  width: 16px;
}

/* ── kamera ─────────────────────────────────────────────── */
.fs-stage {
  aspect-ratio: 3 / 4;
  background: var(--plum);
  border-radius: 22px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  /* ekrana sığsın: ipucu satırı ve "Vazgeç" kaydırmadan görünsün */
  width: min(100%, 440px, calc((100vh - 150px) * 3 / 4));
  width: min(100%, 440px, calc((100svh - 150px) * 3 / 4));
}

.fs-video {
  display: block;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  width: 100%;
}

.fs-overlay {
  height: 100%;
  inset: 0;
  pointer-events: none;
  position: absolute;
  width: 100%;
}

.fs-ring-base {
  fill: none;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-dasharray: 6 9;
  stroke-width: 2.5;
}

.fs-ring {
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-width: 5;
  transition: stroke-dashoffset 0.18s linear, stroke 0.2s ease;
}

.fs-stage.is-good .fs-ring-base {
  stroke: rgba(255, 255, 255, 0.85);
  stroke-dasharray: none;
}

.fs-stage.is-done .fs-ring {
  stroke: var(--accent);
}

.fs-hint {
  background: rgba(29, 14, 21, 0.78);
  border-radius: 999px;
  bottom: 18px;
  color: var(--on-dark);
  font-size: 16px;
  font-weight: 600;
  inset-inline: 0;
  line-height: 1.3;
  margin: 0 auto;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  position: absolute;
  text-align: center;
  width: max-content;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.fs-stage-bar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 12px auto 0;
  width: min(100%, 440px, calc((100vh - 150px) * 3 / 4));
  width: min(100%, 440px, calc((100svh - 150px) * 3 / 4));
}

.fs-stage-bar .ghost {
  font-size: 15px;
}

.fs-count {
  color: var(--ink-3);
  font-size: 13px;
}

/* ── hazırlanıyor ───────────────────────────────────────── */
.fs-wait {
  align-items: center;
  display: grid;
  gap: 14px;
  justify-items: center;
  padding-block: 40px;
  text-align: center;
}

.fs-spin {
  animation: fs-spin 0.9s linear infinite;
  border: 3px solid var(--accent-soft);
  border-radius: 50%;
  border-top-color: var(--accent);
  height: 38px;
  width: 38px;
}

@keyframes fs-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fs-spin {
    animation-duration: 2.4s;
  }
  .fs-ring {
    transition: none;
  }
}

.fs-wait p {
  color: var(--ink-2);
}

/* ── hata / yeniden dene ─────────────────────────────────── */
.fs-error {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding-block: 18px;
  text-align: center;
}

.fs-error h2 {
  font-size: 21px;
  line-height: 1.3;
  text-wrap: balance;
}

.fs-error p {
  color: var(--ink-2);
  max-width: 44ch;
}

.fs-error img {
  border-radius: 16px;
  max-height: 220px;
  max-width: 70%;
  object-fit: cover;
}

/* ── sonuç ──────────────────────────────────────────────── */
.fs-res-head {
  align-items: center;
  display: flex;
  gap: 16px;
}

.fs-res-face {
  border-radius: 18px;
  flex: none;
  height: 112px;
  object-fit: cover;
  width: 90px;
}

.fs-level {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 10px;
}

.fs-level.firm {
  background: var(--accent-soft);
  color: var(--accent);
}

.fs-level.soft {
  background: var(--bg-blush);
  color: var(--ink-2);
}

.fs-meters {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.fs-meter-top {
  display: flex;
  font-size: 14px;
  font-weight: 600;
  justify-content: space-between;
}

.fs-bar {
  background: linear-gradient(90deg, var(--bg-blush), var(--accent-soft));
  border-radius: 999px;
  height: 10px;
  margin-top: 8px;
  position: relative;
}

.fs-bar i {
  background: var(--accent);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(29, 14, 21, 0.25);
  height: 20px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
}

[dir="rtl"] .fs-bar i {
  transform: translate(50%, -50%);
}

.fs-meter-ends {
  color: var(--ink-3);
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  margin-top: 6px;
}

.fs-guide {
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  display: flex;
  font-weight: 600;
  gap: 12px;
  justify-content: space-between;
  margin-top: 18px;
  padding: 14px 16px;
  text-decoration: none;
}

.fs-guide:hover {
  border-color: var(--accent);
}

.fs-guide span:last-child {
  color: var(--accent);
}

[dir="rtl"] .fs-guide span:last-child {
  transform: scaleX(-1);
}

.fs-app {
  background: var(--plum);
  border-radius: 20px;
  color: var(--on-dark);
  margin-top: 22px;
  padding: 20px;
}

.fs-app h3 {
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.fs-app p {
  color: var(--on-dark-2);
  font-size: 15px;
  margin-top: 8px;
}

.fs-app ul {
  display: grid;
  gap: 6px;
  list-style: none;
  margin-top: 12px;
}

.fs-app li {
  align-items: flex-start;
  color: var(--on-dark);
  display: flex;
  font-size: 14px;
  gap: 8px;
}

.fs-app li::before {
  background: var(--accent);
  border-radius: 50%;
  content: "";
  flex: none;
  height: 7px;
  margin-top: 8px;
  width: 7px;
}

.fs-app .stores {
  margin-top: 16px;
}

.fs-app .stores-label {
  color: var(--on-dark-2);
}

.fs-canvas {
  display: none;
}

/* başlangıç: 4 yüz şekli küçük portresi (görsel /guides/img, yüzün üstüne çizim YOK) */
.fs-faces {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 420px;
  width: 100%;
}

.fs-faces figure {
  display: grid;
  gap: 6px;
}

.fs-faces img {
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.fs-faces figcaption {
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
}

/* ── sonuç: ayrıntılı açıklama ───────────────────────────── */
.fs-summary {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
  margin-top: 16px;
}

.fs-sec {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
}

.fs-sec h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

[lang="ar"] .fs-sec h3 {
  letter-spacing: 0;
}

.fs-sec > p {
  color: var(--ink-2);
  margin-top: 8px;
}

.fs-sec .fs-meters {
  margin-top: 14px;
}

.fs-say {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.4;
  margin-top: 6px;
}

/* makyaj haritası: aynı portre üç kez (allık · kontür · aydınlatıcı); kurallar guide.css'teki şemalarla aynı */
.fs-map .pf-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.fs-map .pf {
  margin: 0;
}

.fs-map .pf figcaption {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
  margin-top: 7px;
  text-align: center;
}

.fs-map .ph {
  background: #efe8e3;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.fs-map .ph img {
  display: block;
  height: auto;
  width: 100%;
}

.fs-map .ph svg {
  height: 100%;
  inset: 0;
  pointer-events: none;
  position: absolute;
  width: 100%;
}

.fs-map .pz-multiply {
  mix-blend-mode: multiply;
}

.fs-map .pz-screen {
  mix-blend-mode: screen;
}

[dir="rtl"] .fs-map svg {
  direction: ltr;
}

.fs-steps {
  display: grid;
  gap: 8px;
  list-style: none;
  margin-top: 12px;
}

.fs-steps li {
  background: var(--bg);
  border-radius: 14px;
  display: grid;
  gap: 3px;
  padding: 12px 14px;
}

.fs-steps strong {
  font-size: 15px;
}

.fs-steps span {
  color: var(--ink-2);
  line-height: 1.45;
}

.fs-avoid {
  background: var(--accent-soft);
  border-radius: 14px;
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 12px 14px;
}

.fs-avoid strong {
  color: var(--accent);
  font-size: 15px;
}

.fs-avoid span {
  color: var(--ink);
  line-height: 1.45;
}

/* başlangıç: üç kısa talimat (numaralı) */
.fs-start-tips {
  counter-reset: fs;
  display: grid;
  gap: 8px;
  list-style: none;
  max-width: 360px;
  text-align: start;
  width: 100%;
}

.fs-start-tips li {
  align-items: center;
  background: var(--bg);
  border-radius: 14px;
  counter-increment: fs;
  display: flex;
  font-weight: 600;
  gap: 12px;
  padding: 10px 14px;
}

.fs-start-tips li::before {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 50%;
  color: var(--accent);
  content: counter(fs);
  display: inline-flex;
  flex: none;
  font-size: 13px;
  font-weight: 700;
  height: 26px;
  justify-content: center;
  width: 26px;
}

/* ── hesaplanıyor (10 sn; yüzün üstüne çizim yok) ─────────── */
.fs-analyze {
  display: grid;
  gap: 16px;
  justify-items: center;
  padding-block: 8px 4px;
  text-align: center;
}

.fs-an-face {
  animation: fs-pulse 1.6s ease-in-out infinite;
  border-radius: 20px;
  box-shadow: 0 0 0 4px var(--accent-soft);
  height: 188px;
  object-fit: cover;
  width: 150px;
}

@keyframes fs-pulse {
  50% {
    box-shadow: 0 0 0 10px var(--accent-soft);
  }
}

.fs-analyze h2 {
  font-size: 21px;
  line-height: 1.3;
}

.fs-an-bar {
  background: var(--accent-soft);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
  width: min(100%, 360px);
}

.fs-an-bar span {
  background: var(--accent);
  display: block;
  height: 100%;
  transition-property: width;
  transition-timing-function: linear;
  width: 0;
}

.fs-an-steps {
  display: grid;
  gap: 12px;
  list-style: none;
  text-align: start;
  width: min(100%, 360px);
}

.fs-an-steps li {
  align-items: center;
  color: var(--ink-3);
  display: flex;
  font-weight: 600;
  gap: 12px;
  line-height: 1.35;
  transition: color 0.3s ease;
}

.fs-an-steps i {
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  flex: none;
  height: 24px;
  position: relative;
  width: 24px;
}

.fs-an-steps li.is-active,
.fs-an-steps li.is-done {
  color: var(--ink);
}

.fs-an-steps li.is-active i {
  animation: fs-spin 0.9s linear infinite;
  border-color: var(--accent-soft);
  border-top-color: var(--accent);
}

.fs-an-steps li.is-done i {
  background: var(--accent);
  border-color: var(--accent);
}

.fs-an-steps li.is-done i::after {
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  content: "";
  height: 11px;
  left: 7px;
  position: absolute;
  top: 3px;
  transform: rotate(45deg);
  width: 5px;
}

@media (prefers-reduced-motion: reduce) {
  .fs-an-face {
    animation: none;
  }
  .fs-an-steps li.is-active i {
    animation-duration: 2.4s;
  }
}

/* Arapça: ipucu numaraları metindeki gibi Arapça rakamla */
:lang(ar) .fs-start-tips li::before {
  content: counter(fs, arabic-indic);
}

/* ── Dergi düzeni (2026-11-12): bölüm başlıkları büyük harfli küçük etiket yerine serif başlık (guide.css ile aynı dil) */
.fs-sec h3 {
  font-family: var(--serif, Georgia, serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
[dir="rtl"] .fs-sec h3 {
  font-family: inherit;
}
