:root {
  --bg: #f2f2f7; --card: #ffffff; --card2: #f2f2f7; --text: #000000; --muted: #8a8a8e;
  --sep: rgba(60,60,67,.14); --fill: rgba(120,120,128,.12);
  --move: #fa114f; --protein: #2fd158; --sleep: #5e5ce6; --accent: #0a84ff; --orange: #ff9f0a;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
  --r: 22px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --card: #1c1c1e; --card2: #2c2c2e; --text: #ffffff; --muted: #98989f;
    --sep: rgba(84,84,88,.5); --fill: rgba(120,120,128,.24); --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --card: #1c1c1e; --card2: #2c2c2e; --text: #ffffff; --muted: #98989f;
  --sep: rgba(84,84,88,.5); --fill: rgba(120,120,128,.24); --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 17px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; letter-spacing: -.01em;
}
h1, h2 { margin: 0; letter-spacing: -.02em; }
button, input { font: inherit; color: inherit; }

.wrap { max-width: 1360px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 12px) 16px calc(env(safe-area-inset-bottom) + 24px); }
@media (min-width: 900px) { .wrap { padding-left: 28px; padding-right: 28px; } }
.top { display: flex; align-items: flex-end; justify-content: space-between; padding: 8px 4px 14px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.top h1 { font-size: 34px; font-weight: 700; }
.avatar { border: 0; padding: 0; background: var(--fill); width: 44px; height: 44px; border-radius: 50%; overflow: hidden; cursor: pointer; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.card { background: var(--card); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.card h2 { font-size: 20px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: baseline; gap: 8px; }
.muted { color: var(--muted); font-weight: 500; font-size: 15px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 10px; }
.tag { font-size: 12px; font-weight: 600; color: var(--orange); background: color-mix(in srgb, var(--orange) 15%, transparent); padding: 3px 8px; border-radius: 999px; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 14px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1060px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .note-card { grid-column: span 3; } }

/* Koç */
.coach { display: flex; gap: 14px; align-items: center; padding: 14px 16px; }
.coach-me { width: 76px; height: 76px; border-radius: 50%; flex: none; transition: transform .4s cubic-bezier(.2,.9,.3,1.4); }
.coach.pop .coach-me { transform: scale(1.08) rotate(-4deg); }
.bubble { min-width: 0; }
.coach-title { font-weight: 700; font-size: 19px; }
.coach-body { color: var(--muted); font-size: 15px; margin-top: 2px; }
.coach[data-kind="walk"] .coach-title { color: var(--move); }
.coach[data-kind="goal"] .coach-title { color: var(--protein); }
.coach[data-kind="sleep"] .coach-title, .coach[data-kind="winddown"] .coach-title { color: var(--sleep); }

/* Halkalar */
.rings-row { display: flex; align-items: center; gap: 18px; }
.rings { width: 132px; height: 132px; flex: none; transform: rotate(-90deg); }
.rings circle { fill: none; stroke-linecap: round; }
.rings .p { transition: stroke-dashoffset 1s cubic-bezier(.3,.8,.2,1); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.legend li { line-height: 1.15; }
.legend .k { font-size: 13px; font-weight: 600; color: var(--muted); }
.legend .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.legend .v small { font-size: 14px; color: var(--muted); font-weight: 600; }

/* Seri */
.streak-num { font-size: 56px; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--orange); }
.streak-num small { font-size: 18px; font-weight: 700; margin-left: 6px; color: var(--muted); letter-spacing: 0; }
.streak-best { color: var(--muted); font-size: 14px; margin: 6px 0 12px; }
.dots { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; }
.dots i { aspect-ratio: 1; border-radius: 50%; background: var(--fill); }
.dots i.on { background: var(--orange); }
.dots i.today { outline: 2px solid var(--orange); outline-offset: 1px; }

/* Listeler + iOS anahtar */
.list { background: var(--card2); border-radius: 14px; overflow: hidden; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; min-height: 48px; position: relative; }
.list .row + .row::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; height: 1px; background: var(--sep); }
.checkin-card > .row { background: var(--card2); border-radius: 14px; margin-top: 10px; }
.row input[type=time], .row input[type=number], .row input[type=text] { background: transparent; border: 0; text-align: right; color: var(--accent); max-width: 50%; outline: none; }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--fill); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .25s cubic-bezier(.3,.7,.3,1.2); }
.switch input:checked + span { background: #34c759; }
.switch input:checked + span::after { transform: translateX(20px); }
.row .lbl small { display: block; color: var(--muted); font-size: 13px; }

/* Antrenman */
.workout { margin: 0; padding: 0; list-style: none; counter-reset: w; }
.workout li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--sep); counter-increment: w; }
.workout li:last-child { border-bottom: 0; }
.workout li::before { content: counter(w); width: 24px; height: 24px; border-radius: 50%; background: var(--fill); font-size: 13px; font-weight: 700; display: grid; place-items: center; flex: none; }
.workout .n { flex: 1; }
.workout .n small { display: block; color: var(--muted); font-size: 13px; }
.workout .s { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }

/* Öğün */
.meal .slot { font-size: 13px; font-weight: 600; color: var(--protein); text-transform: uppercase; letter-spacing: .02em; }
.meal .ad { font-size: 19px; font-weight: 700; margin: 4px 0 6px; }
.meal .mac { display: flex; gap: 8px; }
.meal .mac span { background: var(--card2); border-radius: 10px; padding: 6px 10px; font-size: 14px; font-weight: 600; }

/* Grafikler */
.bars, .line { width: 100%; height: 120px; display: block; overflow: visible; }
.line { height: 110px; margin: 6px 0 12px; }
.xlabels { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Kilo */
.weight-top { display: flex; justify-content: space-between; align-items: flex-end; }
.big { font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.big small { font-size: 16px; color: var(--muted); font-weight: 600; }
.wgoal { text-align: right; font-weight: 700; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; background: var(--card2); border: 0; border-radius: 12px; padding: 10px 12px; outline: none; }
.inline-form button, .sheet .primary, .login-card button { border: 0; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 600; padding: 10px 16px; cursor: pointer; }

/* Vücut */
.vitals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vital { background: var(--card2); border-radius: 14px; padding: 10px 12px; }
.vital .k { font-size: 13px; color: var(--muted); font-weight: 600; }
.vital .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vital .v small { font-size: 13px; color: var(--muted); }

.note { white-space: pre-wrap; font-size: 16px; line-height: 1.5; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 0 8px; }
.foot a { color: var(--accent); text-decoration: none; }

/* Alt sayfa (sheet) */
.sheet-back { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 10; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 11; max-width: 560px; margin: 0 auto; max-height: 88vh; overflow: auto;
  background: var(--bg); border-radius: 14px 14px 0 0; padding: 8px 16px calc(env(safe-area-inset-bottom) + 20px); animation: up .35s cubic-bezier(.2,.9,.3,1); }
.sheet h2 { font-size: 20px; margin: 10px 4px 12px; }
.sheet .list { background: var(--card); }
.sheet .primary { width: 100%; margin-top: 16px; padding: 14px; }
.sheet .danger { display: block; text-align: center; color: #ff3b30; margin-top: 14px; text-decoration: none; }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--fill); margin: 0 auto; }
@keyframes up { from { transform: translateY(100%); } }

/* Giriş */
body.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 340px; text-align: center; display: grid; gap: 12px; }
.login-me { width: 110px; height: 110px; border-radius: 50%; margin: 0 auto; }
.login-card h1 { font-size: 34px; }
.login-card .sub { color: var(--muted); margin: -6px 0 8px; }
.login-card input { background: var(--card); border: 0; border-radius: 12px; padding: 14px; text-align: center; outline: none; }
.login-card button { padding: 14px; }

/* Kurulum */
.doc { max-width: 720px; margin: 0 auto; }
.doc .card { margin-bottom: 14px; }
.doc ol { padding-left: 22px; margin: 0; }
.doc li { margin: 6px 0; }
.doc code { background: var(--card2); padding: 2px 6px; border-radius: 6px; font-size: 14px; word-break: break-all; }
.doc pre { background: var(--card2); padding: 12px; border-radius: 12px; overflow: auto; font-size: 13px; white-space: pre-wrap; word-break: break-all; }
.doc .copy { border: 0; background: var(--accent); color: #fff; border-radius: 10px; padding: 6px 12px; font-weight: 600; cursor: pointer; }

/* Su */
.wbar { height: 14px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); overflow: hidden; }
.wbar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #5ac8fa, var(--accent)); transition: width .8s cubic-bezier(.3,.8,.2,1); }
.qbtns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 10px; }
.q { border: 0; border-radius: 14px; padding: 12px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 600; cursor: pointer; transition: transform .12s; }
.q:active { transform: scale(.95); }
.q.water { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.q.coffee { background: color-mix(in srgb, #a2845e 20%, transparent); color: #a2845e; }
.q.cola { background: color-mix(in srgb, #ff3b30 14%, transparent); color: #ff3b30; }
.drinkstats { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.drinkstats span { background: var(--card2); border-radius: 10px; padding: 5px 9px; }
.drinkstats .bad { color: #ff3b30; }
.bars.small { height: 70px; }
@media (max-width: 380px) { .qbtns { grid-template-columns: 1fr 1fr; } }
/* Mekan */
.pl-name { font-size: 20px; font-weight: 700; }
.place-card .mac { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.place-card .mac span { background: var(--card2); border-radius: 10px; padding: 6px 10px; font-size: 14px; font-weight: 600; }
.maplink { display: inline-block; margin-top: 12px; color: var(--accent); font-weight: 600; text-decoration: none; }

/* Sigara */
.smoke-top { display: flex; justify-content: space-between; align-items: flex-end; }
.qbtns.two { grid-template-columns: 1fr 1.6fr; }
.q.win { background: color-mix(in srgb, #34c759 16%, transparent); color: #248a3d; }
:root[data-theme="dark"] .q.win { color: #30d158; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .q.win { color: #30d158; } }
.drinkstats .good { color: #248a3d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .drinkstats .good { color: #30d158; } }

/* Rutin */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--fill); border-radius: 9px; padding: 2px; margin-bottom: 12px; }
.seg button { border: 0; background: transparent; border-radius: 7px; padding: 6px; font-size: 14px; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--card); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04); }
.step { justify-content: flex-start; }
.step .at { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; width: 46px; flex: none; color: var(--muted); }
.step .lbl { flex: 1; min-width: 0; }
.step.is-done .lbl { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--sep); }
.step.is-next .at { color: var(--accent); }
.step.is-late .at { color: #ff3b30; }

/* ===================== v2: sekmeler, büyük düğmeler, oynatıcı, sihirbaz ===================== */
body { padding-bottom: calc(env(safe-area-inset-bottom) + 76px); }
body.noscroll { overflow: hidden; }
.tab[hidden] { display: none !important; }
.sec { font-size: 20px; font-weight: 700; margin: 22px 4px 10px; display: flex; gap: 8px; align-items: baseline; }
.small { font-size: 14px; }
.help { margin-left: auto; border: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--fill); color: var(--muted); font-weight: 700; font-size: 14px; cursor: pointer; flex: none; }

/* Alt sekme çubuğu (iOS) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(env(safe-area-inset-bottom) + 6px); background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--sep); }
.tabbar button { border: 0; background: none; display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 600; padding: 4px 0; cursor: pointer; }
.tabbar svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.on { color: var(--accent); }
@media (min-width: 900px) { .tabbar { max-width: 560px; margin: 0 auto 14px; border-radius: 22px; border: 1px solid var(--sep); box-shadow: var(--shadow); } }

/* Büyük düğme */
.big-btn { border: 0; border-radius: 16px; background: var(--accent); color: #fff; font-weight: 700; font-size: 17px; padding: 15px 18px; cursor: pointer; transition: transform .12s, opacity .2s; }
.big-btn:active { transform: scale(.97); }
.big-btn:disabled { opacity: .6; }
.big-btn.ghost { background: var(--fill); color: var(--text); }
.big-btn.full { width: 100%; margin-top: 14px; }

/* Şimdi kartı */
.now { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 16px; }
.now .big-btn { grid-column: 1 / -1; width: 100%; }
.now-k { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.now .coach-title { font-size: 21px; line-height: 1.2; }
.now .coach-me { width: 76px; height: 76px; border-radius: 50%; transition: transform .4s cubic-bezier(.2,.9,.3,1.4); }
.now.pop .coach-me { transform: scale(1.08) rotate(-4deg); }
.now[data-kind="walk"] .now-k, .now[data-kind="smoke"] .now-k { color: var(--move); }
.now[data-kind="goal"] .now-k, .now[data-kind="event"] .now-k { color: #34c759; }
.now[data-kind="sleep"] .now-k, .now[data-kind="winddown"] .now-k { color: var(--sleep); }
.now[data-kind="water"] .now-k { color: #5ac8fa; }

/* Hızlı düğmeler */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.qk { border: 0; border-radius: 18px; padding: 14px 6px; display: grid; gap: 2px; cursor: pointer; transition: transform .12s; min-height: 72px; align-content: center; }
.qk:active { transform: scale(.94); }
.qk b { font-size: 16px; }
.qk small { font-size: 12px; opacity: .8; font-weight: 600; }
.qk.water { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.qk.smoke { background: color-mix(in srgb, #ff3b30 14%, transparent); color: #ff3b30; }
.qk.win { background: color-mix(in srgb, #34c759 18%, transparent); color: #248a3d; }
.qk.more { background: var(--fill); color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .qk.win { color: #30d158; } }
@media (max-width: 400px) { .quick { gap: 8px; } .qk b { font-size: 14px; } .qk small { font-size: 11px; } }

/* Seçenek kutuları */
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0; }
.opt { border: 2px solid transparent; background: var(--card); border-radius: 16px; padding: 16px 12px; display: grid; gap: 3px; text-align: left; cursor: pointer; }
.opt b { font-size: 17px; } .opt small { color: var(--muted); font-size: 13px; }
.opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.opt.cola b { color: #ff3b30; } .opt.coffee b { color: #a2845e; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.chip { border: 0; background: var(--fill); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; cursor: pointer; text-transform: capitalize; }
.chip.on { background: var(--accent); color: #fff; }
.chips.big { justify-content: center; }
.chips.big .chip { padding: 12px 18px; font-size: 16px; }

/* Liste kartları (mekan/etkinlik) */
.list-cards { display: grid; gap: 10px; }
@media (min-width: 900px) { .list-cards { grid-template-columns: 1fr 1fr; } }
.lc { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 18px; padding: 12px 14px; color: inherit; text-decoration: none; box-shadow: var(--shadow); min-width: 0; }
.lc-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.lc-t b { font-size: 16px; } .lc-t small { font-size: 13px; color: var(--muted); }
.lc-date { width: 48px; height: 52px; border-radius: 12px; background: color-mix(in srgb, #ff3b30 12%, transparent); color: #ff3b30; display: grid; place-items: center; align-content: center; flex: none; line-height: 1; }
.lc-date b { font-size: 22px; } .lc-date small { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.lc-ico { width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, #34c759 15%, transparent); display: grid; place-items: center; flex: none; }
.lc-ico svg { width: 24px; height: 24px; fill: none; stroke: #34c759; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.lc-r { display: grid; justify-items: end; gap: 6px; flex: none; }
.lc .maplink { margin: 0; font-size: 13px; }
.pill { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--fill); white-space: nowrap; }
.pill.free { background: color-mix(in srgb, #34c759 18%, transparent); color: #248a3d; }
.empty { color: var(--muted); background: var(--card); border-radius: 18px; padding: 18px; text-align: center; font-size: 15px; }
.add-card { margin-top: 14px; }
.add-card summary { font-weight: 700; color: var(--accent); cursor: pointer; list-style: none; padding: 4px 0; }
.stack { display: grid; gap: 10px; margin-top: 12px; }
.stack input, .stack select { background: var(--card2); border: 0; border-radius: 12px; padding: 12px; outline: none; font: inherit; color: inherit; }
.row select { background: transparent; border: 0; color: var(--accent); padding: 4px; font: inherit; outline: none; }
.stack .row { background: var(--card2); border-radius: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two input { min-width: 0; }

/* İşler */
.wk { text-decoration: none; color: inherit; justify-content: flex-start; }
.wk-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.wk-dot.doing { border-color: var(--orange); background: var(--orange); }

/* Antrenman */
.wo-hero { display: grid; gap: 14px; }
.wo-hero .big-btn { width: 100%; font-size: 19px; padding: 18px; }
.seg.wide { margin: 14px 0; }
.ex-grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .ex-grid { grid-template-columns: 1fr 1fr; } }
.ex { display: flex; gap: 12px; align-items: center; text-align: left; border: 0; cursor: pointer; width: 100%; font: inherit; color: inherit; }
.ex .fig { width: 120px; height: 90px; flex: none; background: var(--card2); border-radius: 14px; }
.ex-t { display: grid; gap: 2px; } .ex-t b { font-size: 17px; } .ex-t small { font-size: 13px; }
.ex-n { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.fig { color: var(--text); }
.fig .near polyline, .fig .near line { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.fig .far polyline { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; opacity: .3; }
.fig .floor { stroke: var(--sep); stroke-width: 2; }
.fig .prop { stroke: var(--muted); stroke-width: 3; stroke-linecap: round; opacity: .55; }
.fig .prop-fill { fill: var(--muted); opacity: .45; }
.fig .bag { fill: var(--orange); }
.fig.big { width: 100%; max-width: 420px; aspect-ratio: 4/3; height: auto; display: block; margin: 0 auto; background: var(--card2); border-radius: 18px; }
.steps-ol { margin: 0; padding-left: 22px; } .steps-ol li { margin: 6px 0; line-height: 1.4; }
.tipbox { background: var(--card2); border-radius: 12px; padding: 10px 12px; margin-top: 8px; font-size: 15px; }
.sheet .tipbox { background: var(--card); }
.tipbox.warn { background: color-mix(in srgb, var(--orange) 14%, transparent); }
.sheet-p { font-size: 17px; line-height: 1.5; }

/* Tam ekran oynatıcı */
.player { position: fixed; inset: 0; z-index: 30; background: var(--bg); display: flex; flex-direction: column; gap: 10px; padding: calc(env(safe-area-inset-top) + 14px) 16px calc(env(safe-area-inset-bottom) + 16px); overflow: auto; }
.player[hidden] { display: none; }
.player-x { position: absolute; top: calc(env(safe-area-inset-top) + 10px); right: 14px; border: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--fill); font-size: 16px; cursor: pointer; z-index: 2; color: var(--text); }
.player-top { display: flex; gap: 10px; font-weight: 700; color: var(--muted); font-size: 14px; padding-right: 44px; }
.player-top span + span { color: var(--accent); }
.player-name { font-size: 30px; font-weight: 800; text-align: center; letter-spacing: -.02em; }
.player-sure { text-align: center; color: var(--muted); font-weight: 600; font-size: 17px; margin-top: -6px; }
.player-timer { font-size: 96px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; color: var(--accent); line-height: 1; }
.player-steps { margin: 0 auto; padding-left: 22px; max-width: 520px; font-size: 16px; } .player-steps li { margin: 4px 0; }
.player-tip { text-align: center; max-width: 520px; margin: 0 auto; color: var(--muted); font-size: 15px; }
.player-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: auto; max-width: 560px; width: 100%; align-self: center; }
.player-btns .big-btn { padding: 18px; font-size: 18px; }
.player-btns .big-btn[hidden] { display: none; }
.player-btns:has(.big-btn[hidden]) { grid-template-columns: 1fr; }
.pdone { width: 140px; height: 140px; border-radius: 50%; }

/* Sihirbaz */
.onb { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow: auto; }
.onb[hidden] { display: none; }
.onb-inner { max-width: 480px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; gap: 12px; padding: calc(env(safe-area-inset-top) + 18px) 20px calc(env(safe-area-inset-bottom) + 20px); }
.onb-prog { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.onb-prog i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .35s; }
.onb-me { width: 110px; height: 110px; border-radius: 50%; margin: 24px auto 4px; }
.onb h2 { font-size: 28px; text-align: center; line-height: 1.2; }
.onb .muted { text-align: center; margin: 0; }
.onb-in { width: 100%; font-size: 26px; font-weight: 700; text-align: center; background: var(--card); border: 0; border-radius: 16px; padding: 18px; outline: none; margin-top: 10px; color: var(--text); }
.onb-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: auto; padding-top: 20px; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* Bildirim balonu */
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 90px); transform: translateX(-50%); z-index: 50; max-width: min(92vw, 480px);
  background: color-mix(in srgb, var(--text) 88%, transparent); color: var(--bg); padding: 12px 16px; border-radius: 16px; font-weight: 600; font-size: 15px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.toast[hidden] { display: none; }
.toast.in { animation: tin .3s cubic-bezier(.2,.9,.3,1.3); }
@keyframes tin { from { opacity: 0; transform: translate(-50%, 16px) scale(.96); } }

.copy { border: 0; background: var(--fill); color: var(--accent); border-radius: 10px; padding: 7px 12px; font-weight: 700; font-size: 14px; cursor: pointer; flex: none; }
.copybox { background: var(--card); padding: 12px; border-radius: 12px; white-space: pre-wrap; word-break: break-all; font-size: 13px; }
#settingsForm .list { background: var(--card); }
.tab .card + .card { margin-top: 14px; }
.tab > .grid { margin-top: 14px; }
.tab > .grid > .card + .card { margin-top: 0; }

/* Ruh hali + konuşma */
.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mood { border: 2px solid transparent; background: var(--card2); border-radius: 16px; padding: 8px 2px; display: grid; justify-items: center; gap: 4px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); }
.mood img { width: 44px; height: 44px; border-radius: 50%; }
.mood.on { border-color: var(--accent); color: var(--accent); }
.talk { display: grid; gap: 8px; margin-top: 12px; }
.talk textarea { background: var(--card2); border: 0; border-radius: 14px; padding: 12px; font: inherit; color: inherit; resize: vertical; outline: none; }
.wk-dot.urgent { border-color: #ff3b30; background: #ff3b30; }

/* Yemekler */
.meals { display: grid; gap: 10px; }
.ml { display: flex; align-items: center; gap: 10px; background: var(--card2); border-radius: 16px; padding: 12px; border: 2px solid transparent; }
.ml.is-due { border-color: var(--orange); }
.ml.is-done { opacity: .75; }
.ml-main { flex: 1; min-width: 0; display: grid; gap: 2px; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.ml-main b { font-size: 16px; } .ml-main small { color: var(--muted); font-size: 13px; }
.ml-slot { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.ml.is-due .ml-slot { color: var(--orange); }
.ml-btns { display: grid; gap: 6px; flex: none; }
.mini { border: 0; border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 14px; background: var(--fill); color: var(--text); cursor: pointer; }
.mini.ok { background: #34c759; color: #fff; }
.ml-st { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; flex: none; }
.ml-st.ok { background: color-mix(in srgb, #34c759 18%, transparent); color: #248a3d; }
.ml-st.warn { background: color-mix(in srgb, var(--orange) 18%, transparent); color: var(--orange); }
.ml-st.bad { background: color-mix(in srgb, #ff3b30 14%, transparent); color: #ff3b30; }
.ml-x { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; flex: none; }
.now #nowBtn2 { grid-column: 1 / -1; width: 100%; margin-top: -6px; }
.sheet .mac { display: flex; gap: 8px; }

/* Düzen: kartlar boyuna uzamasın, masaüstünde sütunlara akıt */
@media (min-width: 760px) {
  .tab > .grid { display: block; columns: 2; column-gap: 14px; }
  .tab > .grid > .card { break-inside: avoid; margin: 0 0 14px; display: block; width: 100%; }
  .tab > .grid > .card[hidden] { display: none; }
  .tab > .grid > .note-card { column-span: all; }
}
@media (min-width: 1060px) { .tab > .grid { columns: 3; } }
.tab > .grid > .card + .card { margin-top: 0; }
@media (max-width: 759px) { .tab > .grid > .card { margin-bottom: 0; } }
@media (min-width: 900px) { .now { grid-template-columns: auto 1fr auto; } .now .big-btn { grid-column: auto; width: auto; min-width: 230px; margin: 0; } .now #nowBtn2 { grid-column: 3; } }

/* Halkalar: sıkı ve yatay lejant */
.rings-row { gap: 16px; }
.rings { width: 112px; height: 112px; }
.legend { flex: 1; gap: 0; }
.legend li { display: grid; grid-template-columns: 10px auto 1fr; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--sep); }
.legend li:last-child { border-bottom: 0; }
.legend li i { width: 10px; height: 10px; border-radius: 50%; }
.legend .k { font-size: 15px; font-weight: 600; color: var(--text); }
.legend .v { font-size: 17px; text-align: right; white-space: nowrap; }
.legend .v small { font-size: 13px; }
.tag:empty { display: none; }

/* Dışarı sohbeti */
.chat { display: grid; gap: 10px; }
.chat-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chat-h b { font-size: 18px; }
.chat-st { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; text-align: right; }
.chat-st i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.chat-st i.on { background: #34c759; }
.out-plan { display: grid; gap: 2px; background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 14px; padding: 10px 12px; }
.out-plan span { font-size: 12px; color: var(--accent); font-weight: 700; }
.chat-msgs { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.msg { max-width: 86%; padding: 9px 13px; border-radius: 18px; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.msg.ai { align-self: flex-start; background: var(--card2); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.msg.typing { color: var(--muted); font-size: 13px; display: flex; gap: 4px; align-items: center; }
.msg.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.msg.typing span:nth-child(2) { animation-delay: .2s; } .msg.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-q { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.chat-q .chip { flex: none; }
.chat-in { display: flex; gap: 8px; }
.chat-in input { flex: 1; min-width: 0; border-radius: 22px; }
.chat-in button { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); display: grid; place-items: center; }
.chat-in svg { width: 20px; height: 20px; fill: #fff; }
/* Tarif */
.puf { background: color-mix(in srgb, var(--orange) 14%, transparent); border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.pill.duo { background: color-mix(in srgb, var(--move) 16%, transparent); color: var(--move); }
button.lc { width: 100%; border: 0; text-align: left; font: inherit; cursor: pointer; }
button.lc.on { outline: 2px solid var(--accent); }

/* ♥ ve döngü */
.top-r { display: flex; align-items: center; gap: 10px; }
.heart { border: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--fill); color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.heart.on { background: color-mix(in srgb, var(--move) 16%, transparent); color: var(--move); }
.pv-heart { display: grid; gap: 2px; margin: 4px 0 12px; } .pv-heart b { font-size: 22px; } .pv-heart small { color: var(--muted); }
.pv-h { margin-top: 26px; }
.cycle-card { display: grid; gap: 4px; border-left: 4px solid var(--sleep); background: var(--card2); border-radius: 14px; padding: 12px 14px; margin: 8px 0; }
.cycle-card[data-ph="adet"] { border-left-color: var(--move); }
.cycle-card[data-ph="pms"], .cycle-card[data-ph="gecikme"] { border-left-color: var(--orange); }
.cycle-card[data-ph="folikuler"], .cycle-card[data-ph="yumurtlama"] { border-left-color: var(--protein); }
.cy-k { font-size: 13px; color: var(--muted); }
.cycle-card b { font-size: 16px; } .cycle-card p { margin: 0; font-size: 14px; color: var(--muted); }
.pv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.pv-grid > div { background: var(--card2); border-radius: 14px; padding: 10px 12px; display: grid; gap: 2px; }
.pv-grid small { font-size: 12px; color: var(--muted); } .pv-grid b { font-size: 15px; }
.pv-in { display: flex; gap: 8px; margin: 10px 0; } .pv-in input { flex: 1; min-width: 0; } .pv-in .big-btn { flex: none; padding-inline: 16px; }
.pv-list { margin-top: 6px; } .pv-list small { color: var(--muted); }
.pv-note { font-size: 13px; margin-top: 14px; }
@media (max-width: 420px) { .pv-grid { grid-template-columns: 1fr; } }

/* Claude'un planı (hub'ın üstünde, tam genişlik) */
.plan-card { margin-top: 14px; display: grid; gap: 10px; }
.plan-h h2 { margin: 2px 0 0; font-size: 19px; }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan-list li { position: relative; padding-left: 16px; font-size: 15px; line-height: 1.45; }
.plan-list li::before { content: ''; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.plan-list li b { font-weight: 650; }
.plan-more { justify-self: start; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; padding: 2px 0; cursor: pointer; }
@media (min-width: 900px) { .plan-list { grid-template-columns: 1fr 1fr; column-gap: 28px; } }
