/* Setly — koyu tema: siyah / gri / fosforlu yeşil / lavanta / pembe */
:root {
  --bg: #0E0F13;
  --card: #181A20;
  --card-soft: #20232B;
  --stroke: #292C34;
  --ink: #F3F4F6;
  --ink-soft: #9CA0A8;
  --accent: #C6F432;
  --accent2: #C7B7F7;
  --accent3: #F2C4E4;
  --on: #0E0F13;
  --r: 26px;
  --r-sm: 16px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; }
body {
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none; user-select: none;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
svg.i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; display: block; }

#app { position: fixed; inset: 0; display: flex; flex-direction: column; }

.scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  padding: calc(var(--sat) + 8px) 18px calc(var(--sab) + 120px);
}
.scroll.plain { padding-bottom: calc(var(--sab) + 40px); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.lg { gap: 22px; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.muted { color: var(--ink-soft); }
.accent { color: var(--accent); }
.center { text-align: center; }
.b { font-weight: 700; }
.sb { font-weight: 600; }
.t9 { font-size: 9px } .t10 { font-size: 10px } .t11 { font-size: 11px } .t12 { font-size: 12px } .t13 { font-size: 13px }
.t14 { font-size: 14px } .t15 { font-size: 15px } .t16 { font-size: 16px } .t17 { font-size: 17px } .t18 { font-size: 18px }
.t20 { font-size: 20px } .t22 { font-size: 22px } .t26 { font-size: 26px } .t28 { font-size: 28px } .t30 { font-size: 30px }
.t34 { font-size: 34px } .t38 { font-size: 38px }
.clip1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tnum { font-variant-numeric: tabular-nums; }

/* Kart */
.card { background: var(--card); border: 1px solid var(--stroke); border-radius: var(--r); padding: 16px; }
.card.p14 { padding: 14px; }
.glass {
  background: rgba(40, 42, 50, .55); border: 1px solid rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  border-radius: var(--r); box-shadow: 0 8px 28px rgba(0,0,0,.25);
}
.glass.sm { border-radius: var(--r-sm); }
.soft { background: var(--card-soft); border-radius: 12px; }

.sec-h .title { font-size: 20px; font-weight: 700; }
.sec-h .sub { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

/* Butonlar */
.btn-lime, .btn-surface {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 16px; border-radius: 999px; font-size: 17px; font-weight: 700; color: var(--on);
  background: var(--accent); transition: transform .1s, opacity .1s;
}
.btn-surface { background: var(--accent2); }
.btn-lime:active, .btn-surface:active, .pressable:active { transform: scale(.98); opacity: .85; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px;
  font-weight: 700; font-size: 13px; background: var(--accent); color: var(--on);
}
.circle-btn {
  width: 36px; height: 36px; border-radius: 50%; background: var(--card-soft);
  display: grid; place-items: center; font-size: 15px; flex: none;
}

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--ink-soft); background: var(--card-soft);
  border: 1px solid var(--stroke); white-space: nowrap;
}
.chip.on { color: var(--on); background: var(--accent); border-color: transparent; }
.chip.lav { color: var(--on); background: var(--accent2); border-color: transparent; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* Kapak görselleri */
.cover { position: relative; overflow: hidden; border-radius: var(--r); background: linear-gradient(135deg, #141519, #23262F); }
.cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover > .shade { position: absolute; inset: 0; }
.cover > .content { position: relative; height: 100%; display: flex; flex-direction: column; padding: 18px; color: #fff; }
.cover .content.end { justify-content: flex-end; }
.thumb { position: relative; overflow: hidden; border-radius: 16px; flex: none; display: grid; place-items: center; color: #fff; background: #1b1d23; }
.thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb > .shade { position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.1), rgba(0,0,0,.4)); }
.thumb > svg { position: relative; font-size: 17px; }

/* Segmentli kontrol */
.seg { display: flex; background: var(--card-soft); border-radius: 10px; padding: 2px; gap: 2px; }
.seg button { flex: 1; padding: 8px 4px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.seg button.on { background: var(--accent); color: var(--on); }

/* Slider */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--p, 50%), var(--card-soft) var(--p, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; margin-top: -11px; box-shadow: 0 2px 6px rgba(0,0,0,.4); }

/* Stepper */
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; background: var(--card-soft); border-radius: 14px; }
.stepper button { width: 28px; height: 32px; border-radius: 9px; background: var(--bg); display: grid; place-items: center; font-size: 13px; }
.stepper .val { min-width: 50px; text-align: center; }
.stepper .val .v { font-size: 16px; font-weight: 700; }
.stepper .val .u { font-size: 9px; color: var(--ink-soft); }
.round-btn { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--on); display: grid; place-items: center; font-size: 13px; }

.field {
  width: 100%; padding: 12px 14px; border-radius: 12px; background: var(--card-soft); border: 0; outline: none; font-size: 15px;
  -webkit-user-select: text; user-select: text;
}
select.field { -webkit-appearance: none; appearance: none; }
.search { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card); border: 1px solid var(--stroke); border-radius: 999px; }
.search input { flex: 1; background: none; border: 0; outline: none; font-size: 15px; -webkit-user-select: text; user-select: text; }

/* Alt sekme çubuğu */
.tabbar {
  position: absolute; left: 18px; right: 18px; bottom: calc(var(--sab) + 6px); z-index: 20;
  display: flex; padding: 9px 10px; border-radius: 999px;
  background: rgba(30, 32, 38, .72); border: 1px solid rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: 0 8px 30px rgba(0,0,0,.45);
}
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink-soft); }
.tabbar .ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; }
.tabbar button.on .ic { background: var(--accent); color: var(--on); }
.tabbar .lb { font-size: 9.5px; font-weight: 600; }
.tabbar button.on .lb { color: var(--ink); }

