:root {
  --bg: #0f1419;
  --panel: #1a222c;
  --panel-2: #232d39;
  --text: #e7edf3;
  --muted: #9bb0c3;
  --accent: #3b82f6;
  --accent-ink: #ffffff;
  --line: #31404f;
  --ok: #34d399;
  --radius: 12px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eef2f6;
    --panel: #ffffff;
    --panel-2: #f1f5f9;
    --text: #0f1b28;
    --muted: #51657a;
    --line: #d7e0ea;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: 0 16px 48px;
}

.site-header {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 0 8px;
}

.site-header h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.tagline {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
}

.layout {
  max-width: 980px;
  margin: 20px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
}

/* Stage */
.stage-wrap { min-width: 0; }

.stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(45deg, #2a2a2a 25%, transparent 25%) -8px 0/16px 16px,
    linear-gradient(-45deg, #2a2a2a 25%, transparent 25%) -8px 0/16px 16px,
    linear-gradient(45deg, transparent 75%, #2a2a2a 75%) -8px 0/16px 16px,
    linear-gradient(-45deg, transparent 75%, #2a2a2a 75%) -8px 0/16px 16px,
    #3a3a3a;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  touch-action: none;
  user-select: none;
}

.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#overlay { pointer-events: none; }
#photo { cursor: grab; }
#photo.grabbing { cursor: grabbing; }

.dropzone {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(15, 20, 25, .55);
  cursor: pointer;
}

.dropzone.hidden { display: none; }
.dropzone.drag { background: rgba(59,130,246,.25); outline: 2px dashed var(--accent); outline-offset: -10px; }

.dz-inner { color: #fff; display: grid; gap: 4px; }
.dz-inner strong { font-size: 1.05rem; }
.dz-inner span { color: #cdd8e3; font-size: .9rem; }

.hint {
  max-width: 480px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: .9rem;
}

/* Controls */
.controls { display: grid; gap: 16px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: filter .15s, opacity .15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.12); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

.field { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.field input[type="range"] { width: 100%; }
.field select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  font: inherit;
}

.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--text); cursor: pointer; }

.meta {
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
}
.meta.ok { color: var(--ok); }

/* Uygunluk denetimi */
.checklist h2 { margin: 0; font-size: 1rem; }
#checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chk { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; line-height: 1.4; }
.chk-icon {
  flex: 0 0 20px;
  width: 20px; height: 20px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  font-size: .72rem; font-weight: 700;
  margin-top: 1px;
}
.chk-ok   .chk-icon { background: rgba(52,211,153,.18); color: var(--ok); }
.chk-warn .chk-icon { background: rgba(245,196,74,.2);  color: #f5c44a; }
.chk-bad  .chk-icon { background: rgba(248,113,113,.2); color: #f87171; }
.chk-info .chk-icon { background: rgba(155,176,195,.2); color: var(--muted); }
.chk-ok   span:last-child { color: var(--text); }
.chk-warn span:last-child { color: var(--text); }
.chk-bad  span:last-child { color: #f87171; }
.chk-info span:last-child { color: var(--muted); }
.check-note { margin: 4px 0 0; font-size: .74rem; color: var(--muted); opacity: .85; }

.rules { color: var(--muted); font-size: .88rem; }
.rules summary { cursor: pointer; color: var(--text); font-weight: 600; margin-bottom: 8px; }
.rules ul { margin: 8px 0; padding-left: 18px; display: grid; gap: 4px; }
.disclaimer { font-size: .8rem; opacity: .8; }
