/* Telefon uyarlamaları: tam ekran, çentik/alt çubuk güvenli alanları, dokunmatik hedefler. */
html, body.phone { height: 100%; overscroll-behavior: none; }
body.phone { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
body.phone #panel { height: 100dvh; border: 0 !important; }

/* masaüstüne özel düğmeler */
body.phone #btnCollapse, body.phone #btnPin, body.phone #btnQuit, body.phone #btnBrowser, body.phone #tab { display: none !important; }

body.phone .titlebar {
  height: calc(46px + var(--sa-top, env(safe-area-inset-top))); padding: var(--sa-top, env(safe-area-inset-top)) 8px 0 14px;
  cursor: default; -webkit-app-region: none;
}
body.phone .brand { font-size: 16px; }
body.phone .icon-btn { width: 40px; height: 36px; font-size: 17px; }
body.phone .sheet { inset: calc(46px + var(--sa-top, env(safe-area-inset-top))) 0 0 0; }
body.phone .sheet-foot { padding-bottom: calc(14px + var(--sa-bottom, env(safe-area-inset-bottom))); }

/* iOS odaklanınca sayfayı büyütmesin: en az 16px yazı */
body.phone input, body.phone select, body.phone textarea { font-size: 16px; }

body.phone .tabs { overflow-x: auto; scrollbar-width: none; gap: 0; }
body.phone .tabs::-webkit-scrollbar { display: none; }
body.phone .tabs button { flex: 1 0 auto; padding: 11px 6px 12px; font-size: 13.5px; }

body.phone .item { padding: 11px 10px; }
body.phone .mini { padding: 6px 10px; font-size: 12.5px; }
body.phone .check { width: 24px; height: 24px; }
body.phone .content { -webkit-overflow-scrolling: touch; }

body.phone .fab { width: 54px; height: 54px; font-size: 26px; bottom: 14px; }
body.phone .calendar { padding-bottom: calc(10px + var(--sa-bottom, env(safe-area-inset-bottom))); }
body.phone.cal-collapsed .calendar { padding-bottom: calc(6px + var(--sa-bottom, env(safe-area-inset-bottom))); }
body.phone .toast { bottom: calc(86px + var(--sa-bottom, env(safe-area-inset-bottom))); }
body.phone .splitter { height: 14px; }

/* dokunmatik ekranda üzerine gelme yok: gizli düğmeler hep görünsün */
@media (hover: none) {
  .del-btn { opacity: .5; }
  .star-btn { opacity: .45; }
  .star-btn.on { opacity: 1; }
  .card-btn { opacity: .85; }
}

/* kurulum */
.setup-card { max-width: 340px; }
.setup-steps { text-align: left; margin: 14px 0; font-size: 13.5px; }
.drive-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.drive-btn {
  display: flex; justify-content: space-between; align-items: center; padding: 13px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 15px; text-align: left;
}
.drive-btn:not(:disabled):active { background: var(--accent-soft); border-color: var(--accent); }
.drive-btn small { font-weight: 500; color: var(--muted); font-size: 12px; }
.drive-btn.soon { opacity: .55; }
#setupView form { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }

/* ---------- kenar boşlukları: her şey ekran kenarından en az 16px içeride (yatayda çentik de hesaba katılır) ---------- */
body.phone {
  --gl: max(16px, var(--sa-left, env(safe-area-inset-left)));
  --gr: max(16px, var(--sa-right, env(safe-area-inset-right)));
}
body.phone .titlebar { padding: var(--sa-top, env(safe-area-inset-top)) calc(var(--gr) - 8px) 0 var(--gl); }
body.phone .toolbar { padding: 12px var(--gr) 8px var(--gl); gap: 8px; }
body.phone .search { min-width: 0; }
body.phone .search input { min-width: 0; }
body.phone #projectFilter { width: auto; max-width: 45%; min-width: 0; }
body.phone .tabs { padding: 0 calc(var(--gr) - 6px) 0 calc(var(--gl) - 6px); scroll-padding: 0 var(--gr) 0 var(--gl); }
body.phone .content { padding: 12px var(--gr) calc(96px + var(--sa-bottom, env(safe-area-inset-bottom))) var(--gl); }
body.phone .fab { right: var(--gr); }
body.phone .calendar { padding-left: var(--gl); padding-right: var(--gr); }
body.phone .sheet-head { padding: 12px var(--gr) 4px calc(var(--gl) - 6px); }
body.phone .sheet-body { padding-left: var(--gl); padding-right: var(--gr); }
body.phone .sheet-foot { padding-left: var(--gl); padding-right: var(--gr); }

/* Face ID ile aç */
.bio-btn { width: 100%; margin: 6px 0 12px; padding: 13px; font-size: 16px; font-weight: 600; }
