/* Uygulama (PWA) katmanı: telefon kalitesi, güvenli alanlar, giriş penceresi, satın alma, yasal okuyucu,
   çerez bandı, yükleme kartı. En son yüklenir; "dedektif masası" tasarımını değiştirmez, yalnızca tamamlar. */

/* ---------- Genel: taşma yok, dokunma parlaması yok, iOS yakınlaştırması yok ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { overscroll-behavior-x: none; }
body { overflow-x: clip; }
* { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
img, svg, video { max-width: 100%; }
input, select, textarea { font-size: max(16px, 1em); }
.field input, .field select, .field textarea { font-size: 16px; min-width: 0; width: 100%; }
fieldset { min-width: 0; }
.shell, main.view, .view > *, .stack > *, .row > * { min-width: 0; }
a, button { touch-action: manipulation; }
:where(p, li, dd, td, .small, .tiny) { overflow-wrap: anywhere; }
/* Uygulama olarak açıkken çekerek yenileme kapalı (yenileme yerine "Yeni sürüm hazır" bandı var) */
@media (display-mode: standalone) { html, body { overscroll-behavior-y: none; } }
/* Pano ve laboratuvarda sürüklerken sayfa kaymasın, çekerek yenileme tetiklenmesin */
.board, .lab, .board .node { touch-action: none; overscroll-behavior: contain; -webkit-user-select: none; user-select: none; }
html.modal-acik, html.modal-acik body { overflow: hidden; }

/* Açılış ekranı (JS gelmeden önce): logo ortada, kayma yok */
.acilis { min-height: 100dvh; display: grid; place-items: center; }
.acilis svg { opacity: .9; }
@media (prefers-reduced-motion: no-preference) { .acilis svg { animation: ds-nabiz 1.4s ease-in-out infinite; } }

