/* ==========================================================================
   İstanBulmacası — style.css
   Görsel dil: İstanbul sokak tabelaları (lacivert plaka, beyaz iç çerçeve),
   kâğıt harita zemini, İstiklal tramvayı kırmızısı vurgu, otoyol yeşili "buldun".
   Mobil öncelikli; açık/koyu tema CSS değişkenleriyle yönetilir.

   İçindekiler
     1. Tema değişkenleri
     2. Temel stiller & butonlar
     3. Başlık (masthead)
     4. Tahmin formu & öneri listesi
     5. Tahmin tahtası: tabela + hücreler
     6. Tur sekmeleri & tur sonu şeridi
     7. Modallar & istatistik
     8. Bildirim, alt bilgi
     9. Animasyonlar
    10. Geniş ekranlar
   ========================================================================== */


/* ---------- 1. TEMA DEĞİŞKENLERİ ---------- */

:root {
  color-scheme: light;
  --paper: #f1ece2;          /* zemin: eski harita kâğıdı */
  --paper-2: #e6dfd1;
  --card: #faf7f1;
  --ink: #16181c;
  --ink-2: #4b4a45;
  --ink-3: #8b8578;
  --line: #d4cab7;
  --sign: #1d3f8f;           /* sokak tabelası laciverti */
  --sign-line: rgb(255 255 255 / 0.92);
  --found: #17683f;          /* otoyol tabelası yeşili */
  --tram: #c4202e;           /* nostaljik tramvay kırmızısı */
  --tram-hover: #a91a26;
  --on-color: #ffffff;
  --shadow-hard: 5px 5px 0 rgb(22 24 28 / 0.9);

  --font-sans: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --radius: 6px;

  /* Tahmin satırı sütunları: Tabela | Mesafe | Yön | Yakınlık */
  --cols: minmax(0, 1fr) 3.9rem 2.5rem 3.5rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0f1012;
    --paper-2: #1b1d21;
    --card: #15171a;
    --ink: #ece6da;
    --ink-2: #b4ad9f;
    --ink-3: #7a756b;
    --line: #2c2f34;
    --sign: #2a4ea6;
    --found: #1f7f4f;
    --tram: #d9323f;
    --tram-hover: #e5505c;
    --shadow-hard: 5px 5px 0 rgb(0 0 0 / 0.75);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f1012;
  --paper-2: #1b1d21;
  --card: #15171a;
  --ink: #ece6da;
  --ink-2: #b4ad9f;
  --ink-3: #7a756b;
  --line: #2c2f34;
  --sign: #2a4ea6;
  --found: #1f7f4f;
  --tram: #d9323f;
  --tram-hover: #e5505c;
  --shadow-hard: 5px 5px 0 rgb(0 0 0 / 0.75);
}


/* ---------- 2. TEMEL STİLLER & BUTONLAR ---------- */

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.45;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
}

svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--tram);
  outline-offset: 2px;
}

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

.app {
  display: flex;
  flex-direction: column;
  max-width: 34rem;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 1rem calc(0.75rem + env(safe-area-inset-bottom));
}

.main {
  flex: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3.1rem;
  padding: 0 1.1rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s, background-color 0.12s;
}

/* Birincil buton: tramvay kırmızısı + sert gölge, basınca "çöker" */
.btn-primary {
  background: var(--tram);
  color: var(--on-color);
  box-shadow: 3px 3px 0 var(--ink);
}

.btn-primary:hover {
  background: var(--tram-hover);
}

.btn-primary:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}

.btn-ink {
  background: var(--ink);
  color: var(--paper);
}

.btn-ink:hover {
  background: var(--ink-2);
  border-color: var(--ink-2);
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}

.icon-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.icon-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

/* Mono küçük başlık + yanında ince çizgi */
.section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.4rem 0 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}


/* ---------- 3. BAŞLIK (MASTHEAD) ---------- */

.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(1.1rem + env(safe-area-inset-top)) 0 0.8rem;
  border-bottom: 2px solid var(--ink);
}

