:root {
  --bg: #FFFFFF;
  --bg-soft: #F4F6F5;
  --bg-sunk: #E9EEEC;
  --ink: #172124;
  --ink-2: #3C484A;
  --muted: #677375;
  --line: #DCE2E0;
  --brand: #1D6A55;
  --brand-ink: #0F4A3A;
  --brand-soft: #E2EFEA;
  --ok: #2E7D4F;
  --ok-soft: #E4F2E9;
  --warn: #9A6410;
  --warn-soft: #FBF1DE;
  --bad: #B3372B;
  --bad-soft: #FBE7E4;
  --info: #2F6690;
  --info-soft: #E5EEF6;
  --radius: 16px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, svg, canvas { max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(30px, 6vw, 46px); font-weight: 800; }
h2 { font-size: clamp(22px, 3.4vw, 28px); font-weight: 750; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.hidden, [hidden] { display: none !important; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* ---------- üst bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--ink); text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; }
.brand-mark svg { width: 19px; height: 19px; }
.topbar nav a { color: var(--ink-2); text-decoration: none; font-weight: 650; font-size: 15px; padding: 8px 10px; white-space: nowrap; }
.topbar nav { display: flex; align-items: center; gap: 6px; }
/* dil menüsü: görünen kısa kod; üstündeki şeffaf <select> dokunulunca sistemin dil listesini açar */
.lang-select { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; margin-inline-start: 4px; border: 1.5px solid var(--line); border-radius: 10px; color: var(--ink-2); font-size: 13px; font-weight: 750; white-space: nowrap; }
.lang-select svg { width: 16px; height: 16px; flex-shrink: 0; }
.lang-select select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.lang-select:hover { border-color: #b8c6c2; }
.lang-select:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- düğmeler ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1.5px solid transparent; font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-danger { background: #fff; color: var(--bad); border-color: #efc9c3; }
.btn-lg { min-height: 60px; font-size: 19px; padding: 0 26px; border-radius: 14px; }
.btn-sm { min-height: 36px; font-size: 14px; padding: 0 12px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 19px; height: 19px; flex: none; }

/* ---------- form ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card-soft { background: var(--bg-soft); border: 0; }
.field { display: block; }
.label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 7px; }
.hint { display: block; color: var(--muted); font-size: 13.5px; margin-top: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], textarea, select {
  width: 100%; min-height: 50px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 17px; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.unit { position: relative; }
.unit input { padding-inline-end: 52px; }
.unit em { position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-weight: 650; pointer-events: none; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14.5px; color: var(--ink-2); }
.check input { width: 21px; height: 21px; margin-top: 1px; accent-color: var(--brand); flex: none; }

/* segmentli seçim (radyo düğmeleri) */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; flex: 1 1 auto; min-width: 58px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 48px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 650; font-size: 15px; text-align: center; user-select: none; transition: border-color .15s, background .15s; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:hover { border-color: #b9c4c1; }
.seg label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--brand); }
.seg label:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--brand-soft); }
.seg svg { width: 44px; height: 30px; color: var(--ink-2); }

/* fotoğraf alanı */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 190px; padding: 24px 16px; border: 2px dashed #b8c6c2; border-radius: var(--radius); background: var(--bg-soft); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop.drag { border-color: var(--brand); background: var(--brand-soft); }
.drop svg { width: 46px; height: 46px; color: var(--brand); }
.drop strong { font-size: 19px; }
.photo-main { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); aspect-ratio: 4 / 3; }
.photo-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-main .row { position: absolute; inset-inline-end: 10px; bottom: 10px; }
.photo-main .btn { background: rgba(255, 255, 255, .95); }
.photo-extra { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.photo-extra .mini { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; }
.photo-extra .mini img { width: 100%; height: 100%; object-fit: cover; }
.photo-extra .mini button { position: absolute; top: 2px; inset-inline-end: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(23, 33, 36, .75); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }

/* ---------- ana sayfa ---------- */
.home { padding: 36px 0 20px; }
.home h1 { text-align: center; }
.home .lead { text-align: center; color: var(--ink-2); font-size: 19px; max-width: 30em; margin: 0 auto 26px; }
.form-card { max-width: 640px; margin: 0 auto; padding: 22px; border-radius: 22px; box-shadow: 0 1px 2px rgba(23, 33, 36, .05), 0 12px 32px rgba(23, 33, 36, .07); }
.form-card .q + .q { margin-top: 22px; }
.form-card details.more { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--brand); list-style: none; display: flex; align-items: center; gap: 8px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+"; font-size: 22px; line-height: 1; }
details.more[open] summary::before { content: "–"; }
details.more .inner { display: grid; gap: 16px; margin-top: 16px; }
.pay-note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 10px; }
.example { padding-top: 34px; padding-bottom: 50px; }
footer.site { border-top: 1px solid var(--line); padding: 22px 0 36px; color: var(--muted); font-size: 14px; }

