/* Sancak olusturucu */
.sn-renkler { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.sn-renkler button {
  height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--renk); cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18);
}
.sn-renkler button:hover { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 1px; }
.sn-renkler button[aria-checked=true] { outline: 2px solid var(--accent); outline-offset: 2px; }
.sn-renkler button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.sn-katman-ust { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sn-katmanlar { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sn-katmanlar:empty::before {
  content: 'Katman yok: yalnızca taban rengi.'; display: block; padding: 12px; border: 1px dashed var(--line);
  border-radius: 10px; font-size: 13px; color: var(--muted);
}
.sn-katman {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
}
.sn-no { min-width: 18px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.sn-kucuk { width: 20px; height: 40px; image-rendering: pixelated; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
.sn-secimler { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 8px; min-width: 0; }
.arac-panel .sn-secimler select { min-height: 38px; padding: 7px 30px 7px 10px; font-size: 13.5px; }
.sn-islem { display: flex; gap: 4px; }
.sn-islem button {
  width: 32px; height: 32px; border-radius: 7px; border: 1px solid var(--line); background: transparent;
  color: var(--text); font-size: 14px; cursor: pointer;
}
.sn-islem button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.sn-islem button:disabled { opacity: .35; cursor: default; }

.sn-onizleme {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start;
  padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
}
.sn-onizleme canvas { display: block; width: 200px; max-width: 100%; height: auto; image-rendering: pixelated; }
.sn-kunye {
  align-self: start; padding: 10px 12px; border-radius: 8px; min-width: 0;
  background: #120f1c; border: 2px solid #2b0f5c; color: #a8a8a8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55;
}
.sn-kunye strong { display: block; color: #fff; font-weight: 600; margin-bottom: 2px; }
.sn-kunye ul { list-style: none; margin: 0; padding: 0; }
/* id secici: acik temanin "main li" kuralini gecer; ipucu kutusu her temada koyu */
#sn-katman-adlari li { color: #b4b4b4; }
.sn-kunye ul:empty { display: none; }
@media (max-width: 560px) {
  .sn-renkler { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
  .sn-renkler button { height: 30px; }
  /* Dar ekranda: solda kucuk resim, sagda iki secim alt alta ve altinda dugmeler */
  .sn-katman { grid-template-columns: auto minmax(0, 1fr); }
  .sn-katman .sn-no { display: none; }
  .sn-katman .sn-kucuk { grid-row: span 2; }
  .sn-secimler { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .sn-islem { grid-column: 2; justify-content: flex-end; }
  .sn-onizleme { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .sn-onizleme canvas { width: 170px; }
  .sn-kunye { justify-self: stretch; }
}