/* Gezinme başlığı */
.navbar { display: flex; align-items: center; gap: 8px; padding: calc(var(--sat) + 8px) 12px 8px; min-height: 52px; }
.navbar .back { display: flex; align-items: center; gap: 2px; color: var(--accent); font-size: 17px; padding: 6px; }
.navbar .back svg { font-size: 22px; }
.navbar .ttl { position: absolute; left: 0; right: 0; text-align: center; font-weight: 600; font-size: 17px; pointer-events: none; }
.navbar > * { position: relative; z-index: 1; }
.big-title { font-size: 32px; font-weight: 700; margin: 4px 0 6px; }
.with-nav .scroll { padding-top: 4px; }

/* Yatay kaydırma */
.hscroll { display: flex; gap: 14px; overflow-x: auto; margin: 0 -18px; padding: 0 18px; scrollbar-width: none; scroll-snap-type: x proximity; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }

/* Dairesel ilerleme */
.ring { position: relative; flex: none; }
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring .lbl { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }

.bar { height: 10px; border-radius: 99px; background: var(--card-soft); overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); border-radius: 99px; transition: width .25s; }

.banner-pink { display: flex; align-items: center; gap: 10px; padding: 14px; background: var(--accent3); color: var(--on); border-radius: var(--r-sm); font-size: 13px; font-weight: 600; }