.masthead-brand {
  min-width: 0;
}

.wordmark {
  margin: 0;
  font-size: clamp(1.75rem, 8vw, 2.3rem);
  font-weight: 800;
  font-stretch: 80%;
  letter-spacing: -0.04em;
  line-height: 0.9;
}

/* "istanBUL" ile "BULmaca"nın kesiştiği hece */
.wordmark span {
  color: var(--tram);
}

.masthead-meta {
  margin: 0.4rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.masthead-actions {
  display: flex;
  gap: 0.375rem;
}

.lede {
  margin: 1.15rem 0 0.9rem;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--ink-2);
}

.lede strong {
  font-weight: 700;
  color: var(--ink);
}


/* ---------- 4. TAHMİN FORMU & ÖNERİ LİSTESİ ---------- */

.guess-form {
  position: relative;
  z-index: 20;
  display: flex;
  gap: 0.5rem;
}

.input-wrap {
  flex: 1;
  min-width: 0;
}

.guess-input {
  width: 100%;
  height: 3.1rem;
  padding: 0 0.9rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1rem; /* 16px altı iOS'ta zoom yapar */
  outline: none;
  transition: box-shadow 0.12s;
}

.guess-input::placeholder {
  color: var(--ink-3);
}

.guess-input:focus {
  box-shadow: 3px 3px 0 var(--ink);
}

.suggestions {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  max-height: min(50vh, 21rem);
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}

.suggestion {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.62rem 0.85rem 0.62rem 0.7rem;
  border-left: 3px solid transparent;
  cursor: pointer;
  user-select: none;
}

.suggestion + .suggestion {
  border-top: 1px solid var(--line);
}

.suggestion:hover,
.suggestion.is-active {
  background: var(--paper-2);
  border-left-color: var(--tram);
}

.suggestion-name {
  min-width: 0;
  font-weight: 600;
}

.suggestion-district {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.suggestion mark {
  background: transparent;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--tram);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.suggestion-empty {
  padding: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-align: center;
  color: var(--ink-3);
}

/* Kalan hak: 6 küçük kare */
.status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.1rem 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.pips {
  display: flex;
  gap: 3px;
}

.pip {
  width: 0.7rem;
  height: 0.7rem;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
}

.pip.is-used {
  background: var(--ink);
}


/* ---------- 5. TAHMİN TAHTASI: TABELA + HÜCRELER ---------- */

.board-head {
  display: grid;
  grid-template-columns: var(--cols);
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-3);
}

.board-head span:first-child {
  text-align: left;
}

.board {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guess-row {
  display: grid;
  grid-template-columns: var(--cols);
  gap: 0.35rem;
}

/* İstanbul sokak tabelası: lacivert zemin, beyaz iç çerçeve, dar büyük harf */
.plate {
  display: flex;
  min-width: 0;
  padding: 3px;
  border-radius: 5px;
  background: var(--sign);
  color: #fff;
}

.plate-inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  min-width: 0;
  padding: 0.3rem 0.55rem 0.35rem;
  border: 1.5px solid var(--sign-line);
  border-radius: 3px;
}

.plate-district {
  display: flex;
  gap: 0.45rem;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0.85;
}

.plate-no {
  opacity: 0.65;
}

.plate-name {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.92rem;
  font-weight: 700;
  font-stretch: 78%;
  letter-spacing: 0.01em;
  line-height: 1.05;
  text-transform: uppercase;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.plate--lg {
  padding: 5px;
  border-radius: 8px;
}

.plate--lg .plate-inner {
  align-items: center;
  gap: 0.2rem;
  padding: 0.85rem 1rem 0.95rem;
  border-width: 2px;
  border-radius: 5px;
  text-align: center;
}

.plate--lg .plate-district {
  font-size: 0.7rem;
}

.plate--lg .plate-name {
  font-size: 1.65rem;
  line-height: 1;
}

.is-won > .plate,
.guess-row.is-correct .plate {
  background: var(--found);
}

/* Sayısal hücreler */
.cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.4rem;
  padding: 0.3rem;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cell small {
  margin-left: 1px;
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--ink-3);
}

