/* Rastgele Harf sayfası. Palet, bilet kartı, buton, sonuç etiketi, mühür, sarsıntı ve confetti canvas'ı style.css'ten gelir. */

.tool-head {
  text-align: center;
  margin-bottom: 20px;
}
.tool-head h1 {
  font-size: clamp(1.7rem, 7vw, 2.2rem);
  margin: 0 0 6px;
}
.tool-head p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Kart kenar boşlukları sıkı tutulur ki 360x640'ta buton ilk ekrana sığsın (çentikler --pad-x'e bağlı, birlikte kayar). */
.ticket {
  --pad-x: 20px;
  --btn-gap: 16px;
  padding: 20px var(--pad-x) 20px;
}

/* ---- Tekrar kutusu ---- */
.rh-repeat {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  color: var(--text);
  font-size: 0.92rem;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.15s ease;
}
.rh-repeat input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  cursor: inherit;
}
.rh-repeat input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.rh-repeat:has(input:disabled) {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---- Mesaj: tek satır, yer her zaman ayrılı ---- */
.rh-msg {
  height: 1.3rem;
  margin: 4px 0 var(--btn-gap);   /* çentikler bu boşluğun ortasında */
  color: var(--accent-2);
  font-size: 0.8rem;
  line-height: 1.3rem;
  white-space: nowrap;
}

/* "Baştan başla" metnindeki ş başka bir yazı tipi alt kümesinden gelir ve satır yüksekliğini 1 px büyütür;
   düğme yüksekliği (54 px) metinden bağımsız sabitlenir, kart zıplamaz. */
#goBtn { line-height: 22px; }

/* ---- Sonuç alanı: sabit yükseklik, harf değişirken kart oynamaz ---- */
.rh-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-top: 20px;
}
.rh-area > * { grid-area: 1 / 1; }

.rh-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow-x: clip;   /* mühür animasyonu büyük başlar; yatay taşma kaydırma çubuğu açmasın */
}
/* Etiket satır yüksekliği sabit (Inter geç yüklenirse alan 2 px oynamasın). */
.rh-view .result-label { visibility: hidden; line-height: 14px; }
.rh-view .result-label.on { visibility: visible; }

/* Kutu sabit: genişlik tüm satır, yükseklik satır yüksekliği; harf genişliği ya da yazı tipi farkı düzeni oynatmaz. */
.rh-letter {
  display: block;
  width: 100%;
  max-width: none;
  height: calc(5rem * 1.15);
  font-size: 5rem;
  line-height: 1.15;
  text-align: center;
  overflow: visible;
  white-space: nowrap;
}

.rh-live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Harf ızgarası (yalnızca gösterge): 29 harf, 10 sütun x 3 satır; son satırda bir boş hücre kalır ---- */
.rh-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 36px));
  justify-content: center;
  gap: 4px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}
.rh-grid li {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1;
  user-select: none;
  transition: opacity 0.15s ease;
}
.rh-grid li.used { opacity: 0.28; }
@media (min-width: 560px) {
  .rh-grid { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .rh-grid li { transition: none; }
}

/* ---- Alt metin ---- */
.about {
  margin-top: 24px;
  padding: 24px;
}
.about h2 {
  font-size: 1.15rem;
  margin: 0 0 8px;
}
.about p {
  font-size: 0.92rem;
}
.about p:last-child { margin-bottom: 0; }
