:root {
  --bg: #f6f3ee;
  --card: #ffffff;
  --ink: #1d1b19;
  --muted: #5d5850;
  --line: #ddd6cb;
  --brand: #176b5b;
  --brand-ink: #ffffff;
  --brand-soft: #e2f0ec;
  --go: #1f7a3d;
  --warn: #9a5b00;
  --warn-soft: #fff1d6;
  --bad: #b3261e;
  --bad-soft: #fde7e5;
  --ig: #d62976;
  --fb: #1877f2;
  --wa: #1fa855;
  --radius: 18px;
  --shadow: 0 1px 2px rgb(40 30 20 / 0.06), 0 6px 18px rgb(40 30 20 / 0.06);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 20px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  min-height: 100dvh;
}
main { max-width: 640px; margin: 0 auto; padding: 16px 16px 140px; outline: none; }
h2 { font-size: 26px; line-height: 1.25; margin: 8px 0 6px; letter-spacing: -0.01em; }
h3 { font-size: 21px; margin: 0 0 10px; }
p { margin: 0 0 12px; }
.lead { color: var(--muted); margin-bottom: 20px; }
.small { font-size: 17px; color: var(--muted); }
svg { width: 1em; height: 1em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 4px solid #f0b400; outline-offset: 3px; border-radius: 10px; }

/* Üst çubuk */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 110px 1fr 110px; align-items: center;
  background: rgb(246 243 238 / 0.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: max(10px, env(safe-area-inset-top)) 12px 10px;
}
.bar-title { grid-column: 2; margin: 0; text-align: center; font-size: 21px; font-weight: 700; }
.bar-back, .bar-gear {
  min-height: 52px; border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--brand);
}
.bar-back { grid-column: 1; justify-self: start; padding: 0 8px 0 0; }
.bar-gear { grid-column: 3; justify-self: end; width: 52px; justify-content: center; }
.bar-back svg, .bar-gear svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Düğmeler */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 64px; padding: 0 22px; border-radius: 16px; border: 2px solid transparent;
  font-weight: 700; font-size: 21px; cursor: pointer; text-decoration: none;
  transition: transform 0.08s ease, background-color 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-main { background: var(--brand); color: var(--brand-ink); }
