:root {
  --kagit: #f3efe6;
  --murekkep: #221c16;
  --soluk: #6f655c;
  --cizgi: #e6dccb;
  --vurgu: #e36b2c;
  --vurgu-koyu: #c6531c;
  --beyaz: #fffdf9;
  --golge: 0 12px 32px rgba(70, 42, 16, 0.08);
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  color: var(--murekkep);
  background: #e7f0d8;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
body.gece { background: #141a22; color: #f4efe6; color-scheme: dark; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--vurgu);
  outline-offset: 2px;
}
.giris {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.kart-giris, .panel, .mesaj-kutu, .kart, .arama, .onizleme {
  background: var(--beyaz);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  box-shadow: var(--golge);
}
.kart-giris { width: min(420px, 100%); padding: 28px; }
.marka { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.nokta { width: 12px; height: 12px; border-radius: 50%; background: var(--vurgu); display: inline-block; }
h1 { font-size: 1.6rem; margin: 12px 0; }
label { display: block; font-size: 0.85rem; margin-bottom: 6px; }
input[type="password"], input[type="search"], input[type="text"], select, textarea {
  width: 100%;
  border: 1px solid var(--cizgi);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
}
textarea { min-height: 88px; resize: vertical; }
.birincil, .ikincil, .hayalet {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 44px;
}
.birincil { background: var(--vurgu); color: white; }
.ikincil, .hayalet { background: #fff; border: 1px solid var(--cizgi); }
.ust {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 252, 247, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--cizgi);
}
body.gece .ust { background: rgba(20, 26, 34, 0.92); border-color: #2c3542; }
.sekme-serit, .araclar { display: flex; gap: 6px; align-items: center; overflow-x: auto; }
.sekme, .arac {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 40px;
  white-space: nowrap;
}
.sekme.secili, .arac.secili { background: #221c16; color: white; }
.sahne-alani { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 12px; }
.sahne-alani.panel-acik { grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); }
.ofis-tuval { position: relative; }
.ofis-tuval svg { width: 100%; height: auto; display: block; }
.kisi { cursor: pointer; }
.balonlar { position: absolute; inset: 0; pointer-events: none; }
.balon {
  position: absolute;
  transform: translate(-50%, -120%);
  pointer-events: auto;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.balon.calisiyor { box-shadow: 0 6px 16px rgba(227, 107, 44, 0.25); }
.balon.hata { border-color: #e2554b; }
.balon.limit { color: #6a4e96; }
.limitler {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 16px 20px;
}
.cubuk {
  background: white;
  border-radius: 999px;
  padding: 8px 12px;
  min-width: min(280px, 100%);
  box-shadow: var(--golge);
}
.serit { height: 6px; background: #efe8dc; border-radius: 99px; margin-top: 6px; overflow: hidden; }
.dolu { height: 100%; background: #3d9a62; border-radius: 99px; }
.cubuk.yok .serit { background: repeating-linear-gradient(90deg, #efe8dc, #efe8dc 6px, transparent 6px, transparent 10px); }
.panel { padding: 16px; max-height: calc(100vh - 96px); overflow: auto; }
.panel h2 { margin: 0 0 4px; font-size: 1.25rem; }
.soluk { color: var(--soluk); font-size: 0.9rem; }
.durum {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  margin: 8px 0;
}
.durum.calisiyor { background: #fff1e8; color: var(--vurgu-koyu); }
.durum.musait { background: #e7f6ec; color: #1f7a42; }
.durum.hata { background: #fdeceb; color: #b42318; }
.durum.limit { background: #f3eef8; color: #6d4ea8; }
.liste { display: grid; gap: 16px; }
.oda-baslik {
  display: inline-block;
  background: #1c1915;
  color: white;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.kart {
  width: 100%;
  text-align: left;
  padding: 12px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  margin-bottom: 8px;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
}
.projeler, .kutuphane { display: grid; gap: 10px; padding: 12px; }
.satir { background: white; border-radius: 14px; padding: 12px; box-shadow: var(--golge); }
.filtre { display: flex; gap: 8px; flex-wrap: wrap; }
.filtre select, .filtre input { width: auto; min-width: 140px; }
.kutuphane { grid-template-columns: minmax(220px, 320px) 1fr; }
.onizleme { padding: 16px; min-height: 240px; }
.onizleme img, .onizleme iframe { max-width: 100%; width: 100%; border: 0; border-radius: 12px; }
.prose h1, .prose h2, .prose h3 { line-height: 1.25; }
.prose pre { overflow: auto; background: #f6f1e8; padding: 8px; border-radius: 8px; }
.mesaj-kutu {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(420px, calc(100vw - 24px));
  z-index: 30;
  padding: 14px;
  max-height: min(80vh, 640px);
  overflow: auto;
}
.mesaj-satir { padding: 8px 0; border-bottom: 1px solid var(--cizgi); }
.foto-serit, .secilen { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; }
.foto-serit button, .secilen button { border: 0; background: transparent; padding: 0; }
.foto-serit img, .secilen img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.isik { position: fixed; inset: 0; background: rgba(10, 10, 10, 0.92); z-index: 40; display: flex; flex-direction: column; }
.isik-ust { display: flex; justify-content: space-between; gap: 8px; padding: 12px; }
.isik-govde { flex: 1; overflow: hidden; touch-action: none; display: grid; place-items: center; }
.isik-govde img { max-width: 100%; max-height: 100%; transform-origin: center center; }
.hata-yazi { color: #b42318; }
.uyari { background: #fff6e8; color: #8a4b12; border-radius: 10px; padding: 8px; }
@media (max-width: 820px) {
  .ust { flex-wrap: wrap; }
  .sekme-serit { order: 3; width: 100%; }
  .sahne-alani.panel-acik { grid-template-columns: 1fr; }
  .panel { position: fixed; inset: 0; z-index: 25; max-height: none; border-radius: 0; }
  .kutuphane { grid-template-columns: 1fr; }
  .balon { font-size: 10px; max-width: 140px; }
  .mesaj-kutu { left: 8px; right: 8px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}