/* ---------- Güvenli alanlar (çentik, alt çubuk, yatay telefon) ---------- */
.desk-top { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
@media (max-width: 959px) {
  .desk-top { padding-top: env(safe-area-inset-top); height: calc(var(--top-h, 54px) + env(safe-area-inset-top)); box-sizing: border-box; }
  .tabs { top: calc(var(--top-h, 54px) + env(safe-area-inset-top)); }
}
main.view { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
.bottomnav { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
#toast { bottom: calc(var(--nav-h, 64px) + 14px + env(safe-area-inset-bottom)); }
@media (min-width: 960px) { #toast { bottom: 28px; } }

/* ---------- Dokunma hedefleri ≥ 44 px (telefon ve tablet) ---------- */
@media (pointer: coarse) {
  .btn, .btn-sm { min-height: 44px; }
  .desk-top .btn, .desk-top .btn-sm { min-height: 40px; height: 40px; }
  .bottomnav a { min-height: 48px; }
  .tabs a { min-height: 40px; }
  .opt, .ev-item, .who button, .filters button, .lb-seg button { min-height: 44px; }
  .check { min-height: 44px; align-items: center; }
  .check input { width: 22px; height: 22px; }
  .linkbtn { min-height: 44px; padding: 0 4px; }
  .modal .x, .tl-kapat { width: 44px; height: 44px; }
  .switch { min-height: 30px; }
  .footer .flinks a, .footer .flinks .linkbtn { display: inline-flex; align-items: center; min-height: 40px; }
  .ses-btn { min-width: 40px; min-height: 40px; }
}

/* ---------- Üst bar: girişte tek, belirgin "Giriş yap" ---------- */
.giris-btn { white-space: nowrap; }
.giris-btn i { font-size: 1.1rem; }
@media (max-width: 600px) { .desk-top .nasil-link { width: 40px; padding: 0; justify-content: center; } }
.desk-right { display: flex; align-items: center; gap: 8px; min-width: 0; }

/* Ana sayfa: büyük "Oyuna başla" */
.btn-buyuk { height: 58px; min-height: 58px; padding: 0 28px; font-size: 1.12rem; font-weight: 800; border-radius: 14px; box-shadow: 0 14px 30px -12px rgba(242,194,48,.55); }
.btn-buyuk i { font-size: 1.35rem; }
@media (max-width: 600px) {
  .desk-hero .ctas { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .desk-hero .ctas .btn { width: 100%; justify-content: center; }
}

/* ---------- Pencere (alttan açılan sayfa): klavye açılınca da görünür ---------- */
.modal-back { padding-top: env(safe-area-inset-top); bottom: var(--klavye, 0px); overscroll-behavior: contain; }
.modal { max-height: calc(var(--vvh, 100dvh) - 24px - env(safe-area-inset-top)); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal h3 { overflow-wrap: anywhere; }

/* Giriş penceresi */
.sheet-giris { max-width: 460px; }
.giris-sheet h3 { font-size: 1.25rem; }
.btn-google { height: 56px; min-height: 56px; background: #fff; color: #1F1F1F; border: 1px solid #DADCE0; font-weight: 700; font-size: 1.05rem; gap: 12px; }
.btn-google:hover { background: #F6F8FA; }
.btn-google .g-logo { display: inline-grid; place-items: center; width: 26px; height: 26px; }
.sso .btn-google { background: #fff; color: #1F1F1F; border-color: #DADCE0; }
.giris-sheet .btn-block { justify-content: center; }
.giris-sheet .tiny a { color: var(--ink-2); }

/* iOS ana ekrana ekle */
.ios-adim { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; counter-reset: a; }
.ios-adim li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--surface); }
.ios-ikon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--paper); color: #3D8BFF; font-size: 1.3rem; }

/* ---------- Satın alma ---------- */
.sayfa-baslik { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.satin-kart { max-width: 340px; }
.buy.checkout { display: grid; gap: 22px; align-items: start; }
@media (min-width: 960px) { .buy.checkout { grid-template-columns: .9fr 1.1fr; } }
.ckform { display: grid; gap: 16px; min-width: 0; }
.ckform .two { display: grid; gap: 14px; }
@media (min-width: 640px) { .ckform .two { grid-template-columns: 1fr 1fr; } }
.ckform fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 14px; margin: 0; min-width: 0; }
.ckform legend { padding: 0 6px; font-weight: 800; }
.field textarea { min-height: 84px; padding: 10px 14px; border-radius: var(--r-ctl); border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); resize: vertical; font-family: inherit; }
.field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--marker) 60%, transparent); }
.field [aria-invalid="true"] { border-color: var(--bad); }
.onbilgi { max-height: 260px; overflow: auto; padding: 14px 16px; background: var(--sheet); color: #1E2126; border-radius: 8px; font-size: .86rem; line-height: 1.55; overscroll-behavior: contain; }
.onbilgi h3 { font-size: .95rem; margin: 10px 0 4px; }
.onbilgi h3:first-child { margin-top: 0; }
.consent { display: grid; gap: 10px; }
.consent .check { color: var(--ink); }
.consent .check a, .ckform .tiny a, .card .small a { color: var(--marker); }
.err { color: #FF8A78; font-size: .9rem; font-weight: 600; margin: 0; }
.odeme-dugme { height: 56px; min-height: 56px; font-size: 1.02rem; white-space: normal; line-height: 1.2; text-align: center; }
.paynote { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px dashed rgba(242,194,48,.55); background: rgba(242,194,48,.07); font-size: .9rem; }
.paynote i { font-size: 1.3rem; color: var(--marker); flex: none; }
.giris-kutu b i { color: var(--marker); }
.buy input[type=range] { width: 100%; height: 32px; accent-color: var(--marker); }
.receipt .ln > span:first-child { min-width: 0; overflow-wrap: anywhere; }

/* ---------- Yasal alan (alt bilgi) ve ödeme logoları ---------- */
.sitefoot { margin-top: 48px; padding: 26px 0 10px; border-top: 1px dashed var(--line); color: var(--ink-2); font-family: var(--font); font-size: .86rem; }
.sitefoot b { color: var(--ink); }
.sitefoot a { color: var(--ink-2); }
.sitefoot .fgrid { display: grid; gap: 22px; }
@media (min-width: 820px) { .sitefoot .fgrid { grid-template-columns: 1.2fr 1fr 1fr; } }
.sitefoot .flinks { display: grid; gap: 2px; list-style: none; padding: 0; margin: 6px 0 0; }
.sitefoot .linkbtn { color: var(--ink-2); }
#yasal .sitefoot { margin-top: 6px; border-top: 0; padding-top: 0; }
.paybar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.paybar .iyz { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 6px; background: #1E64FF; color: #fff; font-weight: 800; font-size: .9rem; }
.paybar .card { display: inline-grid; place-items: center; height: 34px; min-width: 56px; padding: 0 10px; border-radius: 6px; background: #fff; border: 0; box-shadow: none; }
.paybar .card img { height: 18px; width: auto; }
.paybar .card.troy { color: #0B5394; font-weight: 900; font-style: italic; letter-spacing: .04em; font-family: var(--font); }
.paybar-not { flex-basis: 100%; color: var(--ink-3); }
@media (min-width: 900px) { .paybar-not { flex-basis: auto; margin-left: auto; } }
.ckform .paybar { margin-top: 0; }
/* Masaüstünde alt bilgi her sayfada görünür; telefonda yalnızca ana sayfa, Dosyalar ve Kimliğim > Yasal'da */

/* ---------- Yasal okuyucu ---------- */
#yasal-root .modal-back { z-index: 60; }
.yasal-okuyucu { max-width: 760px; padding: 0; display: grid; grid-template-rows: auto 1fr; height: calc(var(--vvh, 100dvh) - 24px - env(safe-area-inset-top)); overflow: hidden; }
@media (min-width: 700px) { .yasal-okuyucu { height: min(86dvh, 900px); } }
.yasal-ust { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 10px 18px; border-bottom: 1px dashed var(--line); }
.yasal-ust b { font-size: 1.05rem; font-stretch: 110%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yasal-govde { overflow-y: auto; overscroll-behavior: contain; padding: 14px 18px calc(24px + env(safe-area-inset-bottom)); font-size: .95rem; line-height: 1.6; outline: none; }
.yasal-govde h1 { font-size: 1.5rem; margin: 4px 0 6px; }
.yasal-govde h2 { font-size: 1.12rem; margin: 22px 0 8px; scroll-margin-top: 10px; }
.yasal-govde h3 { font-size: 1rem; margin: 16px 0 6px; }
.yasal-govde p, .yasal-govde li { margin: 0 0 10px; }
.yasal-govde ul, .yasal-govde ol { padding-left: 20px; }
.yasal-govde a { color: var(--marker); }
.yasal-govde .upd, .yasal-govde .note { color: var(--ink-3); font-size: .85rem; }
.yasal-govde .toc { padding: 12px 14px; border-radius: 10px; background: var(--surface); margin: 10px 0 14px; font-size: .9rem; }
.yasal-govde table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .85rem; }
.yasal-govde th, .yasal-govde td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; min-width: 120px; }
.yasal-govde pre { white-space: pre-wrap; }

/* ---------- Çerez bandı (site.js ile aynı) ---------- */
.cerez { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h, 64px) + 10px + env(safe-area-inset-bottom)); z-index: 48; display: grid; gap: 12px; padding: 14px 16px; border-radius: 14px; background: #171B20; border: 1px solid #3A4049; box-shadow: 0 20px 50px rgba(0,0,0,.6); max-width: 980px; margin: 0 auto; max-height: 60dvh; overflow: auto; }
.cerez p { margin: 4px 0 8px; color: var(--ink-2); }
.cerez a { color: var(--marker); }
.cerez label { display: inline-flex; gap: 6px; align-items: center; margin-right: 14px; min-height: 32px; }
.cerez .cbtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cerez .cbtns .btn { height: 44px; min-height: 44px; padding: 0 6px; font-size: .88rem; white-space: normal; line-height: 1.1; justify-content: center; }
/* Kart: sol alt köşede, en çok 360 px; metin, onay kutuları ve üç düğme alt alta (17 Kasım 2026) */
.cerez { left: max(12px, env(safe-area-inset-left)); right: auto; width: min(360px, calc(100vw - 24px)); max-width: none; margin: 0; grid-template-columns: 1fr; align-items: start; gap: 6px; padding: 12px 14px; }
.cerez p { margin: 2px 0 4px; font-size: .8rem; line-height: 1.45; }
.cerez label { min-height: 26px; margin-right: 10px; font-size: .84rem; }
.cerez .cbtns { grid-template-columns: repeat(3, auto); gap: 6px; }
.cerez .cbtns .btn { height: auto; min-height: 38px; padding: 4px 8px; font-size: .8rem; line-height: 1.1; white-space: nowrap; text-align: center; justify-content: center; }
@media (max-width: 340px) { .cerez .cbtns .btn { white-space: normal; } }
@media (min-width: 960px) { .cerez { bottom: 16px; } }

/* ---------- Yeni sürüm penceresi: ekranın ortasında, sayfanın üstünde (pencerelerden ve telsizden de üstte) ---------- */
#guncelleme { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); background: rgba(6, 9, 14, .66); overscroll-behavior: contain; }
#guncelleme .gun-kutu { width: min(100%, 380px); max-height: 100%; overflow: auto; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 22px 20px 18px; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
#guncelleme .gun-ik { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--marker-soft); color: var(--marker); font-size: 1.5rem; }
#guncelleme h2 { font-size: 1.35rem; margin: 0 0 8px; }
#guncelleme p { margin: 0 0 18px; color: var(--ink-2); font-size: .95rem; line-height: 1.5; }
#guncelleme .gun-dugmeler { display: grid; gap: 8px; }
#guncelleme .gun-dugmeler .btn { width: 100%; min-height: 48px; justify-content: center; }
#guncelleme .btn[aria-busy="true"] { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  #guncelleme { animation: gun-gel .18s ease-out; }
  #guncelleme .gun-kutu { animation: gun-kutu .24s cubic-bezier(.2, .9, .3, 1.15); }
  #guncelleme .gun-don { animation: gun-don .9s linear infinite; }
}
@keyframes gun-gel { from { opacity: 0; } }
@keyframes gun-kutu { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes gun-don { to { transform: rotate(360deg); } }

/* ---------- Yükleme kartı ---------- */
.kurulum-kart { position: relative; margin-top: 18px; padding: 16px 16px 14px; display: grid; gap: 10px; max-width: 460px; }
.kurulum-kart p { margin: 0; }
[data-kurulum-yer]:empty { display: none; }

/* ---------- Telsiz çekmecesi: klavye açılınca yazma alanı görünür kalsın ---------- */
@media (max-width: 1099px) {
  .telsiz { bottom: var(--klavye, 0px); max-height: calc(var(--vvh, 100dvh) - 12px - env(safe-area-inset-top)); }
  .tl-fab { right: max(14px, env(safe-area-inset-right)); }
}

/* ---------- Çevrimdışı ---------- */
.cevrimdisi > i { font-size: 54px; color: var(--ink-3); display: block; margin: 0 auto 12px; }

/* ---------- Tablet (768) ---------- */
@media (min-width: 601px) and (max-width: 959px) {
  main.view { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
}

/* Sunucuda üretilen ana sayfa içeriği (arama motorları ve JavaScript'siz ziyaretçi için). Uygulama açılınca yerine geçer. */
.on-icerik { max-width: 760px; margin: 0 auto; padding: 32px 18px 60px; color: var(--ink); line-height: 1.6; content-visibility: auto; contain-intrinsic-size: auto 1800px; }
.on-icerik h1 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 12px; }
.on-icerik h2 { font-size: 1.4rem; margin: 28px 0 10px; }
.on-icerik ol, .on-icerik ul { padding-left: 20px; display: grid; gap: 8px; }
.on-icerik dt { font-weight: 700; margin-top: 12px; }
.on-icerik dd { margin: 4px 0 0; color: var(--ink-2); }
.on-icerik a { color: var(--marker); }
.google-not { margin: 6px 2px 2px; line-height: 1.45; text-align: left; }
.google-not a { color: inherit; text-decoration: underline; }

/* iOS (Safari ve uygulama içi tarayıcılar): durum çubuğunun ve alttaki adres çubuğunun arkası sayfanın dışında kalıyor,
   kayan içerik orada saydam görünüyordu. Başlık ve alt menü, düz renkli gölgeyle bu bölgeleri de kapatır
   (öğenin kendi taşma kırpması gölgeyi kesmez). */
@media (max-width: 959px) {
  .desk-top { box-shadow: 0 -160px 0 0 #0B0D10; background: linear-gradient(180deg, #0B0D10, rgba(12,14,17,.94)); }
  .bottomnav { box-shadow: 0 160px 0 0 #0C0E11; background: linear-gradient(180deg, rgba(12,14,17,.75), #0C0E11 26%); }
}