/* Antrenman */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.set-cell { display: flex; align-items: center; gap: 8px; padding: 16px 14px; border-radius: 14px; background: var(--card-soft); font-weight: 700; font-size: 15px; }
.set-cell .ck { font-size: 24px; color: var(--stroke); margin-left: auto; }
.set-cell.done { background: var(--accent); color: var(--on); }
.set-cell.done .ck { color: var(--on); }
.set-row { padding: 6px 12px; border-radius: 18px; display: flex; flex-direction: column; gap: 10px; }
.set-row.done { background: rgba(198,244,50,.06); }
.set-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 15px; border-radius: 16px; background: var(--card-soft); border: 1.5px solid var(--stroke); font-weight: 700; font-size: 16px; }
.set-btn svg { font-size: 20px; }
.set-btn.done { background: var(--accent); color: var(--on); border-color: transparent; }
.divider { height: 1px; background: var(--stroke); }
.pr-badge { display: inline-flex; align-items: center; gap: 3px; padding: 4px 8px; border-radius: 99px; background: var(--accent); color: var(--on); font-size: 10px; font-weight: 700; }
.rir { position: relative; display: inline-flex; align-items: center; gap: 3px; padding: 6px 10px; border-radius: 99px; background: var(--card-soft); color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.rir.on { background: var(--accent2); color: var(--on); }
.rir select { position: absolute; inset: 0; opacity: 0; width: 100%; }

.restbar {
  position: absolute; left: 14px; right: 14px; bottom: calc(var(--sab) + 6px); z-index: 30;
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 22px;
  background: var(--accent2); color: var(--on); box-shadow: 0 6px 24px rgba(0,0,0,.3);
}
.restbar .sec { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.restbar button { padding: 8px 14px; border-radius: 99px; font-size: 14px; font-weight: 700; }

/* Katmanlar */
.overlay { position: absolute; inset: 0; z-index: 50; }
.backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); animation: fade .2s; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; overflow-y: auto;
  background: var(--bg); border-radius: 22px 22px 0 0; border-top: 1px solid var(--stroke);
  padding: 10px 20px calc(var(--sab) + 24px); animation: up .25s cubic-bezier(.2,.8,.2,1);
}
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--stroke); margin: 0 auto 14px; }
.sheet.tall { top: calc(var(--sat) + 20px); max-height: none; }
.dialog { position: absolute; left: 10px; right: 10px; bottom: calc(var(--sab) + 10px); display: flex; flex-direction: column; gap: 8px; animation: up .25s cubic-bezier(.2,.8,.2,1); }
.dialog .grp { background: #23252c; border-radius: 14px; overflow: hidden; }
.dialog .head { padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--stroke); }
.dialog .grp button { display: block; width: 100%; padding: 17px; font-size: 18px; color: var(--accent); border-bottom: 1px solid var(--stroke); }
.dialog .grp button:last-child { border-bottom: 0; }
.dialog button.danger { color: #FF6B6B; }
.dialog .cancel { background: #23252c; border-radius: 14px; padding: 17px; font-size: 18px; font-weight: 600; color: var(--accent); }
.celebrate { position: absolute; inset: 0; z-index: 60; background: rgba(0,0,0,.7); display: grid; place-items: center; padding: 30px; animation: fade .2s; }
.celebrate .glass { padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; max-width: 360px; }
.toast { position: absolute; left: 50%; top: calc(var(--sat) + 14px); transform: translateX(-50%); z-index: 90; padding: 10px 16px; border-radius: 99px; background: var(--card-soft); border: 1px solid var(--stroke); font-size: 13px; font-weight: 600; animation: fade .2s; }

@keyframes fade { from { opacity: 0 } }
@keyframes up { from { transform: translateY(40px); opacity: 0 } }

/* Grafik */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.select-pill { position: relative; display: inline-flex; align-items: center; gap: 4px; max-width: 170px; padding: 7px 12px; border-radius: 99px; background: var(--accent); color: var(--on); font-size: 12px; font-weight: 600; }
.select-pill select { position: absolute; inset: 0; opacity: 0; width: 100%; }

.install-hint { border: 1px dashed var(--stroke); border-radius: var(--r-sm); padding: 14px; font-size: 13px; color: var(--ink-soft); }

/* Ekran iskeleti & düzeltmeler */
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.blk { display: block; width: 100%; text-align: left; }
button.row.blk, button.card.row { display: flex; }
.stepper { gap: 3px; padding: 6px; }
.stepper button { width: 25px; }
.stepper .val { min-width: 44px; }
.stepper.int .val { min-width: 36px; }
.set-row { padding: 6px 8px; }
.set-grid .set-cell svg.i { flex: none; }
.card > .stack, .card.stack { min-width: 0; }
@media (min-width: 600px) {
  .scroll > .stack, .scroll > .big-title, .scroll > .row { max-width: 560px; margin-left: auto; margin-right: auto; }
  .tabbar { max-width: 520px; margin: 0 auto; }
}

/* v2: yeni bileşenler */
.banner { padding: 12px 14px; background: var(--card); border: 1px solid var(--stroke); border-radius: var(--r-sm); }
textarea.field { resize: none; font-family: inherit; line-height: 1.35; }
.circle-btn[disabled] { pointer-events: none; }
.mini-step { background: var(--card-soft); border-radius: 12px; padding: 6px 8px; display: flex; flex-direction: column; gap: 3px; align-items: center; }
.mini-step button { width: 24px; height: 24px; border-radius: 8px; background: var(--bg); display: grid; place-items: center; font-size: 11px; }
.mini-step .tnum { min-width: 36px; text-align: center; }
.setbar { position: relative; flex: 1; height: 10px; border-radius: 6px; background: var(--card-soft); overflow: hidden; }
.setbar .band { position: absolute; top: 0; bottom: 0; background: rgba(198,244,50,.14); border-left: 1px dashed rgba(198,244,50,.5); border-right: 1px dashed rgba(198,244,50,.5); }
.setbar .fill { position: absolute; left: 0; top: 2px; bottom: 2px; border-radius: 4px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .cd { aspect-ratio: 1; display: grid; place-items: center; font-size: 12px; border-radius: 10px; color: var(--ink-soft); }
.cal .cd.on { background: var(--accent); color: var(--on); font-weight: 700; }
.cal .cd.today { box-shadow: inset 0 0 0 1.5px var(--accent2); color: var(--ink); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
img.ph { width: 54px; height: 66px; object-fit: cover; border-radius: 12px; background: var(--card-soft); flex: none; }
.restbar.hold { background: var(--accent); }
