@import url('themes.css');
/* ═══════════════════════════════════════════════════════════════
   SendenSana — Güvenli Kapı (js/SafeExit.js ile birlikte)
   Sayfa aracı (.sx) · tam ekran katman (.sx--overlay) · "Bunaldım" düğmesi (.sx-trigger)
   Renkler YALNIZ css/themes.css belirteçlerinden; Ses Hattı görünümü.
   ═══════════════════════════════════════════════════════════════ */
.sx, .sx-trigger {
  --sx-display: 'Bricolage Grotesque', 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --sx-body: 'Karla', 'Helvetica Neue', Arial, sans-serif;
  --sx-mono: 'JetBrains Mono', Consolas, 'Courier New', monospace;
}
.sx {
  position: relative;
  display: flex;
  min-height: min(78vh, 640px);
  background: radial-gradient(75% 75% at 50% 42%, var(--th-bg2), var(--th-bg1) 72%);
  color: var(--th-ink);
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  font-family: var(--sx-body);
  text-align: start;
}
.sx *, .sx *::before, .sx *::after { box-sizing: border-box; }
.sx [hidden] { display: none !important; }

.sx--overlay {
  position: fixed; inset: 0; z-index: 2147483000; min-height: 100%; border-radius: 0;
  overflow-y: auto; overscroll-behavior: contain;
  animation: sx-fade 0.35s ease-out;
}
.sx--overlay .sx-top { max-width: 960px; margin-inline: auto; }
@keyframes sx-fade { from { opacity: 0; } to { opacity: 1; } }

.sx-stage {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 64px 20px 36px; outline: none; min-width: 0;
}
.sx-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--th-in); }

