html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

.oyun {
  height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: calc(10px + env(safe-area-inset-top)) 16px calc(12px + env(safe-area-inset-bottom));
}

.ust { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ust .dugme { min-height: 48px; padding: 8px 14px; font-size: 18px; }
.bolum { font-size: 22px; font-weight: 800; }

.izgara-alani { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; padding: 10px 0 4px; }
.izgara { display: grid; gap: var(--aralik, 6px); }
.hucre {
  width: var(--hucre, 48px);
  height: var(--hucre, 48px);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: calc(var(--hucre, 48px) * 0.6);
  font-weight: 800;
  line-height: 1;
}
.hucre.bos { visibility: hidden; }
.hucre.kapali { background: var(--hucre); border: 2px solid var(--hucre-kenar); }
.hucre.ipucu { background: var(--ipucu); border: 2px solid var(--hucre-kenar); color: var(--yazi); }
.hucre.acik { background: var(--dolu); color: var(--dolu-yazi); }
.hucre.yeni { animation: belir var(--sure-orta) ease-out both; }
.hucre.parla { animation: parla 700ms ease-out; }
@keyframes belir { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes parla { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.15); } }

.orta { flex: 0 0 auto; padding: 4px 0; }
.secim-satiri { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; }
.secim {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.06em;
  min-width: 0;
  overflow-wrap: break-word;
  text-align: center;
}
.secim:not(:empty) { background: var(--yuzey); border-radius: 16px; padding: 2px 18px; box-shadow: 0 2px 8px var(--golge); }
.secim.salla { animation: salla 420ms ease-in-out; }
@keyframes salla { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.dugme.kucuk { min-height: 52px; padding: 8px 14px; font-size: 19px; }
.mesaj { text-align: center; font-size: 20px; color: var(--soluk); min-height: 28px; }
.mesaj b { color: var(--yazi); }

.cark-alani { flex: 0 0 auto; display: grid; place-items: center; padding: 6px 0 10px; }
.cark { position: relative; width: var(--cark-boyu, 300px); height: var(--cark-boyu, 300px); touch-action: none; }
.cark svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#cark-zemin { fill: var(--cark); }
#yol { fill: none; stroke: var(--secili); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.harf {
  position: absolute;
  width: var(--harf, 76px);
  height: var(--harf, 76px);
  margin: calc(var(--harf, 76px) / -2) 0 0 calc(var(--harf, 76px) / -2);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: calc(var(--harf, 76px) * 0.6);
  font-weight: 800;
  color: var(--yazi);
  transition: transform var(--sure-kisa) ease-out;
}
.harf.secili { background: var(--secili); color: var(--secili-yazi); transform: scale(1.06); }

.alt { flex: 0 0 auto; display: flex; gap: 10px; }
.alt .dugme { flex: 1; padding: 12px 4px; }

.bitis {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(29, 36, 51, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
}
.bitis[hidden] { display: none; }
.bitis-kutu {
  background: var(--zemin);
  border-radius: 24px;
  padding: 24px 20px;
  width: 100%;
  max-width: 460px;
  max-height: 90dvh;
  overflow-y: auto;
  text-align: center;
  animation: belir var(--sure-orta) ease-out both;
}
.bitis-kutu h2 { font-size: 38px; font-weight: 800; }
.bitis-kutu p { font-size: 20px; color: var(--soluk); margin: 6px 0 16px; }
.bitis-liste { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 20px; }
.bitis-liste .dugme { background: var(--yuzey); border: 2px solid var(--hucre-kenar); font-size: 26px; font-weight: 800; }
.dugme.genis { width: 100%; font-size: 24px; min-height: 64px; }