/* ---------- sonuç sayfası ---------- */
.result { padding-top: 24px; padding-bottom: 60px; }
.media { position: relative; border-radius: 20px; overflow: hidden; background: var(--bg-sunk); }
.media > img { display: block; width: 100%; height: auto; }
.compare { position: relative; overflow: hidden; touch-action: pan-y; user-select: none; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.compare .before { position: absolute; inset: 0; }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare .handle { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); pointer-events: none; }
.compare .handle::after { content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-size: 20px; font-weight: 700; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.tag { position: absolute; top: 12px; padding: 4px 10px; border-radius: 8px; background: rgba(23, 33, 36, .72); color: #fff; font-size: 13px; font-weight: 700; pointer-events: none; }
.tag.left { left: 12px; } .tag.right { right: 12px; }
.shot { margin: 0 0 26px; }
.shot figcaption { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; font-size: 16px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 6px; }
.stats span { background: var(--bg-soft); border-radius: 10px; padding: 8px 12px; font-size: 15px; color: var(--ink-2); }
.stats b { color: var(--ink); }
.section { margin-top: 34px; }
.floor-tabs { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.plan-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }
.plan-svg { display: block; width: 100%; height: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; border: 1px solid rgba(0, 0, 0, .08); }
.change-box { background: var(--bg-soft); border-radius: 20px; padding: 20px; }
details.more.details-box { border-top: 1px solid var(--line); padding-top: 16px; }
.details-box h3 { margin-top: 20px; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 5px; vertical-align: -3px; margin-inline-end: 6px; border: 1px solid rgba(0, 0, 0, .1); }
.list { margin: 0; padding-inline-start: 20px; }
.list li { margin-bottom: 6px; }
.wait { max-width: 560px; margin: 28px auto; text-align: center; }
.wait-photo { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-sunk); margin-bottom: 22px; }
.wait-photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8); }
.wait-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); background-size: 250% 100%; animation: sweep 2.4s linear infinite; }
@keyframes sweep { from { background-position: 130% 0; } to { background-position: -130% 0; } }