/* ── Üst şerit: toplam ilerleme · adım · ses · kapat ── */
.sx-top {
  position: absolute; top: 14px; inset-inline: 16px; display: flex; align-items: center; gap: 10px;
}
.sx-total { flex: 1; height: 3px; border-radius: 3px; background: var(--th-line); overflow: hidden; }
.sx-total i { display: block; height: 100%; width: 0; background: var(--th-in); border-radius: inherit; transition: width 0.2s linear; }
.sx-top--quiet .sx-total { visibility: hidden; }
.sx-count {
  font-family: var(--sx-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--th-muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sx-icon {
  appearance: none; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border-radius: 999px; border: 1px solid var(--th-line); background: var(--th-chip); color: var(--th-ink); cursor: pointer;
}
.sx-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sx-icon[data-act="voice"] svg path:first-child { fill: currentColor; stroke: none; }
.sx-icon[aria-pressed="false"] .sx-wave { opacity: 0.25; }
.sx-icon[aria-pressed="true"] { border-color: var(--th-in); color: var(--th-in); }
.sx-icon:hover { border-color: var(--th-line2); }
.sx-icon:focus-visible, .sx-btn:focus-visible, .sx-link:focus-visible { outline: 2px solid var(--th-in); outline-offset: 2px; }

/* ── Bölümler ── */
.sx-intro, .sx-run, .sx-done {
  display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; max-width: 560px; text-align: center;
}
.sx-run { flex: 1; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sx-name {
  margin: 0; font-family: var(--sx-display); font-weight: 700; font-size: clamp(1.8rem, 5vw, 2.5rem);
  letter-spacing: -0.02em; line-height: 1.1; color: var(--th-ink); outline: none;
}
.sx-lead { margin: 0; max-width: 42ch; color: var(--th-soft); font-size: 1.02rem; line-height: 1.6; }
.sx-small { margin: 0; max-width: 46ch; color: var(--th-faint); font-size: 0.8rem; line-height: 1.5; }

/* Çapa: yavaş, nefes ritmi dayatmayan yumuşak halkalar */
.sx-anchor { position: relative; width: 132px; aspect-ratio: 1; margin-bottom: 6px; }
.sx-anchor span {
  position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--th-line2);
  animation: sx-settle 9s ease-in-out infinite;
}
.sx-anchor span:nth-child(2) { inset: 18%; border-color: var(--th-out); opacity: 0.7; animation-delay: -3s; }
.sx-anchor span:nth-child(3) {
  inset: 38%; border: 0; background: radial-gradient(circle, var(--th-in), transparent 70%); opacity: 0.55; animation-delay: -6s;
}
@keyframes sx-settle { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.sx--paused .sx-anchor span { animation-play-state: paused; }

.sx-say { display: grid; gap: 12px; justify-items: center; min-height: 9.5em; align-content: start; }
.sx-title {
  margin: 0; font-family: var(--sx-display); font-weight: 700; font-size: clamp(1.7rem, 5.4vw, 2.4rem);
  letter-spacing: -0.02em; line-height: 1.12; color: var(--th-ink);
}
.sx-hint { margin: 0; max-width: 38ch; color: var(--th-soft); font-size: clamp(1.02rem, 2.6vw, 1.14rem); line-height: 1.6; }

.sx-marks { display: flex; gap: 12px; justify-content: center; min-height: 14px; }
.sx-marks span {
  width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--th-line2); background: transparent;
  transition: background 0.5s, border-color 0.5s, transform 0.5s;
}
.sx-marks span.on { background: var(--th-in); border-color: var(--th-in); transform: scale(1.1); }

.sx-stepbar { width: min(100%, 260px); height: 2px; border-radius: 2px; background: var(--th-line); overflow: hidden; }
.sx-stepbar i { display: block; height: 100%; width: 0; background: var(--th-hold); transition: width 0.15s linear; }

.sx-ctrl { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.sx-btn {
  appearance: none; border: 1px solid var(--th-line); background: var(--th-panel); color: var(--th-ink);
  font: 600 0.95rem/1.2 var(--sx-body); min-height: 46px; min-width: 46px; padding: 11px 22px; border-radius: 999px; cursor: pointer;
}
.sx-btn:hover { border-color: var(--th-line2); }
.sx-btn--main { background: var(--th-chip-on); color: var(--th-chip-on-ink); border-color: transparent; padding-inline: 30px; }
.sx-btn--main:hover { filter: brightness(1.08); }
.sx-tap { opacity: 0.85; }

/* ── Kapanış ── */
.sx-care {
  display: grid; gap: 10px; justify-items: center; width: 100%; padding: 18px 18px 16px; border-radius: 18px;
  background: var(--th-panel); border: 1px solid var(--th-line);
}
.sx-care p { margin: 0; color: var(--th-muted); font-size: 0.92rem; line-height: 1.55; }
.sx-care .sx-danger { color: var(--th-ink); font-weight: 600; }
.sx-link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--th-line2); color: var(--th-in); text-decoration: none; font-weight: 600; font-size: 0.9rem;
}
.sx-link:hover { border-color: var(--th-in); }

/* ── "Bunaldım" düğmesi ── */
.sx-trigger {
  appearance: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 15px 8px 12px;
  border-radius: 999px; border: 1px solid var(--th-line2); background: var(--th-panel); color: var(--th-soft);
  font: 500 0.88rem/1.2 var(--sx-body); cursor: pointer; box-sizing: border-box;
  transition: border-color 0.2s, color 0.2s;
}
.sx-trigger svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sx-trigger:hover { border-color: var(--th-in); color: var(--th-ink); }
.sx-trigger:focus-visible { outline: 2px solid var(--th-in); outline-offset: 2px; }

@media (max-width: 520px) {
  .sx { border-radius: 20px; }
  .sx--overlay { border-radius: 0; }
  .sx-stage { padding: 60px 16px 28px; gap: 14px; }
  .sx-anchor { width: 104px; }
  .sx-say { min-height: 11em; }
}
@media (prefers-reduced-motion: reduce) {
  .sx-anchor span, .sx--overlay { animation: none; }
  .sx-marks span, .sx-total i, .sx-stepbar i { transition: none; }
}
.sx--still .sx-anchor span, .sx--still.sx--overlay { animation: none; }
/* Bitişik / hece yazılarında harf aralığı ve eş-genişlikli yazı kelimeyi koparır → gövde yazısı */
.sx:is(:lang(ar), :lang(hi), :lang(th), :lang(ja), :lang(ko), :lang(zh)) .sx-count { letter-spacing: 0; font-family: var(--sx-body); font-size: 0.8rem; }
.sx:is(:lang(ar), :lang(hi), :lang(th), :lang(ja), :lang(ko), :lang(zh)) :is(.sx-title, .sx-name) { letter-spacing: 0; }
