:root {
  --ink: #17201d;
  --muted: #66706c;
  --line: #d9e2db;
  --paper: #f7f9f5;
  --mono: "DM Mono", monospace;
  --sans: "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
}

body,
html {
  margin: 0;
  padding: 0;
  height: 100dvh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Geniş ekranlarda scroll'u kaldırır */
}

/* Dokunmatik tarayıcıların (iOS Safari, Android Chrome) dokunulan öğeye bir anlık bindirdiği gri/mavi
   vurguyu kapatır. Düğmelerin kendi :hover/:active geçişleri geri bildirimi zaten veriyor. */
* {
  -webkit-tap-highlight-color: transparent;
}

input, textarea {
  -webkit-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
  user-select: auto;
}

/* 
 * Ana Düzlem (Desktop)
 * Ekranı yatayda ikiye böler (Sol Menü | Sağ Sahne)
 */
.app-shell {
  display: flex;
  flex-direction: row;
  height: 100dvh;
  width: 100%;
}

/* Sol Menü (Sidebar) */
.toolbar {
  width: 320px;
  min-width: 320px;
  padding: 2rem;
  background: white;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  overflow-y: auto;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.03);
  z-index: 10;
}

.toolbar h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.search-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 250px;
  overflow-y: auto;
  touch-action: pan-y;
  /* İçerisindeki listenin kaydırılabilmesine izin ver */
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: none;
  margin-top: 4px;
}

.search-dropdown.active {
  display: block;
}

.search-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: background 0.1s;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover,
.search-item.selected {
  background: var(--paper);
}

.search-item strong {
  color: var(--ink);
  font-weight: 700;
}

.search-item small {
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

.search-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #66706c;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  pointer-events: none;
  z-index: 1;
}

.search-panel input {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  background: #f0f2f1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.search-panel input:focus {
  border-color: #6e9e9d;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.search-panel button:not(.search-clear-btn) {
  padding: 0.85rem 1.5rem;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.search-panel button:not(.search-clear-btn):hover {
  background: #394044;
}

.search-clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #b5bfba;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  z-index: 1;
}

.search-clear-btn:hover {
  color: #8f9c95;
}

.search-clear-btn:active {
  transform: translateY(-50%) scale(0.93);
}

.search-clear-btn:focus-visible {
  outline: 2px solid #578a89;
  outline-offset: 2px;
}

.search-clear-btn svg {
  width: 100%;
  height: 100%;
  display: block;
}

.search-input-wrap input:placeholder-shown ~ .search-clear-btn {
  display: none;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: #6e9e9d;
  color: var(--ink);
}

.filter-btn.active {
  background: #6e9e9d;
  color: white;
  border-color: #6e9e9d;
}

/* İkonlu düğmeler (Paylaş, Filtre, Rastgele): mobil menüde ikon + etiket yan yana */
.filter-btn.has-icon {
  position: relative; /* filtre rozeti için */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Aktif filtre sayısı: düğmenin sağ üstünde bildirim rozeti; simge değişmez */
.filter-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #6e9e9d;
  color: #fff;
  border: 2px solid #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  font-family: var(--sans), -apple-system, sans-serif;
  pointer-events: none;
}

.filter-btn .btn-icon {
  flex-shrink: 0;
}

/* Filtre ikonundaki sürgü topuzları: dolu daire, çizgiyi kesen ince arka plan halkası */
.filter-btn .btn-icon .knob {
  fill: currentColor;
  stroke: var(--paper);
  stroke-width: 2;
}

.filter-btn.active .btn-icon .knob {
  stroke: #6e9e9d;
}

/* Ayarlar menüsü (Kendini Ekle, cetvel/birim, dil, giriş): her ekran boyutunda ortalanmış bir pencere.
   Mobilde arama kutusunun yanındaki dişli, masaüstünde alt sıradaki dişli açar. */
/* Filtre penceresiyle aynı geçiş: arka plan kararıp bulanıklaşır, içerik alttan yükselerek belirir */
.actions-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(23, 32, 29, 0.46); /* backdrop-filter: blur kaldırıldı (Safari'de solma boyunca her kare yeniden bulanıklaştırıyordu) */
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.actions-wrapper.open {
  opacity: 1;
  visibility: visible;
}

.actions-modal-content {
  background: white;
  padding: 24px;
  border-radius: 12px;
  width: 80%;
  max-width: 300px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.actions-wrapper.open .actions-modal-content {
  transform: translateY(0);
}

.mobile-modal-header {
  display: flex !important;
}

.actions-wrapper .filter-btn {
  width: 100%;
  margin: 0 0 8px 0;
}

.actions-wrapper .filter-panel {
  flex-direction: column;
  gap: 8px;
}

/* Sol sütunun altı: masaüstünde Ayarlar, Paylaş, Filtre, Rastgele yuvarlak simge düğmeleri sağa yaslı durur */
.toolbar-footer {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.toolbar-footer:empty {
  display: none;
}

.toolbar-footer .filter-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 0;
  border-radius: 50%;
  gap: 0;
  color: var(--muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.toolbar-footer .filter-btn .btn-icon {
  width: 22px;
  height: 22px;
}

.toolbar-footer .filter-btn .btn-label {
  display: none;
}

/* Alt yuvarlak düğmede aktif filtre: düğme dolmaz, yalnızca kenar rengi ve rozet belirir */
.toolbar-footer .filter-btn.active {
  background: var(--paper);
  color: #6e9e9d;
  border-color: #6e9e9d;
}

.toolbar-footer .filter-btn.active .btn-icon .knob {
  stroke: var(--paper);
}

.toolbar-footer .filter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.toolbar-footer .filter-btn:active {
  transform: translateY(0);
}

.ruler-toggle-group {
  display: flex;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.ruler-toggle-group:hover {
  border-color: #6e9e9d;
}

.ruler-btn-left, .ruler-btn-right {
  background: transparent;
  border: none;
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.ruler-btn-left {
  border-right: 1px solid var(--line);
  flex: 0 0 auto;
}

.ruler-btn-right {
  width: 50px;
  text-align: center;
}

.ruler-btn-left:hover, .ruler-btn-right:hover {
  background: rgba(110, 158, 157, 0.1);
  color: var(--ink);
}

.ruler-btn-left.off {
  opacity: 0.5;
}

.tags-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.character-tag {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--paper);
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  border: 1px solid var(--line);
  transition: transform 0.1s, box-shadow 0.1s;
}

.character-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
}

.character-tag .tag-text {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.character-tag .tag-height {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0.75rem 0 0.5rem;
  flex: none;
}

.character-tag button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-weight: bold;
  font-size: 1.4rem;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.character-tag button:hover {
  color: #db2739;
}

/* Ana Sahne (Sağ Kısım) */
.stage-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #fcfcfc;
  position: relative;
  overflow: hidden;
}

.stage-frame {
  flex: 1;
  width: 100%;
  height: 100%;
  display: block;
}

#comparison-stage {
  width: 100%;
  height: 100%;
}

.draggable-avatar {
  touch-action: none;
  /* Mobilde kaydırma jestlerini engeller, sürüklemeye izin verir */
  /* Sürüklerken uygulanan büyütme figürün ayak ortasından yapılır (yer değiştirme etkilenmez) */
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transition: filter 0.25s ease;
}
/* Tutulan figür: "öne gelmiş" hissi için hafif gölge (yalnızca imleçli cihazlarda, maliyet düşük kalsın) */
@media (hover: hover) {
  .draggable-avatar.lifted { filter: drop-shadow(0 12px 10px rgba(23, 32, 29, 0.22)); }
}

/* SVG Metin Tasarımları */
.stage-ruler-label {
  fill: #6d7a72;
  font: 11px var(--mono);
}

.stage-label-interactive {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  min-width: 100%;
}

.stage-label-interactive:hover {
  width: max-content;
}

.stage-label-pill {
  user-select: none;
  -webkit-user-select: none;
}

.stage-label-text:hover text:first-of-type {
  fill: #578a89;
}

.stage-remove-btn {
  cursor: pointer;
}

.stage-remove-btn circle {
  transition: fill 0.15s ease;
}

.stage-remove-btn text {
  transition: fill 0.15s ease;
}

.stage-remove-btn:hover circle {
  fill: #e2e7e4;
}

.stage-remove-btn:hover text {
  fill: #db2739;
}

.stage-name {
  font: 700 16px var(--sans);
  letter-spacing: -.5px;
  transition: fill 0.2s;
}

.stage-name:hover {
  fill: #578a89 !important;
}

.stage-height {
  font: 11px var(--mono);
}

/* Cetvel Çizgileri */
.stage-grid {
  stroke: #d9e2db;
  stroke-width: 1;
}

.stage-grid--major {
  stroke: #c2ccc6;
  stroke-width: 1.5;
}

/* Cetvel Gizle/Göster Butonu */
.ruler-toggle-btn {
  background: white;
  border: 1px solid var(--line);
  padding: 0;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--muted);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.ruler-toggle-btn:hover {
  color: var(--ink);
  border-color: #6e9e9d;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* 
 * Mobil Uyumluluk (Responsive)
 * Tablet ve telefonlarda sol menüyü tekrar üste (yatay/üst düzen) alır
 */
@media (max-width: 900px) {

  body,
  html {
    overflow: hidden;
    /* Dikey kaydırmayı tamamen devre dışı bırak */
    touch-action: none;
    /* iOS Safari'de pinch-to-zoom'u kesin olarak engeller */
  }

  .app-shell {
    flex-direction: column;
    height: 100dvh;
    /* Sayfa boyu kadar uzansın */
    overflow: hidden;
    /* Taşan kısmı gizlesin */
    background-color: #fcfcfc;
  }

  .toolbar {
    width: 100%;
    min-width: auto;
    border-right: none;
    border-bottom: none;
    background-color: transparent;
    padding: 1rem;
    gap: 1rem;
    box-shadow: none;
    overflow: visible;
    z-index: 50;
    /* Autocomplete menüsünün üste çıkması için */
  }

  .mobile-only-btn {
    display: flex !important;
  }

  /* Mobilde alt düğme sırası yok; dişli arama kutusunun yanında, diğerleri menüde */
  .toolbar-footer {
    display: none;
  }

  .tags-container {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .character-tag {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    flex: 1 1 0;
    min-width: 0;
    justify-content: space-between;
  }

  .tag-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .stage-card {
    /* Mobilde sahne, arama çubuğunun altındaki tüm alanı kullanır (figürler daha büyük çizilir) */
    flex: 1;
    min-height: 0;
    height: auto;
    overflow: visible;
  }
}

/* --- Modal Styles --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: rgba(23, 32, 29, 0.46); /* backdrop-filter: blur kaldırıldı (Safari'de solma boyunca her kare yeniden bulanıklaştırıyordu) */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  /* Kapalıyken tıklama almasın: "visibility" geçiş boyunca "visible" kaldığından
     kart solarken içindeki bağlantılar 300 ms daha tıklanabiliyordu. pointer-events
     geçişe girmez, sınıf kalkar kalkmaz uygulanır. Görünürlük de kapanışta hemen değil,
     solma bittikten sonra gizlenir (geçiş süresi kadar gecikme). */
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.modal-content {
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--ink);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ink-light);
  line-height: 1;
}

.modal-body {
  padding: 1.5rem;
  max-height: 60vh;
  overflow-y: auto;
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group h3 {
  margin: 0 0 0.8rem 0;
  font-size: 0.9rem;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-group label {
  display: inline-flex;
  align-items: center;
  margin-right: 1.2rem;
  margin-bottom: 0.8rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--ink);
}

.filter-group input[type="checkbox"] {
  margin-right: 0.5rem;
  accent-color: #6e9e9d;
  width: 1.1rem;
  height: 1.1rem;
}

.modal-footer {
  padding: 1.2rem 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  background: #fdfdfc;
}

.modal-btn-secondary,
.secondary-btn {
  padding: 0.6rem 1.2rem;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.2s;
}

.modal-btn-secondary:hover,
.secondary-btn:hover {
  background: #f0f0ed;
}

.modal-btn-primary,
.primary-btn {
  padding: 0.6rem 1.2rem;
  background: #17201d;
  border: 1px solid #17201d;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: white;
  transition: all 0.2s;
}

.modal-btn-primary:hover,
.primary-btn:hover {
  background: #2c3e38;
}

.modal-btn-primary:disabled,
.primary-btn:disabled,
.modal-btn-secondary:disabled,
.secondary-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  #active-tags {
    display: none !important;
  }
}

#models-group {
  view-transition-name: models-group;
}