/* ---------- bildirim, rozet, ilerleme ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 12px; background: var(--info-soft); color: #1f4867; font-size: 15px; }
.notice svg { width: 21px; height: 21px; flex: none; margin-top: 1px; }
.notice.warn { background: var(--warn-soft); color: #6d4708; }
.notice.bad { background: var(--bad-soft); color: #7d241b; }
.notice.ok { background: var(--ok-soft); color: #1c5534; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 100; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.badge-HESAP { background: var(--ok-soft); color: var(--ok); }
.badge-YORUM { background: var(--info-soft); color: var(--info); }
.badge-BAHİS { background: var(--warn-soft); color: var(--warn); }
.badge-neutral { background: var(--bg-soft); color: var(--ink-2); }
.progress { height: 10px; background: var(--bg-sunk); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .6s ease; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.table th { font-size: 12.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.table td.num, .table th.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }
.price { font-size: 44px; font-weight: 800; letter-spacing: -.02em; }

/* ---------- yönetim ---------- */
.admin { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin aside { background: var(--ink); color: #dfe7e5; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.admin aside .brand { color: #fff; margin: 4px 8px 22px; }
.admin aside a { display: flex; gap: 10px; align-items: center; color: #c8d3d0; text-decoration: none; padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; }
.admin aside a.on, .admin aside a:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.admin main { padding: 26px clamp(16px, 3vw, 36px) 60px; background: var(--bg-soft); min-width: 0; }
.admin h1 { font-size: 28px; }
.editor { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; min-height: 60vh; line-height: 1.55; tab-size: 2; }
blockquote.request { margin: 6px 0 18px; padding: 12px 14px; border-inline-start: 3px solid var(--brand); background: var(--bg-soft); border-start-end-radius: 10px; border-end-end-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.terms h2 { margin-top: 28px; }
.prompt-box { background: var(--bg-soft); border-radius: 10px; padding: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; white-space: pre-wrap; max-height: 60vh; overflow: auto; line-height: 1.5; }
.toggle { position: relative; width: 46px; height: 28px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; background: #c9d2cf; border-radius: 28px; cursor: pointer; transition: background .15s; }
.toggle span::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; }
.toggle input:checked + span { background: var(--brand); }
.toggle input:checked + span::before { transform: translateX(18px); }
.skill-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.skill-row:first-child { border-radius: 12px 12px 0 0; } .skill-row:last-child { border-radius: 0 0 12px 12px; border-bottom: 0; }
.skill-row .meta { font-size: 13px; color: var(--muted); }
.status { font-size: 12.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--bg-soft); color: var(--ink-2); white-space: nowrap; }
.status.done, .status.paid { background: var(--ok-soft); color: var(--ok); }
.status.error, .status.failed { background: var(--bad-soft); color: var(--bad); }
.status.generating, .status.queued { background: var(--info-soft); color: var(--info); }
.status.awaiting_payment, .status.pending { background: var(--warn-soft); color: var(--warn); }
/* aşama raporları (tasarım sayfası, yönetici) */
.report { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; margin-top: 12px; max-height: 75vh; overflow: auto; }
.report .report-h { font-weight: 800; font-size: 16px; margin: 14px 0 4px; white-space: normal; }
/* kütüphane ajanı */
.nav-count { margin-inline-start: auto; min-width: 22px; padding: 1px 7px; border-radius: 99px; background: #E0A33A; color: #172124; font-size: 12px; font-weight: 800; text-align: center; }
h2.ag-h { font-size: 20px; margin: 28px 0 12px; }
.proposal { display: grid; gap: 10px; }
.proposal + .proposal { margin-top: 12px; }
.diff { background: var(--bg-soft); border-radius: 10px; padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; }
.diff del, .small del { background: var(--bad-soft); color: var(--bad); text-decoration: line-through; border-radius: 3px; }
.diff ins, .small ins { background: var(--ok-soft); color: var(--ok); text-decoration: none; border-radius: 3px; }
.progress > i.busy { width: 100%; background: linear-gradient(90deg, var(--brand-soft) 20%, var(--brand) 50%, var(--brand-soft) 80%); background-size: 250% 100%; animation: sweep 1.8s linear infinite; }
dialog { border: 0; border-radius: 16px; padding: 0; width: min(960px, calc(100% - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(23, 33, 36, .45); }
dialog .d-head, dialog .d-foot { padding: 16px 20px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
dialog .d-head { border-bottom: 1px solid var(--line); }
dialog .d-foot { border-top: 1px solid var(--line); }
dialog .d-foot:empty { display: none; }
dialog .d-body { padding: 16px 20px; overflow: auto; max-height: calc(100vh - 200px); }

@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .admin aside { position: static; height: auto; display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; }
  .admin aside .brand { width: 100%; margin: 4px 8px 8px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .home { padding-top: 24px; }
  .home .lead { font-size: 17px; }
  .home h1 br { display: none; }
  .form-card { padding: 16px; border-radius: 18px; }
  .card { padding: 16px; }
  .media, .wait-photo { border-radius: 14px; }
}
/* ---------- alfabeye göre ayarlar ---------- */
/* Arap, Hint, Tay, Gürcü ve Doğu Asya yazılarında harf aralığı değiştirilmez (bitişik harfler ve işaretler bozulur). */
:lang(ar), :lang(fa), :lang(ur), :lang(he), :lang(hi), :lang(bn), :lang(th), :lang(ka), :lang(zh), :lang(ja), :lang(ko) { letter-spacing: normal !important; }
/* Üst ve alt işaretleri olan yazılarda başlık satırları üst üste binmesin */
:is(:lang(ar), :lang(fa), :lang(ur), :lang(hi), :lang(bn), :lang(th)) :is(h1, h2, h3) { line-height: 1.4; }
:is(:lang(ar), :lang(fa), :lang(ur), :lang(hi), :lang(bn), :lang(th)) body { line-height: 1.75; }
/* Korecede kelimeler satır sonunda bölünmez */
:lang(ko) { word-break: keep-all; }

/* Telefonda üst çubukta yalnızca logo (ana sayfaya gider) ve dil düğmeleri kalır; metin bağlantısı sığmaz. */
@media (max-width: 440px) {
  .topbar nav > a { display: none; }
}
@media print {
  .topbar, .no-print, footer.site { display: none !important; }
  body { font-size: 12pt; }
}