/* Yön oku: pusula ibresi gibi hedef açısına döner */
.dir-arrow {
  width: 1.3rem;
  height: 1.3rem;
  fill: var(--ink);
  transform: rotate(var(--angle, 0deg));
}

.dir-check {
  width: 1.3rem;
  height: 1.3rem;
}

/* Yakınlık: sayının altında ince ölçek çubuğu */
.cell-prox {
  padding-bottom: 0.6rem;
}

.cell-prox::before,
.cell-prox::after {
  content: "";
  position: absolute;
  bottom: 7px;
  left: 7px;
  height: 3px;
  border-radius: 1px;
}

.cell-prox::before {
  right: 7px;
  background: var(--line);
}

.cell-prox::after {
  width: calc((100% - 14px) * var(--p, 0) / 100);
  background: var(--ink);
}

/* Doğru tahmin satırı */
.guess-row.is-correct .cell {
  background: var(--found);
  border-color: var(--found);
  color: #fff;
}

.guess-row.is-correct .cell small {
  color: rgb(255 255 255 / 0.75);
}

.guess-row.is-correct .cell-prox::before {
  background: rgb(255 255 255 / 0.3);
}

.guess-row.is-correct .cell-prox::after {
  background: #fff;
}

/* Boş satır: taralı harita boşluğu */
.empty-slot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  min-height: 3.4rem;
  padding: 0 0.75rem;
  border: 1.5px solid var(--line);
  border-radius: 5px;
  background-image: repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 8px);
  background-clip: padding-box;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-3);
}

.empty-slot span {
  padding: 0.1rem 0.3rem;
  background: var(--paper);
  border-radius: 2px;
}


/* ---------- 6. TUR SEKMELERİ & TUR SONU ŞERİDİ ---------- */

/* Tur sekmeleri: kazanılan yeşil, kaybedilen kırmızı, kilitli taralı */
.rounds {
  display: grid;
  grid-template-columns: repeat(var(--rounds, 5), 1fr);
  gap: 0.4rem;
  margin: 0 0 0.9rem;
}

.round-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  height: 3.1rem;
  padding: 0;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
}

.round-tab-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.round-tab-no {
  font-size: 1.15rem;
  font-weight: 800;
  font-stretch: 85%;
  line-height: 1;
}

.round-tab.is-won {
  background: var(--found);
  border-color: var(--found);
  color: #fff;
}

.round-tab.is-lost {
  background: var(--tram);
  border-color: var(--tram);
  color: #fff;
}

.round-tab.is-locked {
  border-color: var(--line);
  background-image: repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 7px);
  color: var(--ink-3);
  cursor: not-allowed;
}

.round-tab.is-selected {
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transform: translate(-1px, -1px);
}

.verdict {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.25rem; /* tur bitince gizlenen hak göstergesinin boşluğu */
}

.verdict-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.verdict-plate {
  display: flex;
  min-width: 0;
}

.verdict-plate .plate {
  flex: 1;
  min-height: 3.6rem;
}

.verdict-label,
.verdict-note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.text-btn {
  flex: none;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--tram);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}


/* ---------- 7. MODALLAR & İSTATİSTİK ---------- */

.modal {
  width: min(100% - 2rem, 26rem);
  max-width: none;
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-hard);
}

.modal[open] {
  display: flex;
  flex-direction: column;
  animation: modal-in 0.2s ease-out;
}

.modal::backdrop {
  background: rgb(15 16 18 / 0.55);
}

.modal-body {
  padding: 1.1rem 1.2rem 1.25rem;
  overflow-y: auto;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--ink);
}

.modal-head h2 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  font-stretch: 82%;
  letter-spacing: -0.03em;
  line-height: 1;
}

.steps {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 1.8rem 1fr;
  counter-increment: step;
  line-height: 1.4;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  padding-top: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--tram);
}

.help-example {
  margin: 0.25rem 0 1.25rem;
}

