/* TT Task — temel katman */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  height: 100%;
  /* Çift dokunuşla yakınlaştırma ve dokunma gecikmesi olmasın */
  touch-action: manipulation;
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

/* Referans zemin: sol üstte doygun cyan, ortada açılan, kenarlarda tekrar dolan yumuşak gradient */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 70% at 8% 0%, var(--bg-1) 0%, rgba(217, 242, 254, 0) 60%),
    radial-gradient(100% 60% at 100% 55%, #DCF1FD 0%, rgba(220, 241, 253, 0) 55%),
    linear-gradient(180deg, #E7F6FE 0%, var(--bg-2) 38%, var(--bg-3) 100%);
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Uygulama hissi: uzun basınca sistem menüsü ve metin seçimi çıkmasın.
   Yazı alanları ve içerik metinleri bunun dışında tutulur. */
body {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
input, textarea, [contenteditable], .secilebilir,
p, .list-row__title, .list-row__sub, .card, .comment__body {
  -webkit-user-select: text;
  user-select: text;
}
button, a, .nav-item, .bottom-nav, .topbar, .page-head, .chip, .segmented {
  -webkit-user-select: none;
  user-select: none;
}

/* iOS forma odaklanınca 16px altındaki alanlarda ekranı zorla yakınlaştırır.
   Dokunmatik cihazlarda alanları 16px'te tutarak bunu engelliyoruz. */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px; }
}
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--blue-link); text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}

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

/* ------------------------------------------------------------- uygulama kabuğu */
#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 12px) var(--gutter)
           calc(var(--nav-h) + var(--safe-bottom) + 34px);
  display: flex;
  flex-direction: column;
  gap: var(--stack);
}

.screen--flush { padding-bottom: calc(var(--safe-bottom) + 20px); }

/* Ekran içindeki kart yığını — .screen ile aynı aralığı korur */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack);
}

/* Sayfa geçişi */
.screen[data-enter] { animation: screen-in .22s ease both; }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

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

/* Masaüstünde telefon çerçevesi hissi vermeden ortalanmış, okunur genişlik */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
}