::view-transition-group(root) {
  animation: none;
}

html.drag-transition ::view-transition-group(*) {
  animation-timing-function: ease-out;
  animation-duration: 0.35s;
}

html.swipe-transition::view-transition-group(root) {
  animation: none;
}

html.swipe-transition::view-transition-old(models-group) {
  animation: slide-up-out 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

html.swipe-transition::view-transition-new(models-group) {
  animation: slide-up-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slide-up-out {
  to { transform: translateY(-100%); }
}

@keyframes slide-up-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes skeleton-delay-show {
  to { opacity: 1; }
}

@keyframes skeleton-shimmer {
  0% { opacity: 0.5; }
  50% { opacity: 0.8; }
  100% { opacity: 0.5; }
}

.avatar-img {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  -webkit-touch-callout: none !important;
  -webkit-user-drag: none !important;
  user-drag: none !important;
}

.avatar-img.loaded {
  opacity: 1;
}

/* Görsel ve Model Koruma (Sağ tık, sürükleme ve mobil basılı tutma menüsü engeli) */
img, image, .avatar-img, .draggable-avatar, #stage, .stage-container, .profile-modal img, .profile-image-container img {
  -webkit-touch-callout: none !important;
  -webkit-user-drag: none !important;
  -khtml-user-drag: none !important;
  -moz-user-drag: none !important;
  -o-user-drag: none !important;
  user-drag: none !important;
}

.skeleton-group {
  opacity: 0;
  pointer-events: none;
  animation: skeleton-delay-show 0.1s forwards 0.5s;
}

.skeleton-group.loaded {
  animation: none;
  opacity: 0 !important;
  transition: opacity 0.3s ease-out;
}

/* Parıltı en fazla ~30 sn sürer (görsel hiç yüklenmezse sonsuza kadar sahneyi yeniden boyamasın); görsel yüklenince hemen durur
   ve iskelet DOM'dan kaldırılır (app.js avatar-img onload). Safari SVG alt öğe animasyonlarını GPU'ya veremez: her karede yeniden boyar. */
.skeleton-img {
  animation: skeleton-shimmer 1.5s ease-in-out 20 forwards;
}
.skeleton-group.loaded .skeleton-img {
  animation: none;
}

/* Cetvel sütununda dikey marka yazısı: sakin, grimsi */
.stage-brand {
  font-family: var(--sans), -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.12em;
  fill: #9aa69f;
  opacity: 0.95;
  pointer-events: none;
  user-select: none;
}

/* Marka yazısının hemen altındaki logo (aynı eksende) */
.stage-brand-logo {
  opacity: 0.9;
  pointer-events: none;
}

@media (max-width: 900px) {
  }

/* Boy aralığı sürgüsü: iki üst üste binen range girdisi, tek görünür ray */
.range-slider {
  padding: 0.2rem 0.3rem 0.4rem;
}
.range-slider-values {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--ink);
}
.range-slider-sep { color: var(--muted); }
.range-slider-track-wrap {
  position: relative;
  height: 28px;
}
.range-slider-track,
.range-slider-fill {
  position: absolute;
  top: 50%;
  height: 4px;
  border-radius: 2px;
  transform: translateY(-50%);
  pointer-events: none;
}
.range-slider-track { left: 0; right: 0; background: var(--line); }
.range-slider-fill { background: #6e9e9d; }
.range-slider-track-wrap input[type="range"] {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none; /* yalnızca tutamaçlar tıklanır */
}
.range-slider-track-wrap input[type="range"]::-webkit-slider-runnable-track { background: transparent; }
.range-slider-track-wrap input[type="range"]::-moz-range-track { background: transparent; }
.range-slider-track-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #6e9e9d;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  cursor: grab;
  pointer-events: auto;
  margin-top: 3px;
}
.range-slider-track-wrap input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #6e9e9d;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  cursor: grab;
  pointer-events: auto;
}
.range-slider-track-wrap input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; background: #f0f5f4; }

/* Dil seçici (CM/FT grubunun yanında) */
.lang-select {
  height: 36px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%2366706c' stroke-width='1.5'/></svg>") no-repeat right 10px center;
  color: var(--ink);
  font: 600 0.85rem var(--sans);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.lang-select:hover { border-color: #6e9e9d; }


/* ============================================================
   Yatay telefon (landscape, kısa ekran): üst çubuk sol çekmeceye taşınır,
   sahne tüm yüksekliği kullanır, isim kapsülleri sahnede çizilmez (isimler çekmecede).
   ============================================================ */
.drawer-toggle,
.drawer-backdrop {
  display: none;
}

@media (orientation: landscape) and (max-height: 520px) {
  :root {
    --drawer-w: min(300px, 62vw);
  }

  body,
  html {
    overflow: hidden;
    touch-action: none;
  }

  .app-shell {
    flex-direction: row;
    height: 100dvh;
    overflow: hidden;
    background-color: #e8e6e1;
  }

  /* Çekmece */
  .toolbar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--drawer-w);
    min-width: 0;
    padding: 0.75rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    gap: 0.75rem;
    background: #fcfcfc;
    border-right: 1px solid var(--line);
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    overflow-x: visible;
    z-index: 1500;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.drawer-open .toolbar {
    transform: translateX(0);
  }

  .toolbar .search-panel {
    flex: none;
  }

  .mobile-only-btn {
    display: flex !important;
  }

  .toolbar-footer {
    display: none;
  }

  /* Sahnedeki kişiler: çekmecede dikey liste */
  #active-tags {
    display: flex !important;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow: visible;
  }

  .character-tag {
    flex: none;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
  }

  .character-tag .tag-text {
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .character-tag .tag-height {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--muted);
    margin-left: 0.5rem;
    flex: none;
  }

  /* Sahne tüm ekranı kaplar */
  .stage-card {
    flex: 1;
    width: 100%;
    height: 100dvh;
  }

  /* Perde */
  .drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(23, 32, 29, 0.25);
    z-index: 1400;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
  }

  body.drawer-open .drawer-backdrop {
    opacity: 1;
    visibility: visible;
  }

  /* Sol kenardaki kulp: çekmece açılınca onunla birlikte kayar, ok yön değiştirir */
  .drawer-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 0;
    top: 50%;
    width: 30px;
    height: 64px;
    padding: 0;
    margin: 0;
    border: 1px solid var(--line);
    border-left: none;
    border-radius: 0 14px 14px 0;
    background: #ffffff;
    color: #4a5550;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    z-index: 1600;
    transform: translateY(-50%);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
  }

  body.drawer-open .drawer-toggle {
    left: var(--drawer-w);
  }

  .drawer-toggle-icon {
    transition: transform 0.3s ease;
  }

  body.drawer-open .drawer-toggle-icon {
    transform: rotate(180deg);
  }
}

/* Auth Modal Grid & Fullscreen Mobile */
.auth-modal-content {
  max-width: 1050px !important;
  padding: 10px;
}

