:root {
  --bg: #f5f3ee;
  --card: #ffffff;
  --text: #24302b;
  --muted: #6f7a75;
  --line: #e4e1d9;
  --accent: #2f7d5b;
  --accent-soft: #e2f0e8;
  --green: #2f9e5f;
  --yellow: #d9a520;
  --red: #d0533f;
  --red-soft: #fbe7e3;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151a18;
    --card: #1f2623;
    --text: #e6ebe8;
    --muted: #94a09a;
    --line: #2f3834;
    --accent: #5cc08e;
    --accent-soft: #23382d;
    --green: #4cc07d;
    --yellow: #e8b83a;
    --red: #e8735f;
    --red-soft: #3a2420;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
main { max-width: 560px; margin: 0 auto; padding: 16px 16px 96px; }
button { font: inherit; color: inherit; cursor: pointer; }

.top { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 0 12px; }
.top h1 { font-size: 22px; margin: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; }
.card h2 { font-size: 17px; margin: 0 0 8px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; }
.card.next { border: 2px solid var(--accent); }
.card.done { opacity: .75; }
.time { color: var(--muted); font-size: 14px; }
.note { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.center { text-align: center; }

.opt { margin: 8px 0 12px; }
.opt ul { margin: 6px 0 0; padding-left: 20px; font-size: 14px; color: var(--muted); }
.status { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; margin: 2px 0 4px; }
.have { color: var(--green); font-weight: 600; }
.ready { color: var(--accent); font-weight: 600; }
.miss { color: var(--red); font-weight: 600; }

.pick { width: 100%; padding: 12px; border-radius: 12px; border: 0; background: var(--accent); color: #fff; font-weight: 600; }
.pick.small { width: auto; padding: 8px 12px; margin-left: 6px; background: var(--accent-soft); color: var(--text); font-weight: 500; }
.pick.small.on { background: var(--accent); color: #fff; }

.extra { display: flex; gap: 8px; }
.extra button { flex: 1; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: transparent; }

.chosen { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.link { background: none; border: 0; color: var(--accent); padding: 4px; font-size: 14px; }

.seg { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 10px 4px; border-radius: 9px; }
.seg button.on { background: var(--accent); color: #fff; font-weight: 600; }
.small-row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 14px; flex-wrap: wrap; gap: 6px; }

.days { display: flex; justify-content: space-between; gap: 2px; }
.daycol { flex: 1; border: 0; background: transparent; padding: 6px 0; border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.daycol.sel { background: var(--accent-soft); color: var(--text); }
.dots { display: flex; flex-direction: column; gap: 3px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.dots i.ate { background: var(--accent); }
.dots i.out { background: var(--yellow); }
.out-mark { color: var(--yellow); }
.ate-mark { color: var(--accent); }
.dots i.skip { border: 2px solid var(--muted); }
.dots i.empty { background: var(--line); }
.gym { height: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 0; padding: 8px 12px; border-radius: 999px; }
.chip.az { background: color-mix(in srgb, var(--yellow) 25%, transparent); }
.chip.yok { background: var(--red-soft); }
.chip.slot { font-size: 13px; padding: 6px 10px; background: transparent; border: 1px solid var(--line); color: var(--muted); }
.chip.slot.on { background: var(--accent-soft); border-color: var(--accent); color: var(--text); font-weight: 600; }
.ready-item { padding-bottom: 10px; }
.ready-item + .ready-item { border-top: 1px solid var(--line); }
.ready-item + .ready-item .stock { border-top: 0; }
#add-ready { margin-top: 10px; }

.stock { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.stock:first-of-type { border-top: 0; }
.state { min-width: 78px; padding: 6px 10px; border-radius: 999px; border: 0; color: #fff; font-weight: 600; font-size: 14px; }
.state.var { background: var(--green); }
.state.az { background: var(--yellow); color: #2a2205; }
.state.yok { background: var(--red); }

.add { display: flex; gap: 8px; }
.add input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.add button { padding: 10px 16px; border-radius: 12px; border: 0; background: var(--accent); color: #fff; font-weight: 600; }

/* Sekmeler tepede ve sayfa kayarken orada sabit kalır; alttaki Netlify yazısıyla çakışmaz */
.tabs { position: sticky; top: 0; z-index: 10; display: flex; gap: 6px; max-width: 560px; margin: 0 auto; background: var(--bg); padding: calc(8px + env(safe-area-inset-top)) 16px 8px; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; border: 1px solid var(--line); background: var(--card); padding: 10px 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 18px; color: var(--muted); }
.tabs button span { font-size: 15px; }
.tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* Listeler */
.tabs { padding-left: 16px; padding-right: 16px; }
.tabs button { gap: 5px; min-width: 0; }
.list-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-name { font-weight: 600; overflow-wrap: anywhere; }
.list-row:not(.on) .list-name { font-weight: 500; }
.list-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 2px; }
.list-actions:empty { display: none; }
.danger, .armed { color: var(--red); }
.wide { display: block; width: 100%; margin-top: 12px; padding: 11px; border-radius: 12px; border: 1px dashed var(--muted); background: transparent; }
.file-btn { flex: 1; padding: 10px; border-radius: 12px; border: 1px solid var(--line); text-align: center; cursor: pointer; }
.ok { color: var(--green); font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.error { background: var(--red-soft); color: var(--red); font-weight: 600; padding: 10px 12px; border-radius: 12px; margin: 0 0 12px; }

/* Düzenleme */
.card input, .card select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; min-width: 0; }
.ed-row { display: flex; gap: 6px; align-items: center; }
.ed-row input { flex: 1; }
.ed-row input.strong { font-weight: 600; }
.ed-row input.time-input { flex: 0 0 84px; }
.ed-label { display: block; font-size: 13px; color: var(--muted); margin-top: 8px; }
.ed-label input, .ed-label select { display: block; width: 100%; margin-top: 3px; }
.card > .ed-label:first-child { margin-top: 0; }
.icon { flex: none; min-width: 38px; height: 38px; padding: 0 6px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.icon.armed { width: auto; font-size: 12px; font-weight: 600; }
.seg.mini { margin-top: 8px; }
.seg.mini button { padding: 6px 2px; font-size: 13px; }
.ed-option { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ed-line { margin: 8px 0 0 8px; padding: 0 0 10px 10px; border-left: 2px solid var(--line); }
.ed-items { margin-top: 8px; gap: 6px; }
.picker { margin-top: 8px; padding: 10px; border-radius: 12px; background: var(--bg); }
.picker .note { margin: 8px 0 4px; }
.picker .note:first-child { margin-top: 0; }
.picker .chips { gap: 6px; }
.picker .add { margin-top: 12px; }
.picker input { background: var(--card); }
.ed-save { margin-top: 12px; }

/* Hakkında */
.about-link { display: block; margin: 4px auto 0; }
.about { text-align: center; margin-top: 8px; }
.about img { display: block; width: 100%; max-width: 260px; margin: 0 auto 12px; border-radius: 16px; }
.about h1 { font-size: 22px; margin: 0; }
.about h2 { margin: 18px 0 4px; }
.about p { margin: 0; }
.about .note { margin-top: 2px; }
.about-foot { margin-top: 22px !important; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.about a { color: var(--accent); }
