:root {
  --ink: #111418;
  --muted: #5b6470;
  --line: #e3e6ea;
  --line-strong: #c8ccd2;
  --bg: #f6f7f8;
  --paper: #ffffff;
  --brand: #111418;
  --accent: #1b7f5e;       /* doğal yeşil vurgu */
  --accent-soft: #e9f4ef;
  --warn: #9a6b00;
  --warn-soft: #fbf3df;
  --danger: #b3261e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 28px rgba(16,24,40,.06);
  --maxw: 760px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 22px 18px 64px; }

/* Header / logo */
.site-header {
  display: flex; align-items: center; justify-content: center;
  padding: 26px 18px 6px;
}
.site-header img { height: 46px; width: auto; }
.site-sub {
  text-align: center; color: var(--muted); font-size: 13px;
  letter-spacing: .12em; text-transform: uppercase; margin: 2px 0 0;
}

/* Card */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 24px;
  margin: 18px 0;
}
.card h1 { font-size: 22px; line-height: 1.25; margin: 0 0 4px; letter-spacing: -.01em; }
.card h2 {
  font-size: 14px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin: 26px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.card h2:first-child { margin-top: 0; }
.lead { color: var(--muted); margin: 0 0 6px; }

.legal { font-size: 13.5px; color: #2b3138; }
.legal p { margin: 0 0 9px; }
.legal-box {
  background: #fafbfc; border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px; margin: 6px 0 4px;
  max-height: 340px; overflow: auto;
}
.fineprint { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* Form fields */
.field { margin: 0 0 14px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input[type=text], .field input[type=email], .field input[type=tel],
.field input[type=date], .field textarea {
  width: 100%; padding: 12px 13px; font-size: 16px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--ink); font-family: inherit;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* Consent checkboxes */
.consent-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 14px; border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 9px; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.consent-item:hover { border-color: var(--line-strong); }
.consent-item.checked { border-color: var(--accent); background: var(--accent-soft); }
.consent-item input { margin-top: 3px; width: 19px; height: 19px; flex: 0 0 auto; accent-color: var(--accent); }
.consent-item .ct { font-size: 14px; }
.consent-item .req { color: var(--danger); font-weight: 700; }
.note-optional {
  font-size: 12.5px; color: var(--muted); margin: 4px 2px 16px;
}

/* Radio group (yaş) */
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-row label {
  flex: 1; min-width: 130px; display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 14px;
  cursor: pointer; font-weight: 600; font-size: 14px;
}
.radio-row label.sel { border-color: var(--accent); background: var(--accent-soft); }
.radio-row input { accent-color: var(--accent); width: 18px; height: 18px; }

/* Signature pad */
.sigwrap { border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: #fff; }
.sigpad { display: block; width: 100%; height: 200px; touch-action: none; background:
  repeating-linear-gradient(0deg, transparent, transparent 39px, #eef0f2 39px, #eef0f2 40px); cursor: crosshair; }
.sigbar { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); background: #fafbfc; }
.sigbar .lbl { font-size: 12px; color: var(--muted); }

.guardian { display: none; }
.guardian.show { display: block; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 16px; font-weight: 600;
  border-radius: 11px; border: 1px solid transparent; padding: 13px 20px;
  cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--brand); color: #fff; width: 100%; padding: 15px; font-size: 17px; }
.btn-primary:hover { background: #000; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.err {
  background: #fdecea; border: 1px solid #f6c9c4; color: var(--danger);
  padding: 11px 14px; border-radius: 10px; font-size: 14px; margin: 0 0 16px;
}
.err ul { margin: 6px 0 0; padding-left: 18px; }
.ok {
  background: var(--accent-soft); border: 1px solid #bfe3d4; color: #155e44;
  padding: 14px 16px; border-radius: 10px; margin: 0 0 16px;
}
.callout {
  background: var(--warn-soft); border: 1px solid #ecdcae; color: #6b4e00;
  padding: 12px 14px; border-radius: 10px; font-size: 13px; margin: 14px 0;
}
.req-star { color: var(--danger); }

.footer-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 22px; }
.footer-note a { color: var(--muted); }

/* Admin */
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.admin-top .who { color: var(--muted); font-size: 13px; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
table.list tr:hover td { background: #fafbfc; }
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eef0f2; color: #444; }
.badge.minor { background: #fbf3df; color: #6b4e00; }
.badge.adult { background: var(--accent-soft); color: #155e44; }
.kv { display: grid; grid-template-columns: 200px 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.sig-view { border: 1px solid var(--line); border-radius: 10px; background: #fff; max-width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); }
.chip.yes { background: var(--accent-soft); border-color: #bfe3d4; color: #155e44; }
.chip.no { background: #f4f5f6; color: #98a0aa; text-decoration: line-through; }

/* Fixed filmer line */
.filmer {
  display: inline-block; font-size: 13px; color: #2b3138;
  background: #f2f4f7; border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 13px; margin: 0 0 14px;
}
.filmer strong { color: var(--ink); }

/* Consent header with "tümünü işaretle" */
.consent-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin: 24px 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}

/* Collapsible legal details */
.legal-details {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 0 14px; margin: 14px 0 4px; background: #fafbfc;
}
.legal-details > summary {
  cursor: pointer; padding: 13px 2px; font-size: 13.5px; font-weight: 600;
  color: var(--accent); list-style: none; display: flex; align-items: center; gap: 8px;
}
.legal-details > summary::-webkit-details-marker { display: none; }
.legal-details > summary::before { content: "＋"; font-weight: 700; }
.legal-details[open] > summary::before { content: "－"; }
.legal-details[open] > summary { border-bottom: 1px solid var(--line); }
.legal-details .legal { padding: 4px 0 14px; }
.mini-h { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 6px; }

@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .card { box-shadow: none; border: none; padding: 0; }
  .legal-box { max-height: none; overflow: visible; }
  /* Katılımcı nüshası yazdırılırken yasal metin görünür olsun */
  .legal-details { border: none; padding: 0; background: none; }
  .legal-details > summary { color: #000; }
  .legal-details > summary::before { content: ""; }
  .legal-details > *:not(summary) { display: block !important; }
}

/* ---------------- Mobile ---------------- */
@media (max-width: 560px) {
  .wrap { padding: 16px 13px calc(80px + env(safe-area-inset-bottom)); }
  .card { padding: 20px 16px; border-radius: 12px; }
  .card h1 { font-size: 20px; }
  .consent-item { padding: 14px 13px; }
  .consent-item input { width: 22px; height: 22px; }
  .consent-item .ct { font-size: 14.5px; }
  .sigpad { height: 220px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { margin-top: 8px; }
  .receipt-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .consent-head { flex-wrap: wrap; }
  /* İkincil dokunma hedefleri en az ~44px olsun (Temizle, Tümünü işaretle, Yazdır) */
  .btn-sm { min-height: 44px; padding: 10px 16px; }
  /* Submit'i baş parmakla kolay erişilir tut; çentikli telefonlarda güvenli alana saygı */
  .btn-primary {
    position: sticky; bottom: calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 6px 20px rgba(16,24,40,.16);
  }
}

.receipt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