.auth-modal-content .modal-body {
  max-height: 85vh;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media (min-width: 768px) {
  .auth-grid {
    grid-template-columns: 320px 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .auth-modal-content {
    width: 100% !important;
    height: 100% !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    transform: translateY(0) !important;
    margin: 0 !important;
  }
}

/* Gender Custom Radio Buttons */
input[type="radio"][value="male"]:checked + .gender-xy {
  border-color: #367BE2 !important;
  color: #367BE2 !important;
  background-color: rgba(54, 123, 226, 0.1);
}
input[type="radio"][value="female"]:checked + .gender-xx {
  border-color: #FF85BA !important;
  color: #FF85BA !important;
  background-color: rgba(255, 133, 186, 0.14);
}


/* iOS tarzı aç/kapa anahtarı (kişi ve kıyafet aktif/pasif) */
.ios-switch { position: relative; display: inline-block; width: 51px; height: 31px; flex-shrink: 0; vertical-align: middle; }
.ios-switch input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.ios-switch .track {
  position: absolute; inset: 0; border-radius: 31px; background: #e9e9ea; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
  transition: background 0.25s ease;
}
.ios-switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15), 0 1px 1px rgba(0,0,0,0.16);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ios-switch input:checked + .track { background: #34c759; }
.ios-switch input:checked + .track::after { transform: translateX(20px); }
.ios-switch input:focus-visible + .track { outline: 2px solid #578a89; outline-offset: 2px; }
.switch-row { display: flex; align-items: center; gap: 10px; }
.switch-row .switch-state { font-size: 0.85rem; color: #6d7a72; min-width: 3em; text-align: right; }

/* --- Yer imleri --- */
.bookmark-btn {
  position: absolute; left: 15px; top: 15px; z-index: 10;
  width: 34px; height: 34px; padding: 0; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,0.7); color: #17201d;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}
.bookmark-btn:hover { background: #fff; transform: scale(1.08); }
.bookmark-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; transition: fill 0.15s ease; }
.bookmark-btn.active svg { fill: currentColor; }
.bookmark-btn.pop svg { animation: bookmark-pop 0.3s ease; }
@keyframes bookmark-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

.auth-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0; padding: 0 1.5rem; flex-shrink: 0; background: #fff; }
/* Giriş yapılmışken hesap modalı ekrana orantılı SABİT yükseklikte: içerik az/çok ya da sekme değişse de boyut aynı.
   Başlık ve sekme çubuğu sabit kalır, yalnızca içerik (modal-body) kayar. */
.auth-modal-content.logged { height: 72vh; height: 72dvh; }
.auth-modal-content.logged #auth-logged-view { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; padding: 20px 1.5rem 24px; }
.auth-tab {
  background: none; border: none; cursor: pointer; padding: 10px 16px; font-size: 0.98rem; font-weight: 600;
  color: #6d7a72; border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: inherit;
}
.auth-tab:hover { color: #17201d; }
.auth-tab.active { color: #578a89; border-bottom-color: #578a89; }
.auth-tab .count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 10px; background: #eef2ef; color: #578a89; font-size: 0.8rem; line-height: 20px; }
.auth-tab-pane { display: none; }
.auth-tab-pane.active { display: block; }

.bookmark-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 18px 12px; padding: 4px 2px; }
.bookmark-tile { position: relative; text-align: center; cursor: pointer; }
.bookmark-tile .bm-avatar {
  width: 92px; height: 92px; margin: 0 auto 8px auto; border-radius: 50%; overflow: hidden;
  background: #f0f3f1; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,0.10);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.bookmark-tile:hover .bm-avatar { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.14); }
.bookmark-tile .bm-avatar { position: relative; }
.bookmark-tile .bm-avatar img { position: absolute; max-width: none; } /* boyut/konum app.js avatarLayout'tan */
.bookmark-tile .bm-name { font-size: 0.9rem; font-weight: 600; color: #17201d; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bookmark-tile .bm-meta { font-size: 0.78rem; color: #6d7a72; font-family: var(--mono); margin-top: 2px; }
.bookmark-tile .bm-action {
  position: absolute; top: 0; width: 24px; height: 24px; border-radius: 50%; border: 1px solid #d9e2db; background: #fff;
  color: #4a5550; font-size: 14px; line-height: 22px; text-align: center; cursor: pointer; padding: 0;
  opacity: 0; transition: opacity 0.15s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.bookmark-tile .bm-remove { right: 6px; }
.bookmark-tile .bm-stage { left: 6px; color: #578a89; font-weight: 700; }
.bookmark-tile:hover .bm-action, .bookmark-tile:focus-within .bm-action { opacity: 1; }
@media (hover: none) { .bookmark-tile .bm-action { opacity: 1; } }
.bookmark-empty { color: #6d7a72; text-align: center; padding: 30px 10px; line-height: 1.5; }

/* --- Kişilerim penceresi: kart, oynat düğmesi, bağımsız kayan sütunlar --- */
#my-models-content .um-card { cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
#my-models-content .um-card:hover { border-color: #cfdcd6 !important; }
#my-models-content .um-card [data-outfit-id] { cursor: default; }
.um-play-btn {
  width: 30px; height: 30px; padding: 0; border: none; border-radius: 50%; cursor: pointer;
  background: transparent; color: #000; display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}
.um-play-btn:hover { background: #eef2ef; transform: scale(1.1); }
.um-play-btn svg { width: 22px; height: 22px; fill: currentColor; margin-left: 2px; }

@media (min-width: 768px) {
  #outfits-modal .modal-content { height: 88vh; height: 88dvh; }
  #outfits-modal .modal-body { flex: 1 1 auto; min-height: 0; max-height: none; overflow: hidden; display: flex; padding-bottom: 10px !important; }
  #outfits-modal .auth-grid { flex: 1 1 auto; min-height: 0; width: 100%; grid-template-rows: minmax(0, 1fr); }
  #outfits-modal .auth-grid-left { display: flex; flex-direction: column; min-height: 0; }
  #outfits-modal #my-models-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-bottom: 12px !important; padding-right: 6px; overscroll-behavior: contain; }
  #outfits-modal #show-new-person-form-btn { flex-shrink: 0; }
  #outfits-modal .auth-grid-right { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
}

/* --- Yeni kıyafet akışı: numaralı adımlar (tarif → prompt/Gemini → yükle) --- */
.um-step-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding-top: 4px; }
.um-step-head h3 { margin: 0; font-size: 1rem; color: #17201d; }
.um-step-num {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: #17201d; color: #fff;
  font-size: 0.8rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.um-step-hint { margin: 0 0 10px; font-size: 0.85rem; color: #6d7a72; line-height: 1.45; }


/* --- Mobil web: tam ekran hesap paneli (dişli → Ayarlar / Yer imleri / Kişilerim) --- */
.mobile-account {
  position: fixed; inset: 0; z-index: 1800; background: #fff;
  display: flex; flex-direction: column;
  transform: translateY(100%); visibility: hidden;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.32s;
}
.mobile-account.open { transform: translateY(0); visibility: visible; transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0s; }
.mobile-account.instant { transition: none; }
.ma-header { display: flex; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 12px 8px; flex-shrink: 0; }
.ma-side, .ma-close { width: 44px; flex-shrink: 0; }
.ma-title { flex: 1; text-align: center; margin: 0; font-size: 1.15rem; color: #17201d; }
.ma-close { background: none; border: none; font-size: 1.7rem; line-height: 1; color: #888; cursor: pointer; padding: 4px 0; text-align: right; }
.ma-tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 8px; flex-shrink: 0; }
.ma-tab {
  flex: 1; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 4px;
  font: inherit; font-size: 0.95rem; font-weight: 600; color: #6d7a72; cursor: pointer; white-space: nowrap;
}
.ma-tab.active { color: #578a89; border-bottom-color: #578a89; }
.ma-tab .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 5px; border-radius: 9px; background: #eef2ef; color: #578a89; font-size: 0.75rem; line-height: 18px; }
.ma-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); }
.ma-pane { display: none; }
.ma-pane.active { display: block; }
/* Sayfa yığını sarmalayıcıları (pushnav.css yeni düzeni açar). ESKİ düzende kök sarmalayıcı yok sayılır, detay sayfa ve örtü görünmez.
   pushnav.css / pushnav.js hiç yüklenmese bile panel eskisi gibi çalışsın diye bu varsayılanlar burada da durur. */
.ma-page-root { display: contents; }
.ma-page-detail, .ma-dim { display: none; }
/* Giriş kartı (taşınan #auth-unlogged-view ve #auth-header-logged) */
.ma-auth { background: #f7f9f5; border: 1px solid #eef2f0; border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.ma-auth:empty { display: none; }
.ma-auth #auth-unlogged-view { padding: 6px 0 2px !important; max-height: none; overflow: visible; text-align: center; }
.ma-auth #auth-unlogged-view h3 { margin-bottom: 14px !important; font-size: 1rem !important; }
.ma-auth #auth-header-logged { justify-content: space-between; }
.ma-auth #auth-header-logged #auth-modal-email { font-size: 0.92rem !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; }
/* Menü düğmeleri (taşınan Rastgele, Filtre, cetvel/birim, dil) */
.ma-menu { display: flex; flex-direction: column; gap: 8px; }
.ma-menu .filter-btn { width: 100%; margin: 0; }
.ma-menu .ruler-toggle-group { width: 100%; }
.ma-menu .lang-select { width: 100%; }
/* Giriş isteyen sekmeler */
.ma-login-card { background: #f7f9f5; border: 1px solid #eef2f0; border-radius: 14px; padding: 18px 16px; text-align: center; }
.ma-login-card p { margin: 0 0 14px; color: #6d7a72; line-height: 1.5; font-size: 0.95rem; }
.ma-login-btn { width: 100%; background: #fff; border: 1px solid #d9e2db; border-radius: 10px; padding: 12px; font: inherit; font-weight: 600; color: #17201d; cursor: pointer; }
/* Yer imleri (taşınan #auth-tab-bookmarks) */
#ma-bookmarks-slot .auth-tab-pane { display: block; }
#ma-bookmarks-slot .bookmark-grid { grid-template-columns: repeat(3, 1fr); }
/* Kişilerim (taşınan #outfits-modal .modal-body) */
#ma-people-slot .modal-body { padding: 0 !important; max-height: none; overflow: visible; }
#ma-people-slot .auth-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
#ma-people-slot .auth-grid > * { min-width: 0; }
#ma-people-slot #my-models-content [data-model-id] h3 { flex-wrap: wrap; }
#ma-people-slot #my-models-body { margin-bottom: 12px !important; }
#ma-people-slot .auth-grid-right { padding: 18px !important; }

/* Sağdan sola diller (Arapça): sayfanın yönü <html dir="rtl"> ile döner, ama SVG çizimleri (sahne, cetvel,
   isim kapsülleri, kıyafet önizlemesi) koordinatlarla yerleştirilmiş birer resimdir; yönü dilden bağımsız kalmalı.
   SVG'de RTL, text-anchor'ı ters çevirir (start → sağa yaslı): isimler kapsülden taşıp kırpılır, cetvel sayıları kayar.
   Arapça isimlerin kendi harf sırası yine doğru çizilir (çift yönlü metin algoritması metnin içinde çalışır). */
svg { direction: ltr; }

/* Profil kartı, yer imleri (auth) modalının üstüne açılması için DOM sırasını ezer */
#profile-modal { z-index: 1050; }


/* --- Kişilerim: arama kutusu (listenin üstünde sabit) --- */
.um-search-wrap { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 2px 0 10px; background: #fff; }
.um-search-box { flex: 1; min-width: 0; }
.um-search {
  width: 100%; height: 38px; min-width: 0; padding: 0 38px 0 40px; border: 1px solid #d9e2db; border-radius: 999px; font: inherit; font-size: 0.95rem;
  color: #17201d; background: #f9fbf9; outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.um-search:focus { border-color: #578a89; background: #fff; box-shadow: 0 0 0 3px rgba(87, 138, 137, 0.14); }
.um-search-wrap .search-clear-btn { right: 7px; width: 24px; height: 24px; }
.um-search-count { flex-shrink: 0; font-family: var(--mono); font-size: 0.8rem; color: #6d7a72; }
.um-search-count:empty { display: none; }
.um-list-sentinel { height: 1px; }
.um-list-more { text-align: center; color: #9aa69f; font-size: 0.85rem; padding: 6px 0 12px; }


/* --- Profil kartı: sağ alttaki "i" (kendi eklediğin kişiyi düzenle); kapat/yer imi düğmeleriyle orantılı --- */
.profile-info-btn {
  position: absolute; right: 15px; bottom: 15px; z-index: 10;
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid #d9e2db; cursor: pointer;
  background: rgba(255,255,255,0.9); color: #578a89; font: 700 13px/1 var(--sans); font-style: normal;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,0.08); padding: 0;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.profile-info-btn:hover { background: #578a89; color: #fff; transform: scale(1.08); }

/* --- Model Bildirim Modalı --- */
.report-modal-content {
  max-width: 480px;
  width: 92%;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  padding: 0;
}

.report-option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.report-option-label:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.report-option-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #dc2626;
  cursor: pointer;
  flex-shrink: 0;
}
.report-option-label:has(input[type="checkbox"]:checked) {
  background: #fef2f2;
  border-color: #fca5a5;
}
.report-option-text {
  font-size: 0.92rem;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.4;
}
#report-note:focus {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

/* --- Kişi formu: cinsiyet + milliyet yan yana --- */
.um-gender-nat { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
@media (max-width: 480px) { .um-gender-nat { grid-template-columns: 1fr; } }
.um-nat { position: relative; }
.um-nat-flag { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); height: 14px; width: auto; border-radius: 2px; box-shadow: 0 0 1px rgba(0,0,0,0.25); pointer-events: none; }
.um-nat-input {
  width: 100%; padding: 10px 12px 10px 12px; border: 1px solid #d9e2db; border-radius: 6px; background: #fff;
  font: inherit; font-size: 0.95rem; color: #17201d;
}
.um-nat.has-flag .um-nat-input { padding-left: 40px; }
.um-nat-input:focus { outline: none; border-color: #578a89; }
.um-nat-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; max-height: 240px; overflow-y: auto;
  background: #fff; border: 1px solid #d9e2db; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.10); padding: 4px;
}
.um-nat-list[hidden] { display: none; }
.um-nat-option { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 0.92rem; color: #17201d; }
.um-nat-option img { height: 14px; width: auto; border-radius: 2px; box-shadow: 0 0 1px rgba(0,0,0,0.25); flex-shrink: 0; }
.um-nat-option .code { margin-left: auto; font-family: var(--mono); font-size: 0.75rem; color: #9aa69f; }
.um-nat-option:hover, .um-nat-option.active { background: #eef2ef; }
.um-nat-empty { padding: 10px; font-size: 0.85rem; color: #6d7a72; text-align: center; }

/* Kişilerim penceresi profil kartının (z 1050) üstünde açılır: karttaki "i" ile gelince kart altta kalır,
   Esc/kapat önce bu pencereyi kapatır ve karta dönülür. Örnek seçici (2000) yine en üstte. */
#outfits-modal { z-index: 1100; }


/* --- Kişilerim kartları: isim yalnızca kart üzerine gelince altı çizili; sil düğmeleri tek biçim; oynat düğmesi belirgin --- */
.um-card-name { text-decoration: none; }
#my-models-content .um-card:hover .um-card-name { text-decoration: underline; }
.um-del-btn {
  width: 22px; height: 22px; padding: 0; border: none; border-radius: 50%; cursor: pointer; flex-shrink: 0;
  background: #d9534f; color: #fff; font: 700 16px/1 var(--sans); display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15); transition: transform 0.15s ease, background 0.15s ease;
}
.um-del-btn:hover { background: #c9302c; transform: scale(1.1); }
.um-del-btn.um-del-outfit { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; font-size: 15px; }
.um-play-btn { background: #eef2ef; border: 1px solid #d9e2db; color: #17201d; }
.um-play-btn:hover { background: #578a89; border-color: #578a89; color: #fff; transform: scale(1.08); }


/* --- Kişilerim: kartta profil görseli kutusu + profil görseli düzenleme bölümü --- */
.um-avatar-tile { width: 80px; height: 120px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; border-radius: 6px; border: 1px solid transparent; transition: border-color 0.15s ease, background 0.15s ease; }
.um-avatar-tile:hover { background: #f3f8f6; }
.um-avatar-tile.selected { border-color: #578a89; background: #f3f8f6; }
.um-avatar-circle { position: relative; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: #f0f3f1; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.um-avatar-circle img { position: absolute; max-width: none; }
.um-avatar-tile span { font-size: 0.72rem; color: #6d7a72; font-weight: 600; }
.um-av-layout { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: start; }
@media (max-width: 560px) { .um-av-layout { grid-template-columns: 1fr; } .um-av-previews { flex-direction: row !important; justify-content: center; } }
.um-av-previews { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.um-av-preview { position: relative; width: 140px; height: 140px; border-radius: 50%; overflow: hidden; background: #f0f3f1; border: 4px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.12); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.um-av-preview.dragging { cursor: grabbing; }
.um-av-preview img { position: absolute; max-width: none; pointer-events: none; }
.um-av-preview-small { width: 56px; height: 56px; border-width: 2px; cursor: default; box-shadow: 0 2px 6px rgba(0,0,0,0.10); }
.um-av-outfits { display: flex; gap: 8px; flex-wrap: wrap; }
.um-av-outfit { width: 58px; padding: 4px; border: 2px solid #e3e9e5; border-radius: 8px; background: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font: inherit; }
.um-av-outfit:hover { border-color: #b9cbc4; }
.um-av-outfit.selected { border-color: #578a89; background: #f3f8f6; }
.um-av-outfit .thumb { width: 44px; height: 66px; display: flex; align-items: center; justify-content: center; background: #f9f9f9; border-radius: 4px; overflow: hidden; color: #578a89; font-weight: 700; }
.um-av-outfit .thumb img { width: 100%; height: 100%; object-fit: contain; }
.um-av-outfit.passive .thumb img { opacity: 0.45; filter: grayscale(1); }
.um-av-outfit .lbl { font-size: 0.68rem; color: #6d7a72; max-width: 50px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-av-reset { margin-left: auto; background: #eef2ef; color: #578a89; border: 1px solid #d9e2db; border-radius: 6px; padding: 5px 12px; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.um-av-reset:hover { background: #e2eae6; }


/* --- Örnek selfie penceresi (vücut tipi / poz seçicisiyle aynı bölünmüş tasarım) --- */
.selfie-card { position: relative; max-width: 900px; width: 92%; padding: 0; overflow: hidden; }
.selfie-split { display: flex; flex-direction: row; height: min(80vh, 640px); overflow: hidden; }
.selfie-left { flex: 1; padding: 35px 30px; display: flex; flex-direction: column; justify-content: center; overflow-y: auto; background: #fff; min-width: 0; text-align: left; }
.selfie-left h2 { margin: 0 0 12px; font-size: 1.35rem; color: #17201d; }
.selfie-hint { margin: 0 0 30px; font-size: 0.95rem; color: #6d7a72; line-height: 1.5; }
.selfie-text { min-height: 110px; margin-top: 10px; }
.selfie-text strong { display: block; color: #1a1a1a; font-size: 1.15rem; margin-bottom: 8px; }
.selfie-text span { display: block; font-size: 0.95rem; color: #6d7a72; line-height: 1.55; }
.selfie-bottom { margin-top: auto; padding-top: 30px; }
.selfie-bottom input[type="range"] { width: 100%; margin: 8px 0 20px; accent-color: #578a89; }
.selfie-right { flex: 1.2; position: relative; background: #f4f6f5; min-width: 0; }
.selfie-stage { position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.selfie-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.18s ease; pointer-events: none; }
.selfie-stage img.on { opacity: 1; }
.selfie-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid #d9e2db; background: rgba(255,255,255,0.9); cursor: pointer; font-size: 24px; color: #4a5550; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,0.05); padding: 0; z-index: 2; }
.selfie-arrow:hover { background: #fff; }
.selfie-prev { left: 20px; } .selfie-next { right: 20px; }
.selfie-counter { position: absolute; left: 20px; top: 20px; z-index: 2; font-size: 0.85rem; font-weight: 500; color: #6d7a72; background: rgba(255,255,255,0.85); padding: 6px 14px; border-radius: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.selfie-x { position: absolute; top: 20px; right: 25px; z-index: 10; background: none; border: none; font-size: 1.8rem; cursor: pointer; color: #17201d; padding: 5px; line-height: 1; }
@media (max-width: 680px) {
  .selfie-card { width: 94%; max-height: 92dvh; overflow-y: auto; }
  .selfie-split { flex-direction: column-reverse; height: auto; overflow: visible; }
  .selfie-right { flex: none; height: 46dvh; }
  .selfie-left { flex: none; padding: 22px 20px 24px; justify-content: flex-start; overflow: visible; }
  .selfie-hint { margin-bottom: 14px; }
  .selfie-text { min-height: 0; margin-top: 0; }
  .selfie-bottom { padding-top: 14px; }
  .selfie-x { top: 12px; right: 14px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center; padding: 0; }
  .selfie-arrow { width: 38px; height: 38px; font-size: 20px; }
  .selfie-prev { left: 10px; } .selfie-next { right: 10px; } .selfie-counter { left: 10px; top: 10px; }
}


/* --- Ortak kaydet / onayla düğmesi: Profili Kaydet, Kıyafeti Kaydet, Profil Görselini Kaydet, Yükle ve Arka Planı Sil,
   Bu tipi/pozu seç, Anladım hep aynı görünür. Genişlik satır içi verilir (tam genişlik ya da flex:1). --- */
.um-save-btn, .modal-apply-btn {
  background: #578a89; color: #fff; border: none; border-radius: 6px; padding: 10px; cursor: pointer;
  font-size: 1rem; transition: all 0.3s;
}
.um-save-btn:hover:not(:disabled), .modal-apply-btn:hover:not(:disabled) { background: #4a7776; }
.um-save-btn:disabled, .modal-apply-btn:disabled { opacity: 0.6; cursor: not-allowed; }


/* --- Kıyafet düzenleme: önizleme + kontroller. Geniş ekranda yan yana; dar ekranda (telefon) tek sütun, yatay kaydırma yok --- */
.um-oe-grid { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 20px; align-items: start; }
.um-oe-controls, .um-oe-pair > * { min-width: 0; }
.um-oe-controls input[type="number"] { min-width: 0; }
@media (max-width: 640px) {
  .um-oe-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  /* Önizleme telefonda kısa: kontroller bir ekranda erişilebilir kalır (yükseklik değişince cetvel yeniden çizilir) */
  #um-outfit-preview-box { height: clamp(300px, 44dvh, 380px) !important; }
  /* Başlık kendi satırında; anahtar ve Sil altında */
  .um-oe-head { flex-wrap: wrap; row-gap: 8px; }
  .um-oe-head #um-outfit-edit-title { flex: 1 1 100%; white-space: normal !important; }
  /* Topuk ve saç payı yan yana */
  .um-oe-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .um-oe-pair h3 { font-size: 0.8rem; letter-spacing: 0.02em; }
}

/* Kaydet + Sahneye Al: masaüstünde yan yana; telefonda sığmazsa (dar ekran, uzun çeviri) ikinci düğme alt satıra iner */
.um-oe-actions { display: flex; gap: 10px; }
@media (max-width: 640px) {
  .um-oe-actions { flex-wrap: wrap; }
  .um-oe-actions #um-outfit-save-btn { flex: 1 1 140px !important; }
  .um-oe-actions #um-outfit-stage-btn { flex: 1 1 auto; }
}




/* --- Arka plan yükleme: kişinin kıyafet sırasının sonunda yer tutucu (silüet + bulanıklık + nabız) ve dönen ilerleme halkası --- */
.um-pending-tile { position: relative; width: 80px; height: 120px; flex-shrink: 0; border: 1px dashed #9db9b3; border-radius: 4px; overflow: hidden; background: #f4f6f5; cursor: default; }
.um-pending-tile .sil { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; filter: blur(4px); opacity: 0.2; animation: um-pulse 2.4s ease-in-out infinite; }
@keyframes um-pulse { 0%, 100% { opacity: 0.16; } 50% { opacity: 0.8; } } /* filter canlandırılmaz: Safari her karede yeniden bulanıklaştırır */
.ring { position: absolute; width: 46px; height: 46px; }
.um-pending-tile .ring { left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(255,255,255,0.88); border-radius: 50%; box-shadow: 0 1px 6px rgba(23,32,29,0.12); }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.ring circle { fill: none; stroke-width: 3.2; }
.ring .trk { stroke: #dbe6e2; }
.ring .bar { stroke: #578a89; stroke-linecap: round; transition: stroke-dashoffset 0.25s ease-out; }
.ring .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 11px/1 var(--mono); color: #17201d; }
.um-pending-tile.done .bar { stroke: #34c759; }
.um-pending-tile.done .pct { color: #1e9b43; font-size: 15px; }
.um-pending-tile.done .sil { animation: none; opacity: 0.5; filter: blur(1px); }
.um-pending-tile.failed { border-color: #d9534f; cursor: pointer; }
.um-pending-tile.failed .sil { animation: none; opacity: 0.12; }
.um-pending-tile.failed .bar { stroke: #d9534f; }
.um-pending-tile.failed .pct { color: #d9534f; font-size: 17px; }
.um-pending-tile .cap { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 0.68rem; font-weight: 600; color: #d9534f; }
.um-pending-tile .x { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; padding: 0; border: none; border-radius: 50%; background: rgba(217,83,79,0.9); color: #fff; font-size: 14px; line-height: 20px; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .um-pending-tile .sil { animation: none; opacity: 0.45; filter: blur(3px); } .ring .bar { transition: none; } }

/* Rozet: Kişilerim kapalıyken sağ üstte (telefonda altta ortada) */
.um-upload-chip { position: fixed; top: 14px; right: 14px; z-index: 900; display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 8px; background: #fff; border: 1px solid #d9e2db; border-radius: 999px; box-shadow: 0 4px 14px rgba(23,32,29,0.12); cursor: pointer; font: 600 0.85rem var(--sans, inherit); color: #17201d; }
.um-upload-chip[hidden] { display: none; }
.um-upload-chip .ring { position: relative; width: 34px; height: 34px; flex-shrink: 0; }
.um-upload-chip .ring .pct { font-size: 9.5px; }
@media (max-width: 900px) { .um-upload-chip { top: auto; bottom: 96px; right: auto; left: 50%; transform: translateX(-50%); } }

/* Bildirim (alt ortada; sağdaki düğme "Sahneye al" gibi bir eylem olabilir) */
.um-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); z-index: 10001; display: flex; align-items: center; gap: 12px; max-width: min(92vw, 520px); padding: 11px 14px 11px 18px; border-radius: 12px; background: #17201d; color: #fff; font-size: 0.92rem; line-height: 1.35; box-shadow: 0 10px 30px rgba(0,0,0,0.25); opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease; }
.um-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.um-toast.error { background: #8f2a25; }
.um-toast .msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.um-toast button { background: none; border: none; cursor: pointer; padding: 4px 6px; font: inherit; white-space: nowrap; }
.um-toast .act { color: #9fd3c7; font-weight: 700; }
.um-toast .close { color: rgba(255,255,255,0.7); font-size: 1.25rem; line-height: 1; }

/* Gizlilik / koşullar / destek bağlantıları (sayfalar: /privacy /terms /support). Kenar çubuğunda küçük, sönük satır; mobilde bu satır gizlenir,
   bağlantılar hesap panelindeki ayarlarda (giriş penceresinin notu ve hesap ayarları) durur. */
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 12px; margin-top: 10px; font-size: 11px; line-height: 1.5; }
.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links a:hover, .legal-links a:focus-visible { color: var(--ink); text-decoration: underline; }
.legal-links-inline { margin-top: 22px; font-size: 0.85rem; gap: 4px 16px; }
.legal-note { margin: 22px 20px 0; font-size: 0.8rem; line-height: 1.55; color: #6d7a72; text-align: center; }
.legal-note a { color: #578a89; text-decoration: none; white-space: nowrap; }
.legal-note a:hover { text-decoration: underline; }
@media (max-width: 900px) { .toolbar > .legal-links-side { display: none; } }
@media (orientation: landscape) and (max-height: 520px) { .toolbar > .legal-links-side { display: none; } }
/* Mobil hesap panelinde (ayarlar sekmesi): hesap silme düğmesi ve yasal bağlantılar menü bölmesinin sonunda */
#ma-menu-slot #auth-delete-account-btn { display: block; width: 100%; margin-top: 22px; }
#ma-menu-slot .legal-links-side { margin: 18px 0 10px; font-size: 0.85rem; gap: 4px 16px; }
/* Kenar çubuğu: bağlantı satırı üstteki yuvarlak düğmelere ve sütunun altına EŞİT ve kısa mesafede (16 px).
   .toolbar'ın 2rem satır aralığı ve 2rem alt dolgusu negatif kenar boşluğuyla 16 px'e indirilir. */
.toolbar > .legal-links-side { margin-top: calc(16px - 2rem); margin-bottom: calc(16px - 2rem); }

/* Yasal pencere (#legal-modal): ana sayfada açılır; içerik /api/legal/<sayfa> (backend/legal/*.html) */
#legal-modal { z-index: 2100; }
.legal-modal-content { width: min(760px, calc(100vw - 32px)); max-width: none; height: min(86dvh, 900px); border-radius: 16px; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22); }
.legal-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 10px; }
.legal-modal-head h2 { margin: 0; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legal-modal-close { flex-shrink: 0; width: 34px; height: 34px; border: none; border-radius: 50%; background: #f1f4f2; color: #4a5550; font-size: 1.4rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.legal-modal-close:hover { background: #e3e9e5; color: var(--ink); }
.legal-tabs { display: flex; gap: 4px; margin: 0 20px 12px; padding: 4px; background: #f1f4f2; border-radius: 12px; }
.legal-tab { flex: 1 1 0; min-width: 0; padding: 8px 6px; border: none; border-radius: 9px; background: transparent; color: #5d6762; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legal-tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.legal-modal-body { position: relative; flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; border-top: 1px solid var(--line); padding: 18px 24px 28px; outline: none; }
.legal-status { color: #5d6762; text-align: center; margin: 40px 0; }
.legal-status a { display: block; margin-top: 8px; color: #3f6968; }
.legal-doc { font-size: 0.95rem; line-height: 1.65; color: var(--ink); text-align: left; }
.legal-doc a { color: #3f6968; text-underline-offset: 2px; }
.legal-doc .legal-meta { color: #5d6762; font-size: 0.85rem; margin: 0 0 16px; }
.legal-doc h2 { font-size: 1.12rem; line-height: 1.3; margin: 30px 0 8px; letter-spacing: -0.01em; }
.legal-doc h3 { font-size: 1rem; margin: 18px 0 6px; }
.legal-doc p { margin: 0 0 12px; }
.legal-doc ul, .legal-doc ol { margin: 0 0 12px; padding-left: 1.3em; }
.legal-doc li { margin: 0 0 5px; }
.legal-doc .lead { font-size: 1rem; }
.legal-doc .legal-toc { background: #f7f9f5; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 0 0 20px; font-size: 0.9rem; }
.legal-doc .legal-toc strong { display: block; margin-bottom: 4px; }
.legal-doc .legal-toc ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 24px; }
.legal-doc .legal-toc li { margin: 0 0 2px; break-inside: avoid; }
.legal-doc .summary { background: #f7f9f5; border: 1px solid var(--line); border-left: 4px solid #578a89; border-radius: 12px; padding: 4px 16px 6px; margin: 18px 0 8px; }
.legal-doc .summary h2 { margin-top: 10px; font-size: 1.05rem; }
.legal-doc .note { background: #fff8e6; border: 1px solid #ecd9a6; border-radius: 10px; padding: 10px 14px; margin: 14px 0; }
.legal-doc .note p:last-child { margin-bottom: 0; }
.legal-doc table { width: 100%; border-collapse: collapse; margin: 6px 0 16px; font-size: 0.88rem; }
.legal-doc th, .legal-doc td { text-align: left; vertical-align: top; padding: 8px 9px; border-bottom: 1px solid var(--line); }
.legal-doc th { background: #f7f9f5; font-weight: 700; }
.legal-doc td:first-child { font-weight: 600; }
.legal-doc dl { margin: 0 0 12px; }
.legal-doc dt { font-weight: 700; margin-top: 10px; }
.legal-doc dd { margin: 2px 0 0; }
.legal-doc code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; background: #f7f9f5; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
@media (max-width: 640px) {
  #legal-modal { align-items: flex-end; }
  .legal-modal-content { width: 100%; height: 92dvh; border-radius: 16px 16px 0 0; }
  .legal-modal-head { padding: 14px 16px 8px; }
  .legal-tabs { margin: 0 16px 10px; }
  .legal-tab { font-size: 0.8rem; }
  .legal-modal-body { padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
  .legal-doc .legal-toc ul { columns: 1; }
  .legal-doc table, .legal-doc thead, .legal-doc tbody, .legal-doc tr, .legal-doc th, .legal-doc td { display: block; }
  .legal-doc thead { display: none; }
  .legal-doc tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 4px 0; }
  .legal-doc td { border: 0; padding: 4px 12px; }
  .legal-doc td:first-child { padding-top: 8px; }
  .legal-doc td[data-label]::before { content: attr(data-label); display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #5d6762; margin-bottom: 1px; }
  .legal-doc td:first-child::before { display: none; }
}

/* Bildirim penceresi: kişi bilgisinin sağında "Topluluğa katıl" bağlantısı */
.report-join-link { flex-shrink: 0; margin-left: auto; padding: 6px 12px; border: 1px solid #b9d3d2; border-radius: 999px; background: #f3f8f6; color: #3f6968; font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.report-join-link:hover { background: #578a89; border-color: #578a89; color: #fff; }
.report-join-link[hidden] { display: none; }

/* Ortak kapat (X) düğmesi: tüm pencerelerde aynı (ilk kez yasal pencerede kullanılan tasarım). Hafif gri yuvarlak zemin,
   üzerine gelince koyulaşır. Konum (absolute / margin-left: auto) her pencerenin kendi kuralında kalır. Dosyanın sonunda:
   .modal-close / .ma-close / .selfie-x gibi eski kuralları ezsin. */
.x-btn { flex-shrink: 0; box-sizing: border-box; width: 34px; height: 34px; padding: 0; border: none; border-radius: 50%; background: #f1f4f2; color: #4a5550; font-family: inherit; font-size: 1.4rem; font-weight: 400; line-height: 1; text-align: center; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background-color 0.15s ease, color 0.15s ease; -webkit-tap-highlight-color: transparent; }
.x-btn:hover { background: #e3e9e5; color: var(--ink); }
.x-btn:active { background: #d6dfda; }
.x-btn:focus-visible { outline: 2px solid #578a89; outline-offset: 2px; }
/* Mobil hesap paneli başlığı: sol boşluk (.ma-side) 44 px; başlık ortada kalsın diye düğme + boşluk da 44 px */
.ma-close.x-btn { margin-left: 10px; }
/* Fotoğraf / gri sahne üstünde yüzen X (örnek selfie, poz seçici): aynı biçim, beyaz zemin + hafif gölge ki kaybolmasın */
.x-btn.x-btn-float { background: rgba(255, 255, 255, 0.94); box-shadow: 0 1px 4px rgba(23, 32, 29, 0.16); }
.x-btn.x-btn-float:hover { background: #e3e9e5; }
.x-btn.x-btn-float:active { background: #d6dfda; }


/* Çerez izni (consent.js): yalnızca admin Google Analytics anahtarını açtıysa görünür. Sayfayı kilitlemez; iki düğme eşit
   ağırlıkta (reddetmek kabul etmek kadar kolay). z-index: mobil hesap panelinin (1800) üstünde, yasal pencerenin (2100) altında. */
.cookie-banner { position: fixed; right: 16px; bottom: 16px; z-index: 1900; box-sizing: border-box; width: min(400px, calc(100vw - 32px)); padding: 18px 18px 14px; background: #fff; color: var(--ink); border: 1px solid #e3e9e5; border-radius: 16px; box-shadow: 0 12px 32px rgba(23, 32, 29, 0.16); font-family: inherit; opacity: 0; transform: translateY(12px); pointer-events: none; visibility: hidden; transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s; }
.cookie-banner.visible { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity 0.2s ease, transform 0.2s ease; }
.cookie-banner-title { margin: 0 0 6px; font-size: 1rem; font-weight: 700; color: var(--ink); }
.cookie-banner-text { margin: 0; font-size: 0.88rem; line-height: 1.5; color: #4a5550; }
.cookie-banner-state { margin: 8px 0 0; font-size: 0.82rem; font-weight: 600; color: #3f6968; }
.cookie-banner-actions { display: flex; gap: 10px; margin-top: 14px; }
.cookie-btn { flex: 1 1 0; min-height: 40px; padding: 8px 12px; border: 1px solid #17201d; border-radius: 10px; background: #17201d; color: #fff; font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease; }
.cookie-btn:hover { background: #2c3833; border-color: #2c3833; }
.cookie-btn:focus-visible, .cookie-banner-details:focus-visible, .cookie-settings-link:focus-visible { outline: 2px solid #578a89; outline-offset: 2px; }
.cookie-banner-details { display: block; margin: 10px auto 0; padding: 4px 6px; border: none; background: none; color: #3f6968; font: inherit; font-size: 0.82rem; font-weight: 600; text-decoration: underline; cursor: pointer; }
@media (max-width: 640px) {
  .cookie-banner { left: 16px; right: 16px; width: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
/* "Çerez ayarları": yasal bağlantı satırlarında, bağlantılarla aynı görünüm */
.legal-links .cookie-settings-link { padding: 0; border: none; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.legal-links .cookie-settings-link:hover { color: var(--ink); text-decoration: underline; }
.legal-links .cookie-settings-link[hidden] { display: none; }

/* Topluluk: "?" → referans fotoğraf ipuçları (app.js selfieSetMode). Örnek selfie fotoğraf sahnesi gizlenir, ipuçları liste halinde. */
.selfie-card.photo-tips { max-width: 560px; }
.selfie-card.photo-tips .selfie-right, .selfie-card.photo-tips .selfie-text { display: none; }
.selfie-card.photo-tips .selfie-split { height: auto; max-height: min(86vh, 720px); }
.selfie-card.photo-tips .selfie-left { padding: 32px 30px 26px; justify-content: flex-start; }
.selfie-card.photo-tips .selfie-hint { margin-bottom: 18px; padding-right: 30px; }
.selfie-card.photo-tips h2 { padding-right: 40px; }
.selfie-tips-list { margin: 0; padding: 0; list-style: none; counter-reset: tip; display: flex; flex-direction: column; gap: 14px; }
.selfie-tips-list[hidden] { display: none; }
.selfie-tips-list li { counter-increment: tip; position: relative; padding-left: 38px; }
.selfie-tips-list li::before { content: counter(tip); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: #eef2ef; color: #3f6968; font-weight: 700; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; }
.selfie-tips-list strong { display: block; margin-bottom: 3px; font-size: 0.98rem; color: #17201d; }
.selfie-tips-list span { display: block; font-size: 0.9rem; line-height: 1.5; color: #6d7a72; }
.selfie-card.photo-tips .selfie-bottom { padding-top: 22px; }
@media (max-width: 640px) {
  .selfie-card.photo-tips .selfie-split { flex-direction: column; }
  .selfie-card.photo-tips .selfie-left { padding: 24px 20px 22px; }
}

/* Ana sayfa filtre penceresi: yazarak aranan çoklu ülke seçici (app.js natFilter). Kişi formundaki seçicinin (.um-nat) görünümü;
   seçilenler kutunun içinde bayraklı çip, liste kutunun altında akışta (pencerenin kaydırma alanında kesilmez). */
.nat-filter { position: relative; }
.nat-filter-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 44px; padding: 6px 10px 6px 34px; position: relative;
  border: 1px solid #d9e2db; border-radius: 8px; background: #fff; cursor: text; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.nat-filter-box:focus-within { border-color: #578a89; box-shadow: 0 0 0 3px rgba(87, 138, 137, 0.14); }
.nat-filter-icon { position: absolute; left: 11px; top: 14px; color: #9aa69f; pointer-events: none; }
.nat-filter-chips { display: contents; }
.nat-filter-input { flex: 1 1 120px; min-width: 120px; border: none; outline: none; padding: 6px 2px; background: transparent; font: inherit; font-size: 0.95rem; color: #17201d; }
.nat-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 9px; border-radius: 999px;
  background: #eef2ef; border: 1px solid #d9e2db; font-size: 0.86rem; font-weight: 600; color: #17201d; white-space: nowrap;
}
.nat-chip img { height: 12px; width: auto; border-radius: 2px; box-shadow: 0 0 1px rgba(0,0,0,0.25); }
.nat-chip-x { width: 22px; height: 22px; padding: 0; border: none; border-radius: 50%; background: transparent; color: #6d7a72; font-size: 1.05rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.nat-chip-x:hover { background: #dfe6e2; color: #17201d; }
.nat-chip-x:focus-visible, .nat-chip-clear:focus-visible { outline: 2px solid #578a89; outline-offset: 1px; }
.nat-chip-clear { height: 30px; padding: 0 6px; border: none; background: none; font: inherit; font-size: 0.8rem; font-weight: 700; color: #6d7a72; text-decoration: underline; cursor: pointer; }
.nat-chip-clear:hover { color: #17201d; }
.filter-group .nat-filter-list { position: static; margin-top: 6px; max-height: 232px; box-shadow: 0 6px 18px rgba(0,0,0,0.07); }
.nat-option .nat-check { width: 16px; height: 16px; flex: none; border: 1.5px solid #c3cec8; border-radius: 4px; background: #fff; position: relative; }
.nat-option.selected .nat-check { background: #578a89; border-color: #578a89; }
.nat-option.selected .nat-check::after { content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.nat-option.selected > span:not(.code):not(.nat-check) { font-weight: 600; }

/* --- İstatistikler sekmesi: Boy dağılımı histogramı (#public-histogram-view) --- */
/* Hesap penceresi sekmeler arasında (giriş yapılmış ya da yapılmamış) hep aynı büyük boyutta kalır; içerik kendi alanında kayar */
#auth-modal .auth-modal-content { height: min(82vh, 740px); height: min(82dvh, 740px); }
#auth-modal #auth-unlogged-view { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
#ma-stats-slot .auth-tab-pane { display: block; }
.public-hist-card {
  --hist-f: #FF85BA; --hist-m: #367BE2;
  --hist-grid: #eef2f0; --hist-base: #c9d4ce; --hist-ink: #17201d; --hist-ink-2: #54615b; --hist-ink-3: #83918a;
  position: relative; margin: 0; padding: 6px 2px 4px; background: #fff; text-align: left;
}
.public-hist-card .hist-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.public-hist-card .hist-title { margin: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; color: var(--hist-ink); }
.public-hist-card .hist-sub { margin: 3px 0 0; font: 500 0.78rem/1.4 var(--mono); color: var(--hist-ink-2); }
.public-hist-card .hist-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.public-hist-card .seg-group {
  display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 2px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 1px 2px rgba(23, 32, 29, 0.04);
}
.public-hist-card .seg { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.public-hist-card .seg > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.public-hist-card .seg > span {
  display: inline-flex; align-items: center; justify-content: center; height: 28px; padding: 0 12px;
  border-radius: 999px; font: 700 0.8rem/1 var(--sans); color: var(--hist-ink-2); white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.public-hist-card .seg:hover > span { color: var(--hist-ink); }
.public-hist-card .seg > input:checked + span { background: #578a89; color: #fff; }
.public-hist-card .seg > input:focus-visible + span { outline: 2px solid #578a89; outline-offset: 2px; }
.public-hist-card .hist-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 12px 0 4px; }
.public-hist-card .hist-key { display: inline-flex; align-items: baseline; gap: 7px; font-size: 0.82rem; color: var(--hist-ink-2); }
.public-hist-card .hist-key b { color: var(--hist-ink); font-weight: 700; }
.public-hist-card .hist-key span { font-variant-numeric: tabular-nums; }
.public-hist-card .hist-key.diff { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: var(--paper); border: 1px solid #e6ece8; }
.public-hist-card .hist-swatch { width: 10px; height: 10px; border-radius: 3px; align-self: center; flex: none; }
.public-hist-card .hist-swatch.f { background: var(--hist-f); }
.public-hist-card .hist-swatch.m { background: var(--hist-m); }
.public-hist-card .hist-plot { width: 100%; overflow: hidden; }
.public-hist-card .hist-plot svg { display: block; }
.public-hist-card .hist-grid { stroke: var(--hist-grid); stroke-width: 1; }
.public-hist-card .hist-grid.base { stroke: var(--hist-base); }
.public-hist-card .hist-ytick, .public-hist-card .hist-xtick { font: 500 11px var(--mono); fill: var(--hist-ink-2); font-variant-numeric: tabular-nums; }
.public-hist-card .hist-xmark { stroke: var(--hist-base); stroke-width: 1; }
.public-hist-card .hist-axis-label { font: 500 11px var(--sans); fill: var(--hist-ink-3); }
.public-hist-card .hist-bar.f { fill: var(--hist-f); }
.public-hist-card .hist-bar.m { fill: var(--hist-m); }
.public-hist-card .hist-hover { fill: var(--paper); }
.public-hist-card .hist-hit { fill: transparent; cursor: default; outline: none; }
.public-hist-card .hist-hit:focus-visible { stroke: #578a89; stroke-width: 2; }
.public-hist-card .hist-mean { stroke-width: 2; stroke-linecap: round; }
.public-hist-card .hist-mean.f { stroke: var(--hist-f); }
.public-hist-card .hist-mean.m { stroke: var(--hist-m); }
.public-hist-card .hist-mean-label { font: 500 11px var(--mono); fill: var(--hist-ink-3); }
.public-hist-card .hist-mean-label.sd { font: 500 11px var(--mono); fill: var(--hist-ink-3); }
.public-hist-card .hist-empty { padding: 48px 0; text-align: center; color: var(--hist-ink-2); font-size: 0.9rem; }
.public-hist-card .hist-tip {
  position: absolute; z-index: 5; min-width: 150px; max-width: 280px; padding: 9px 12px; pointer-events: none;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 18px rgba(23, 32, 29, 0.12);
}
.public-hist-card .hist-tip[hidden] { display: none; }
.public-hist-card .hist-tip-head { margin-bottom: 6px; font: 600 0.78rem var(--mono); color: var(--hist-ink-2); }
.public-hist-card .hist-tip-row { display: grid; grid-template-columns: 14px auto auto 1fr; align-items: center; column-gap: 8px; font-size: 0.85rem; }
.public-hist-card .hist-tip-row + .hist-tip-row { margin-top: 3px; }
.public-hist-card .hist-tip-key { width: 12px; height: 2px; border-radius: 1px; }
.public-hist-card .hist-tip-key.f { background: var(--hist-f); }
.public-hist-card .hist-tip-key.m { background: var(--hist-m); }
.public-hist-card .hist-tip-row b { color: var(--hist-ink); font-variant-numeric: tabular-nums; }
.public-hist-card .hist-tip-pct { font: 500 0.76rem var(--mono); color: var(--hist-ink-3); }
.public-hist-card .hist-tip-name { color: var(--hist-ink-2); }
.public-hist-card .hist-tip-people { margin-top: 8px; padding-top: 7px; border-top: 1px solid #eef2f0; display: flex; flex-direction: column; gap: 3px; font-size: 0.8rem; color: var(--hist-ink); }
.public-hist-card .hist-tip-people > div { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; column-gap: 8px; }
.public-hist-card .hist-table { margin-top: 8px; }
.public-hist-card .hist-table summary { cursor: pointer; font-size: 0.8rem; font-weight: 700; color: var(--hist-ink-2); padding: 4px 0; }
.public-hist-card .hist-table-scroll { max-height: 280px; overflow: auto; margin-top: 6px; border: 1px solid #e6ece8; border-radius: 10px; }
.public-hist-card .hist-table table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.public-hist-card .hist-table th, .public-hist-card .hist-table td { padding: 6px 12px; text-align: right; border-bottom: 1px solid #eef2f0; font-variant-numeric: tabular-nums; }
.public-hist-card .hist-table th:first-child, .public-hist-card .hist-table td:first-child { text-align: left; }
.public-hist-card .hist-table th { position: sticky; top: 0; background: var(--paper); font-weight: 700; color: var(--hist-ink); }
.public-hist-card .hist-edge-sep { stroke: var(--hist-base); stroke-width: 1; }
.public-hist-card .hist-xtick.edge { fill: var(--hist-ink-3); }
.public-hist-card .hist-curve { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.public-hist-card .hist-curve.f { stroke: var(--hist-f); }
.public-hist-card .hist-curve.m { stroke: var(--hist-m); }
.public-hist-card .hist-curve-halo { fill: none; stroke: #fff; stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; opacity: 0.9; pointer-events: none; }
.public-hist-card .hist-curve-key { width: 18px; height: 2px; border-radius: 1px; align-self: center; background: linear-gradient(90deg, var(--hist-f) 0 50%, var(--hist-m) 50% 100%); }
.public-hist-card .hist-key.curve-note { font-size: 0.76rem; color: var(--hist-ink-3); }
.public-hist-section { position: relative; }
.public-hist-section + .public-hist-section { margin-top: 26px; padding-top: 22px; border-top: 1px solid #eef2f0; }
@media (max-width: 640px) {
  .public-hist-card { margin-left: -16px; margin-right: -16px; padding-left: 0; padding-right: 0; }
  .public-hist-card .hist-head, .public-hist-card .hist-legend { padding-left: 14px; padding-right: 14px; }
  .public-hist-card .hist-key.diff { margin-left: 0; }
  .public-hist-card .hist-tip, .public-hist-card .hist-hover { display: none !important; }
  .public-hist-card .hist-hit { pointer-events: none; }
}


/* --- Hesap penceresi → Ayarlar sekmesi: görünüm tercihleri (cetvel, birim, dil) en üstte, hesap kısmı altında --- */
.settings-prefs { display: none; padding: 18px 1.5rem 0; text-align: left; position: relative; z-index: 5; }
.auth-modal-content.settings-tab .settings-prefs { display: block; }
.settings-prefs .ruler-toggle-group { margin-top: 0; }
.auth-modal-content.settings-tab { overflow: visible; }
.auth-modal-content.settings-tab #auth-unlogged-view { margin: 18px 1.5rem 0; padding: 20px 0 22px !important; border-top: 1px solid var(--line); }
.auth-modal-content.settings-tab #auth-tab-settings { margin-top: -2px; padding-top: 18px; border-top: 1px solid var(--line); }
.auth-modal-content.settings-tab.logged #auth-logged-view { padding-top: 18px; }

/* Mobil: arama kutusunun yanındaki paylaş düğmesi (dişlinin solunda; görünürlüğü .mobile-only-btn belirler).
   ".search-panel button:not(.search-clear-btn)" koyu düğme kuralını ezmek için seçici en az onun kadar özgül olmalı (0,2,1). */
.search-panel button.mobile-share-btn:hover, .search-panel button.mobile-share-btn:active { background: #ffffff; color: #17201d; }
.search-panel button.mobile-share-btn {
  display: none; padding: 0; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: #ffffff; border: none; border-radius: 50%; cursor: pointer; color: #4a5550; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* --- Paylaş penceresi --- */
.share-card { max-width: 460px; }
.share-card .modal-header { padding: 1.1rem 1.25rem; }
.share-body {
  padding: 16px 1.25rem 18px; display: flex; flex-direction: column; gap: 14px;
  max-height: calc(100dvh - 140px); overflow-y: auto;
}
.share-preview {
  position: relative; width: 100%; height: 220px; max-width: 100%; margin: 0 auto;
  border-radius: 14px; overflow: hidden; background: #f4f6f5; border: 1px solid var(--line);
}
.share-preview img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fcfcfc; }
.share-preview img[hidden], .share-preview-skel[hidden] { display: none; }
.share-preview-skel {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, #eef2f0 30%, #f7f9f8 50%, #eef2f0 70%); background-size: 200% 100%;
  animation: share-shimmer 1.3s linear infinite;
}
.share-preview-skel.failed { animation: none; background: #f4f6f5; }
@keyframes share-shimmer { to { background-position: -200% 0; } }
.share-people {
  margin: -6px 0 0; font-size: 0.82rem; color: var(--muted); text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.share-empty { margin: 0; padding: 6px 0; text-align: center; color: var(--muted); font-size: 0.9rem; }
.share-body.is-empty .share-preview, .share-body.is-empty .share-people { display: none; }
.share-body.is-empty .share-apps, .share-body.is-empty .share-actions { opacity: 0.45; pointer-events: none; }

/* Uygulamalar: iOS paylaşım sayfasındaki gibi yatay kayan yuvarlak simgeler; renkli simge, açık zemin */
.share-apps {
  display: flex; justify-content: space-between; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  margin: 0 -1.25rem; padding: 2px 1.25rem 2px; scroll-snap-type: x proximity; scroll-padding-inline: 1.25rem;
}
.share-apps::-webkit-scrollbar { display: none; }
.share-app {
  flex: 0 0 auto; width: 56px; display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 4px 0; background: none; border: none; cursor: pointer; font-family: inherit; scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
}
.share-app-ico {
  --brand: #578a89; --tint: #eef4f3;
  flex: none; box-sizing: border-box; width: 48px; height: 48px; min-width: 48px; min-height: 48px; aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--tint); color: var(--brand);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.share-app-ico svg { flex: none; width: 24px; height: 24px; }
.share-app-ico.wa { --brand: #1fae54; --tint: #e7f7ee; }
.share-app-ico.x { --brand: #0f1419; --tint: #eff1f2; }
.share-app-ico.fb { --brand: #1877f2; --tint: #e8f1fe; }
.share-app-ico.tg { --brand: #229ed9; --tint: #e6f4fb; }
.share-app-ico.rd { --brand: #ff4500; --tint: #fff0e8; }
.share-app-ico.em { --brand: #578a89; --tint: #eef4f3; }
.share-app:hover .share-app-ico, .share-app:focus-visible .share-app-ico { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(23, 32, 29, 0.08); }
.share-app:focus-visible { outline: none; }
.share-app:active .share-app-ico { transform: scale(0.94); }
.share-app-lbl { font-size: 0.72rem; font-weight: 600; color: var(--ink); white-space: nowrap; }

/* Eylemler: iOS tarzı gruplu liste */
.share-actions { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.share-action {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin: 0;
  background: none; border: none; border-radius: 0; cursor: pointer; text-align: left; font-family: inherit; color: var(--ink);
  transition: background 0.15s ease;
}
.share-action[hidden] { display: none; }
.share-action + .share-action { border-top: 1px solid var(--line); }
.share-action:hover, .share-action:focus-visible { background: #f7f9f8; outline: none; }
.share-action-ico {
  flex: none; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: #eef4f3; color: #578a89; transition: background 0.2s ease, color 0.2s ease;
}
.share-action-ico svg { width: 19px; height: 19px; }
.share-action-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.share-action-title { font-weight: 700; font-size: 0.92rem; }
.share-action-sub { font: 500 0.75rem var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-action.done .share-action-ico { background: #e5f5eb; color: #2f9e5b; }
.share-action.done .share-action-title { color: #2f9e5b; }

/* Dar ekranda 7 uygulama sığmaz: satır soldan başlar ve yatay kayar (iOS paylaşım sayfasındaki gibi) */
@media (max-width: 520px) {
  .share-apps { justify-content: flex-start; gap: 4px; }
  .share-app { width: 64px; }
}

/* --- Bildirim penceresi: Topluluk penceresinin (1100) ve mobil hesap panelinin (1800) üstünde; seçenekler kendi içinde kayar --- */
#report-modal { z-index: 2050; }
.report-options-group {
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; text-align: left;
  max-height: 232px; overflow-y: auto; overscroll-behavior: contain; padding: 2px 6px 2px 0;
  scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent;
}
.report-options-group .report-option-label { flex-shrink: 0; }
.report-consent-note {
  margin: -4px 0 14px; padding: 10px 14px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa;
  color: #9a3412; font-size: 0.86rem; line-height: 1.5; text-align: left;
}
.report-consent-note[hidden] { display: none; }
.report-consent-note a { color: #c2410c; font-weight: 700; white-space: nowrap; }
/* Kısa ekranda pencere taşmasın: başlık ve düğmeler sabit, aradaki gövde kayar */
.report-modal-content { max-height: calc(100dvh - 24px); }
.report-modal-content > .modal-header, .report-modal-content > .modal-footer { flex-shrink: 0; }
.report-modal-content > div:nth-child(2) { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
/* Topluluk düzenleyicisinde "Bildir" (Sil düğmesinin yanında, aynı boyutta) */
.cm-report-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 4px; cursor: pointer;
  background: transparent; color: #b45309; border: 1px solid #d6a464; font: inherit; font-size: 0.85rem; font-weight: 500;
}
.cm-report-btn:hover { background: #fff7ed; }
.cm-report-btn[hidden] { display: none; }

/* Mobil düzende (app.js isMobileLayout ile aynı koşul) Paylaş penceresi, Ayarlar paneli (.mobile-account) gibi alttan kayan
   tam sayfadır: karartma yok, kart ekranı kaplar; başlık ortada, kapat düğmesi sağda. */
@media (max-width: 900px), (orientation: landscape) and (max-height: 520px) {
  #share-modal {
    background: transparent; opacity: 1; align-items: stretch; justify-content: stretch;
    transition: visibility 0s linear 0.32s;
  }
  #share-modal.active { transition: visibility 0s linear 0s; }
  #share-modal .share-card {
    width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; box-shadow: none;
    transform: translateY(100%); transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  #share-modal.active .share-card { transform: translateY(0); }
  #share-modal .modal-header { padding: calc(10px + env(safe-area-inset-top)) 12px 8px; flex-shrink: 0; }
  #share-modal .modal-header::before { content: ""; width: 44px; flex-shrink: 0; }
  #share-modal .modal-header h2 { flex: 1; text-align: center; font-size: 1.15rem; }
  #share-modal #close-share-btn { margin-left: 10px; }
  #share-modal .share-body {
    flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 18px 1.25rem calc(22px + env(safe-area-inset-bottom)); gap: 16px;
  }
}

/* === SAFARI-TINT BAŞLANGIÇ (2026-10-20) ===============================================================================
   iOS 26 Safari üst/alt çubukları, kenarlara değen sabit katmanın ARKA PLAN RENGİNE boyar; saydamlık (opacity) animasyonunu
   görmez. Karartma eskiden opacity ile sönüyordu: renk koyu kaldığı için çubuklar katman tamamen kalkana (~0,3 sn) kadar koyu
   kalıyordu. Burada karartma rengin kendisi değişerek (koyu ↔ şeffaf) solar; pencere kartı ayrıca opacity ile solar. Böylece
   Safari renk değişimini kapatma / açma anında görür. Geri almak için bu bloğu (BİTİŞ satırına kadar) silmek yeterli. */
.modal-overlay {
  opacity: 1;
  background-color: rgba(23, 32, 29, 0);
  transition: background-color 0.3s ease, visibility 0s linear 0.3s;
}
.modal-overlay.active {
  background-color: rgba(23, 32, 29, 0.46);
  transition: background-color 0.3s ease, visibility 0s linear 0s;
}
.modal-overlay > * { opacity: 0; transition: opacity 0.3s ease, transform 0.3s ease; }
.modal-overlay.active > * { opacity: 1; }
/* Mobil Paylaş sayfası: karartması yok, alttan kayar; kartı solmasın */
@media (max-width: 900px), (orientation: landscape) and (max-height: 520px) {
  #share-modal, #share-modal.active { background-color: transparent; }
  #share-modal .share-card, #share-modal.active .share-card { opacity: 1; }
}
/* === SAFARI-TINT BİTİŞ ================================================================================================ */

/* --- İstatistikler → Meslek dağılımı (yalnızca meslek içi %): ad | erkek % | çubuk | kadın % --- */
.public-hist-card .pprof-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.public-hist-card .pprof-row {
  display: grid; grid-template-columns: minmax(110px, 170px) 52px 1fr 52px; align-items: center; column-gap: 10px;
}
.public-hist-card .pprof-label { font-size: 0.86rem; font-weight: 700; color: var(--hist-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.public-hist-card .pprof-val { font: 600 0.78rem var(--mono); color: var(--hist-ink-2); font-variant-numeric: tabular-nums; }
.public-hist-card .pprof-val.m { text-align: right; }
.public-hist-card .pprof-val.f { text-align: left; }
.public-hist-card .pprof-bar {
  position: relative; display: flex; height: 18px; border-radius: 6px; overflow: hidden; background: var(--hist-grid);
}
.public-hist-card .pprof-bar.both { gap: 2px; background: #fff; }
.public-hist-card .pprof-seg { height: 100%; }
.public-hist-card .pprof-seg.m { background: var(--hist-m); }
.public-hist-card .pprof-seg.f { background: var(--hist-f); }
.public-hist-card .pprof-mid {
  position: absolute; left: 50%; top: -2px; bottom: -2px; border-left: 1.5px dashed rgba(23, 32, 29, 0.3); pointer-events: none;
}
@media (max-width: 640px) {
  .public-hist-card .pprof-row { grid-template-columns: 46px 1fr 46px; row-gap: 5px; column-gap: 8px; }
  .public-hist-card .pprof-label { grid-column: 1 / -1; }
  .public-hist-card .pprof-rows { padding: 0 14px; } /* başlık ve lejantla aynı iç boşluk */
}