.help-example-text {
  margin: 0.6rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.result-hero {
  margin-bottom: 0.25rem;
}

/* Sonuç kartı gizliyken ilk başlık modal başlığına fazla uzak durmasın */
.result-hero[hidden] + .section-title {
  margin-top: 0;
}

/* Günün 5 turu: mini özet */
.day-strip {
  display: grid;
  grid-template-columns: repeat(var(--rounds, 5), 1fr);
  gap: 0.35rem;
}

.day-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.45rem 0.25rem;
  border: 1.5px solid var(--line);
  border-radius: 5px;
  font-family: var(--font-mono);
}

.day-cell span {
  font-size: 0.55rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.8;
}

.day-cell strong {
  font-size: 0.85rem;
  font-weight: 600;
}

.day-cell.is-won {
  background: var(--found);
  border-color: var(--found);
  color: #fff;
}

.day-cell.is-lost {
  background: var(--tram);
  border-color: var(--tram);
  color: #fff;
}

.day-cell.is-locked {
  color: var(--ink-3);
}

.day-cell.is-selected {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.result-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.7rem;
}

.result-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-2);
}

.map-link {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--tram);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
}

.stat {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0.55rem 0.55rem;
}

.stat + .stat {
  border-left: 1.5px solid var(--ink);
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  font-stretch: 82%;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--ink-2);
}

.distribution {
  display: grid;
  gap: 4px;
}

.dist-row {
  display: grid;
  grid-template-columns: 1rem 1fr;
  align-items: center;
  gap: 0.5rem;
}

.dist-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-2);
}

.dist-bar {
  min-width: 1.6rem;
  padding: 0.1rem 0.45rem;
  border-radius: 2px;
  background: var(--paper-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  transition: width 0.4s ease-out;
}

.dist-bar.is-current {
  background: var(--found);
  color: #fff;
}

.dist-bar.is-fail.is-current {
  background: var(--tram);
}

/* Paylaşım önizlemesi: vapur bileti gibi kesik çerçeve */
.share-preview {
  margin: 1.35rem 0 0.85rem;
  padding: 0.7rem 0.85rem;
  overflow-x: auto;
  background: var(--card);
  border: 1.5px dashed var(--line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  user-select: text;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.result-actions .btn {
  flex: 1;
  padding: 0 0.8rem;
}

.countdown {
  display: flex;
  flex: none;
  flex-direction: column;
  margin-right: 0.4rem;
}

.countdown-label {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.countdown-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.link-btn {
  padding: 0;
  border: none;
  background: none;
  color: var(--tram);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.btn-share.is-copied {
  background: var(--found);
}


/* ---------- 8. BİLDİRİM, ALT BİLGİ ---------- */

.toast {
  position: fixed;
  top: calc(1rem + env(safe-area-inset-top));
  left: 50%;
  z-index: 100;
  max-width: calc(100% - 2rem);
  padding: 0.55rem 0.9rem;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition: opacity 0.18s, transform 0.18s;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding: 0.8rem 0 0.25rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}


/* ---------- 9. ANİMASYONLAR ---------- */

/* Yeni tahmin satırı: hücreler sırayla yükselir, ok pusula gibi döner */
.guess-row.is-new > .plate,
.guess-row.is-new > .cell {
  animation: rise 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}

.guess-row.is-new .dir-arrow {
  animation: needle 0.8s cubic-bezier(0.25, 1.4, 0.4, 1) 0.2s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes needle {
  from {
    transform: rotate(calc(var(--angle, 0deg) - 200deg));
  }
  to {
    transform: rotate(var(--angle, 0deg));
  }
}

.shake {
  animation: shake 0.38s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ---------- 10. GENİŞ EKRANLAR ---------- */

@media (min-width: 30rem) {
  :root {
    --cols: minmax(0, 1fr) 4.6rem 3rem 4.2rem;
  }

  .plate-name {
    font-size: 1.02rem;
  }

  .plate-district {
    font-size: 0.6rem;
  }

  .cell,
  .empty-slot {
    min-height: 3.6rem;
  }

  .cell {
    font-size: 0.95rem;
  }
}
