:root {
  --metin: #1d3527;
  --metin-ikinci: #4a5f50;
  --yuzey: #fbfaf5;
  --yuzey-golge: 0 6px 24px rgba(29, 53, 39, 0.14);
  --cizgi: #d9dccf;
  --vurgu: #9c4320;
  --vurgu-koyu: #7f3518;
  --odak: #1f6b8a;
  --yaricap: 12px;
  --font-baslik: "Young Serif", Georgia, serif;
  --font-metin: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #dfeee9;
  color: var(--metin);
  font-family: var(--font-metin);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

canvas#bahce {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
canvas#bahce.surukle { cursor: grabbing; }
canvas#bahce.ustunde { cursor: pointer; }

.gizli {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

button, input { font: inherit; color: inherit; }

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

/* Üst şerit */
.ust {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  pointer-events: none;
}
.ust > * { pointer-events: auto; }

.marka { display: flex; align-items: baseline; gap: 10px; margin-right: auto; }
.marka h1 {
  margin: 0;
  font-family: var(--font-baslik);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: #173022;
}
.ornek {
  font-size: 12px;
  font-weight: 500;
  color: var(--metin-ikinci);
  background: rgba(251, 250, 245, 0.85);
  border: 1px solid var(--cizgi);
  border-radius: 999px;
  padding: 2px 9px;
}

.arama { position: relative; width: min(340px, 40vw); }
.arama input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 38px;
  border: 0;
  border-radius: 999px;
  background: var(--yuzey);
  box-shadow: var(--yuzey-golge);
}
.arama input::placeholder { color: #6b7a6f; }
.arama input:hover { box-shadow: 0 6px 28px rgba(29, 53, 39, 0.22); }
.ara-ikon {
  position: absolute; left: 14px; top: 13px;
  width: 16px; height: 16px;
  fill: none; stroke: var(--metin-ikinci); stroke-width: 1.8; stroke-linecap: round;
  pointer-events: none;
}
#sonuclar {
  position: absolute;
  top: 48px; left: 0; right: 0;
  margin: 0; padding: 6px;
  list-style: none;
  background: var(--yuzey);
  border-radius: var(--yaricap);
  box-shadow: var(--yuzey-golge);
  max-height: 320px;
  overflow-y: auto;
}
#sonuclar li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
#sonuclar li[aria-selected="true"], #sonuclar li:hover { background: #ecefe4; }
#sonuclar li .avatar { width: 28px; height: 28px; font-size: 11px; }
#sonuclar li .sonuc-ad { font-weight: 500; }
#sonuclar li .sonuc-sayi { margin-left: auto; color: var(--metin-ikinci); font-size: 13px; font-variant-numeric: tabular-nums; }
#sonuclar li.bos { cursor: default; color: var(--metin-ikinci); display: block; line-height: 1.45; }
#sonuclar li.bos:hover { background: none; }

.birincil {
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--vurgu);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--yuzey-golge);
  white-space: nowrap;
}
.birincil:hover { background: var(--vurgu-koyu); }
.birincil:active { transform: translateY(1px); }

/* Ağaç kartı */
.kart {
  position: fixed;
  left: 20px; bottom: 56px;
  width: 280px;
  padding: 16px;
  background: var(--yuzey);
  border-radius: var(--yaricap);
  box-shadow: var(--yuzey-golge);
}
.kart-ust { display: flex; gap: 12px; align-items: center; padding-right: 24px; }
.kart-ad { margin: 0; font-family: var(--font-baslik); font-weight: 400; font-size: 18px; line-height: 1.2; overflow-wrap: anywhere; }
.kart-kullanici { margin: 2px 0 0; color: var(--metin-ikinci); font-size: 14px; overflow-wrap: anywhere; }
.kart-bilgi { display: flex; gap: 24px; margin: 14px 0 0; }
.kart-bilgi dt { font-size: 12px; color: var(--metin-ikinci); }
.kart-bilgi dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.kapat {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  display: grid; place-items: center;
}
.kapat:hover { background: #ecefe4; }
.kapat svg, .kontroller svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.avatar {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
}

/* Yakınlaştırma */
.kontroller {
  position: fixed;
  right: 20px; bottom: 56px;
  display: flex; flex-direction: column;
  background: var(--yuzey);
  border-radius: var(--yaricap);
  box-shadow: var(--yuzey-golge);
  overflow: hidden;
}
.kontroller button {
  width: 44px; height: 44px;
  border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center;
}
.kontroller button + button { border-top: 1px solid var(--cizgi); }
.kontroller button:hover { background: #ecefe4; }
.kontroller button:disabled { color: #a8b0a6; cursor: default; background: transparent; }

/* Ölçek çubuğu */
.olcek {
  position: fixed;
  left: 20px; bottom: 18px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
  pointer-events: none;
}
#olcek-cizgi {
  display: block; height: 6px;
  border: 2px solid #fff; border-top: 0;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.4));
}

.ipucu {
  position: fixed;
  left: 50%; bottom: 14px;
  transform: translateX(-50%);
  margin: 0;
  max-width: calc(100% - 32px);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(251, 250, 245, 0.92);
  color: var(--metin-ikinci);
  font-size: 13px;
  text-align: center;
  box-shadow: var(--yuzey-golge);
  transition: opacity 0.4s;
  pointer-events: none;
}
.ipucu.sakli { opacity: 0; }

/* Pencere */
.pencere {
  width: min(420px, calc(100% - 32px));
  border: 0;
  border-radius: 16px;
  padding: 24px;
  background: var(--yuzey);
  color: var(--metin);
  box-shadow: 0 20px 60px rgba(20, 40, 28, 0.3);
}
.pencere::backdrop { background: rgba(23, 48, 34, 0.35); }
.pencere h2 { margin: 0 0 12px; font-family: var(--font-baslik); font-weight: 400; font-size: 22px; }
.pencere ol { margin: 0 0 12px; padding-left: 20px; line-height: 1.55; }
.pencere .not { margin: 0 0 10px; color: var(--metin-ikinci); font-size: 14px; line-height: 1.5; }
.pencere form { margin-top: 18px; display: flex; justify-content: flex-end; }

.yukleniyor {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: #dfeee9;
  font-family: var(--font-baslik);
  font-size: 20px;
  color: var(--metin-ikinci);
  transition: opacity 0.4s;
}
.yukleniyor.bitti { opacity: 0; pointer-events: none; }

.durum-mesaj {
  position: fixed;
  left: 50%; top: 42%;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100% - 32px));
  padding: 22px 24px;
  background: var(--yuzey);
  border-radius: 16px;
  box-shadow: var(--yuzey-golge);
  text-align: center;
}
.durum-mesaj p { margin: 0 0 16px; font-family: var(--font-baslik); font-size: 19px; line-height: 1.35; }
.avatar { background-size: cover; background-position: center; }
.ornek[hidden] { display: none; }

@media (max-width: 640px) {
  .ust { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .marka h1 { font-size: 20px; }
  .birincil { height: 38px; padding: 0 14px; }
  .arama { order: 3; width: 100%; }
  .kart { left: 16px; right: 76px; width: auto; bottom: 52px; }
  .kontroller { right: 16px; bottom: 52px; }
  .olcek { left: 16px; bottom: 16px; }
  .ipucu { bottom: auto; top: 118px; }
}

@media (prefers-reduced-motion: reduce) {
  .ipucu, .yukleniyor { transition: none; }
}