.btn-go { background: var(--go); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-bad { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn-wide { width: 100%; }
.btn-big { min-height: 84px; font-size: 24px; border-radius: 22px; }
.btn svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.sticky-go {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9;
  padding: 12px 16px max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, rgb(246 243 238 / 0));
}
.sticky-go .btn { max-width: 608px; margin: 0 auto; display: flex; }

/* Kartlar */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.banner { border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; display: flex; gap: 14px; align-items: flex-start; }
.banner-warn { background: var(--warn-soft); color: #5b3600; }
.banner-bad { background: var(--bad-soft); color: #7a1a14; }
.banner b { display: block; }
.banner .btn { margin-top: 10px; min-height: 52px; font-size: 19px; }

/* Platform seçimi */
.platforms { display: grid; gap: 16px; }
.platform {
  display: flex; align-items: center; gap: 20px; width: 100%; text-align: left;
  min-height: 120px; padding: 20px; border-radius: 22px; cursor: pointer;
  background: var(--card); border: 3px solid var(--line); box-shadow: var(--shadow);
  font-size: 26px; font-weight: 800;
}
.platform small { display: block; font-size: 17px; font-weight: 500; color: var(--muted); }
.platform:hover { border-color: var(--brand); }
.logo { width: 76px; height: 76px; flex: none; border-radius: 20px; display: grid; place-items: center; }
.logo svg { width: 46px; height: 46px; }
.logo-ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.logo-fb { background: var(--fb); }

/* Gönderi ızgarası */
.posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.post {
  position: relative; padding: 0; border: 4px solid transparent; border-radius: 18px; overflow: hidden;
  background: #e9e4dc; cursor: pointer; aspect-ratio: 1 / 1; box-shadow: var(--shadow);
}
.post img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post .noimg { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; font-size: 16px; color: var(--muted); text-align: center; }
.post .tag { position: absolute; left: 8px; bottom: 8px; background: rgb(0 0 0 / 0.7); color: #fff; font-size: 15px; padding: 3px 10px; border-radius: 999px; }
.post .tick { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; background: var(--go); color: #fff; display: none; place-items: center; box-shadow: 0 2px 8px rgb(0 0 0 / 0.3); }
.post .tick svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.post[aria-pressed="true"] { border-color: var(--go); }
.post[aria-pressed="true"] .tick { display: grid; }
.post-caption { font-size: 17px; color: var(--muted); margin-top: 14px; }

/* Bölümler (ayar sayfası) */
.section { margin-bottom: 26px; }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.section-no { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; }
.section-head h3 { margin: 0; font-size: 23px; }

/* Seçenek satırları */
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  min-height: 72px; padding: 12px 16px; border-radius: 16px; cursor: pointer;
  background: var(--card); border: 3px solid var(--line); font-weight: 700;
}
.option small { display: block; font-weight: 500; font-size: 16px; color: var(--muted); }
.option[aria-pressed="true"] { border-color: var(--go); background: #eef8f1; }
.option[disabled] { opacity: 0.5; cursor: not-allowed; }
.option .ico { width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.option .ico svg { width: 28px; height: 28px; }
.option .radio { margin-left: auto; width: 30px; height: 30px; flex: none; border-radius: 50%; border: 3px solid var(--line); display: grid; place-items: center; }
.option[aria-pressed="true"] .radio { border-color: var(--go); background: var(--go); }
.option[aria-pressed="true"] .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; }

/* Çipler */
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.chip {
  min-height: 64px; border-radius: 16px; border: 3px solid var(--line); background: var(--card);
  font-weight: 800; font-size: 21px; cursor: pointer; padding: 6px 10px;
}
.chip small { display: block; font-size: 15px; font-weight: 500; color: var(--muted); }
.chip[aria-pressed="true"] { border-color: var(--go); background: #eef8f1; }

/* Form */
label.field { display: block; margin-bottom: 16px; font-weight: 700; }
label.field span.hint { display: block; font-weight: 400; font-size: 16px; color: var(--muted); margin-top: 2px; }
input, select, textarea {
  width: 100%; margin-top: 8px; min-height: 60px; padding: 12px 14px; border-radius: 14px;
  border: 2px solid var(--line); background: #fff; font: inherit; color: inherit;
}
textarea { min-height: 110px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px var(--brand-soft); }
.stepper { display: grid; grid-template-columns: 64px 1fr 64px; gap: 10px; align-items: center; margin-top: 14px; }
.stepper button { min-height: 64px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); font-size: 30px; font-weight: 800; cursor: pointer; }
.stepper input { margin: 0; text-align: center; font-size: 26px; font-weight: 800; }

/* Özet */
.summary { background: var(--brand-soft); border-radius: var(--radius); padding: 18px; margin: 8px 0 18px; }
.summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 700; }
.total { font-size: 24px; font-weight: 800; margin-top: 12px; }

/* Reklam listesi */
.ad { display: grid; grid-template-columns: 92px 1fr; gap: 14px; }
.ad-thumb { width: 92px; height: 92px; border-radius: 14px; object-fit: cover; background: #e9e4dc; }
.ad-title { font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ad-meta { font-size: 17px; color: var(--muted); }
.ad-actions { grid-column: 1 / -1; display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.ad-actions .btn { min-height: 56px; font-size: 19px; }
.ad-actions .btn:only-child { grid-column: 1 / -1; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 16px; font-weight: 800; }
.pill::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.st-active { background: #e1f4e7; color: #146430; }
.st-approved { background: #e1f4e7; color: #146430; }
.st-review { background: var(--warn-soft); color: var(--warn); }
.st-rejected, .st-error, .st-issue { background: var(--bad-soft); color: var(--bad); }
.st-paused, .st-ended { background: #ece8e1; color: #4f4a43; }
.mini-ico { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; }
.mini-ico svg { width: 14px; height: 14px; }

.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.empty svg { width: 64px; height: 64px; fill: none; stroke: var(--line); stroke-width: 1.6; }

/* Başarı ekranı */
.done { text-align: center; padding-top: 30px; }
.done .circle { width: 120px; height: 120px; border-radius: 50%; background: var(--go); color: #fff; display: grid; place-items: center; margin: 0 auto 20px; }
.done .circle svg { width: 70px; height: 70px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* Giriş */
.login { max-width: 420px; margin: 8vh auto 0; text-align: center; }
.login .appicon { width: 96px; height: 96px; border-radius: 26px; background: var(--brand); display: grid; place-items: center; margin: 0 auto 18px; }
.login .appicon svg { width: 56px; height: 56px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linejoin: round; }
.login input { text-align: center; font-size: 26px; letter-spacing: 0.08em; }

.qr { display: block; width: 100%; max-width: 300px; margin: 10px auto; border-radius: 12px; border: 1px solid var(--line); }
.loading { display: grid; place-items: center; padding: 40px 0; color: var(--muted); gap: 14px; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 5px solid var(--line); border-top-color: var(--brand); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  max-width: calc(100% - 32px); width: max-content; z-index: 30;
  background: var(--ink); color: #fff; padding: 16px 22px; border-radius: 16px; font-weight: 600; box-shadow: 0 8px 30px rgb(0 0 0 / 0.25);
}
.toast.bad { background: var(--bad); }

dialog.ask { border: 0; border-radius: 22px; padding: 24px; width: min(92vw, 460px); box-shadow: 0 20px 60px rgb(0 0 0 / 0.3); }
dialog.ask::backdrop { background: rgb(20 15 10 / 0.5); }
.ask-text { font-size: 22px; white-space: pre-line; }
.ask-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }

details.more summary { cursor: pointer; font-weight: 700; color: var(--brand); min-height: 48px; display: flex; align-items: center; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
