/* Kenan tasarım sistemi. Kaynak: docs/superpowers/specs/2026-11-07-kenan-sayfasi-sade-design.md §5.1 (Cosmos sadeliği).
   Yalnız PERSON=kenan bu dosyayı alır (server.js index yeniden yazımı); Sally style.css ile sürer, Esther ayrı uygulamadır.
   Beyaz zemin, siyah yazı, düz karolar, gölge ve animasyon yok, yalnız açık tema. Bileşenlerde ham hex yok (test/kos.test.mjs). */

/* Marka yazısı ("Bilgic" logosu): FamilyBilgic'in serifi, kendi sunucudan (CSP default-src 'self'; lisans fonts/OFL.txt). */
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("/fonts/PlayfairDisplay-latin.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F2F2F2; --border: #E6E6E6;
  --text: #111111; --text-2: #6F6F6F; --muted: #6F6F6F;
  --accent: #111111; --accent-fill: #111111; --accent-bg: #F2F2F2; --on-accent: #FFFFFF;
  --blue: #0A2BFF; /* tek vurgu: okunmamış sayısı, yeni rozeti */
  --good: #15803D; --good-fill: #16A34A; --good-bg: #EAF7F0;
  --warn: #B45309; --warn-fill: #F59E0B; --warn-bg: #FDF3E2;
  --crit: #B91C1C; --crit-fill: #DC2626; --crit-bg: #FBE7E5;
  --series: #111111; --series-bg: #F2F2F2; --grid: #E6E6E6;
  --shadow: none; --shadow-lg: none;
  --scrim: rgba(17, 17, 17, .45);
  /* Ana ekran karoları: düz koyu renk, beyaz yazı (kontrast ≥ 4,5; kos.test denetler). */
  --tile-cal: #1F2A44; --tile-eko: #A4592B; --tile-halsa: #2C7A73; --tile-sv: #4A1F2E; --tile-tra: #2B2B2B; --tile-mat: #B5381F; --tile-rad: #7A7466; --tile-esther: #9A5F66;
  /* Bölüm renkleri: menü ikonları ve iş satırları (yol bulma); metin değil, dolgu/ikon. */
  --c-home: #7A7466; --c-today: #1F2A44; --c-workout: #2B2B2B; --c-food: #B5381F; --c-body: #2C7A73;
  --c-chat: #111111; --c-sv: #4A1F2E; --c-cal: #1F2A44; --c-inv: #A4592B; --c-mem: #7A7466;
  /* Grafik ve ölçü çubuklarının paleti. */
  --g-gold: #A4592B; --g-sun: #B5381F; --g-cyan: #2C7A73; --g-coral: #9A5F66; --g-blue: #1F2A44; --g-ink: #111111; --g-grey: #C9C5BC;
  --stage-1: #FFFFFF; --stage-2: #F2F2F2; --stage-3: #F2F2F2; --stage-ink: #111111; --stage-ink-2: #6F6F6F; --stage-line: #E6E6E6; --stage-chip: rgba(255, 255, 255, .9);
  --font-num: system-ui, -apple-system, sans-serif;
  --font-brand: "Playfair Display", Georgia, serif;
}

/* == bileşenler == */

/* ---------- Temel ---------- */
* { box-sizing: border-box; }
/* hidden her zaman gizler: display veren bileşen kuralları bunu ezmesin. */
[hidden] { display: none !important; }
/* Çatının yüzen düğmesi ev düğmesiyle aynı köşeye biner; Kenan'da aile ekranına "Bilgic" logosu götürür. */
#fb-home { display: none !important; }
/* Animasyon yok: ekran ve durum değişimleri anlıktır. Tek istisna bekleme göstergesi. */
*:not(.spin), *:not(.spin)::before, *:not(.spin)::after { animation: none !important; transition: none !important; }
.brand { font: 500 24px/1.2 var(--font-brand); letter-spacing: -.01em; color: var(--text); text-decoration: none; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
html, body { max-width: 100%; overflow-x: clip; }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: 22px; font-weight: 500; letter-spacing: -.01em; line-height: 1.2; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { padding: 48px 16px; color: var(--muted); text-align: center; }
.muted { color: var(--muted); } .sec { color: var(--text-2); } .small { font-size: 13.5px; }
.row { display: flex; align-items: center; gap: 10px; } .row.between { justify-content: space-between; } .row.wrap { flex-wrap: wrap; }
.row > .row { flex: none; } /* iç içe düğme grubu (60/90 sek) daralmaz; metin bloğu sarar */
.stack { display: grid; gap: 10px; }
.grid2 > *, .grid3 > *, .grid4 > *, .tiles > *, .estnums > *, .setrow > *, .row > *, .stack > *, .chips > *, .list > *  { min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.scroll { overflow-x: auto; }
.up { color: var(--good); font-weight: 700; } .down { color: var(--crit); font-weight: 700; }
.err { color: var(--crit); font-size: 14.5px; }

/* ---------- Kabuk, başlık ---------- */
.shell { max-width: 720px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 12px) 16px calc(env(safe-area-inset-bottom) + 84px); }
.back { flex: none; width: 44px; height: 44px; min-height: 44px; margin-left: -12px; padding: 0; border: 0; background: transparent; font-size: 30px; font-weight: 400; line-height: 1; color: var(--text); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.top > div:first-of-type { min-width: 0; flex: 1 1 auto; }
.row.between > .back + div { flex: 1 1 auto; min-width: 0; }
.top .sub { color: var(--text-2); font-size: 14px; margin-top: 2px; }
.datenav { flex: none; display: flex; align-items: center; gap: 4px; }
.datenav button { min-height: 44px; border-radius: 12px; padding: 0 10px; white-space: nowrap; }
.datenav button.icon { width: 44px; padding: 0; font-size: 20px; }

/* ---------- Karo (card) ---------- */
.card { min-width: 0; overflow-wrap: anywhere; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card h2 { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.card h3 { font-size: 17px; font-weight: 650; line-height: 1.3; }
.card.wdate { display: grid; gap: 8px; }
.card.now { border: 0; border-left: 4px solid var(--accent-fill); background: var(--accent-bg); }
.card.now.ok { border-left-color: var(--good-fill); background: var(--good-bg); }
.card.now h3 { font-size: 20px; }
.card.now .sec { color: var(--text-2); }
.card.now .primary { flex: none; min-height: 48px; padding: 0 20px; font-size: 16px; }
.now-tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.card.now.ok .now-tag { color: var(--good); }
.coachblock { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

/* ---------- Düğmeler ---------- */
button { border: 1px solid var(--border); background: var(--surface-2); border-radius: 14px; padding: 0 16px; min-height: 44px; cursor: pointer; font-weight: 600; white-space: nowrap; transition: transform .12s ease, background .2s ease, border-color .2s ease; }
button:active { transform: scale(.97); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); border-radius: 999px; }
button.ghost { background: transparent; border-color: transparent; }
button.danger { color: var(--crit); }
button.block { width: 100%; white-space: normal; line-height: 1.3; padding: 10px 16px; }
button:disabled { opacity: .5; cursor: default; }
button.icon { width: 44px; padding: 0; }
button.small { min-height: 34px; font-size: 13.5px; padding: 0 12px; }
@media (hover: hover) { button:hover { filter: brightness(.97); } button.primary:hover { filter: brightness(1.06); } }
input:focus-visible, button:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Form alanları ---------- */
input, select, textarea { width: 100%; min-width: 0; max-width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); padding: 8px 12px; font-size: 16px; }
input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; display: block; text-align: left; padding: 8px 10px; }
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: left; }
textarea { min-height: 72px; resize: vertical; }
input[type="checkbox"] { width: 24px; min-height: 24px; height: 24px; accent-color: var(--accent); }
input[type="radio"] { width: 22px; min-width: 22px; min-height: 22px; height: 22px; padding: 0; margin: 0; flex: none; accent-color: var(--accent); }
input[type="range"] { padding: 0; min-height: 32px; accent-color: var(--accent); border: 0; background: transparent; }
label { display: grid; gap: 4px; font-size: 13.5px; color: var(--text-2); }
label .lv { display: flex; justify-content: space-between; }
label.check { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--text); min-height: 44px; }
input.need, .setrow input.need { border-color: var(--warn-fill); background: var(--warn-bg); }
input.mtime { width: 92px; flex: none; padding: 0 6px; text-align: center; font-variant-numeric: tabular-nums; }
.when { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-bottom: 12px; }
.unit { position: relative; }
.unit input { padding-right: 56px; }
.unit[data-u="kg"] input, .unit[data-u="sn"] input, .unit[data-u="s"] input, .unit[data-u="sek"] input, .unit[data-u="m"] input { padding-right: 36px; }
.unit[data-u="sol"] input, .unit[data-u="sağ"] input, .unit[data-u="left"] input, .unit[data-u="right"] input { padding-right: 40px; }
.unit[data-u="vänster"] input, .unit[data-u="höger"] input { padding-right: 62px; }
.unit::after { content: attr(data-u); position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12.5px; pointer-events: none; }
.hrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 64px; gap: 6px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.hrow input { padding: 0 8px; min-width: 0; }
.hrow [data-h="asset"] { grid-column: 1 / 3; font-weight: 600; }
.hrow .icon { width: 100%; grid-column: 3; grid-row: 1; }
.hrow [data-h="currency"] { text-align: center; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 4px; margin-bottom: 12px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 30; box-shadow: var(--shadow); }
.seg button { border: 0; background: transparent; min-height: 40px; border-radius: 10px; font-size: 14.5px; padding: 0 4px; color: var(--text-2); }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow); color: var(--accent); }
.fseg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.fseg button { border: 0; background: transparent; min-height: 34px; padding: 0 10px; border-radius: 9px; font-size: 13px; color: var(--text-2); }
.fseg button[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); font-weight: 700; }

/* ---------- Küçük ögeler: çip, etiket, hap, rozet, şerit, ölçü ---------- */
.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.chip { min-height: 44px; border-radius: 999px; padding: 0 8px; background: var(--surface-2); font-size: 14.5px; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-left: 6px; vertical-align: middle; opacity: .7; }
.chip.side { margin-top: 8px; padding: 0 14px; min-height: 36px; font-size: 13.5px; }
.tag { flex: none; font-size: 11.5px; font-weight: 650; border-radius: 6px; padding: 1px 6px; }
.tag.good { background: var(--good-bg); color: var(--good); } .tag.bad { background: var(--crit-bg); color: var(--crit); } .tag.neutral { background: var(--surface-2); color: var(--text-2); }
.pill { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); vertical-align: 1px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; font-size: 13px; color: var(--muted); background: var(--surface-2); }
.badge b { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 999px; white-space: nowrap; font-size: 11.5px; background: var(--border); color: var(--muted); }
.badge.on { color: var(--text); background: var(--accent-bg); }
.badge.on b { background: var(--accent); color: var(--on-accent); }
.banner { border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-weight: 600; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border); }
.banner.good { background: var(--good-bg); border-color: transparent; border-left-color: var(--good-fill); color: var(--good); }
.banner.warn { background: var(--warn-bg); border-color: transparent; border-left-color: var(--warn-fill); color: var(--warn); }
.banner.crit { background: var(--crit-bg); border-color: transparent; border-left-color: var(--crit-fill); color: var(--crit); }
.banner small { display: block; font-weight: 400; color: var(--text-2); margin-top: 2px; }
.meter { height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; position: relative; }
.meter > i { display: block; height: 100%; background: var(--accent-fill); border-radius: 6px; }
.meter > b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--text-2); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 3px 0 6px; vertical-align: -1px; }
.dot.gold { background: var(--g-gold); } .dot.blue { background: var(--g-blue); } .dot.coral { background: var(--g-coral); } .dot.grey { background: var(--g-grey); }
.spin { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: sp .8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- Karocuklar (tiles) ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--surface-2); border-radius: 14px; padding: 12px; min-width: 0; }
.tile .k { font-size: 12.5px; color: var(--text-2); }
.tile .v { overflow-wrap: normal; white-space: normal; font: 700 22px/1.15 var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-top: 2px; }
.tile .v small { font-size: 12px; font-weight: 600; color: var(--muted); font-family: system-ui, sans-serif; }
.tile .d { font-size: 12.5px; color: var(--muted); }

/* ---------- Listeler, satırlar, katlamalar ---------- */
.list { display: grid; gap: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.item:first-child { border-top: 0; }
.item .grow { flex: 1; min-width: 0; }
.item .name { overflow-wrap: anywhere; }
.item .nums { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 13.5px; overflow-wrap: anywhere; }
.item .ok, .setrow .ok { width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 50%; border: 1.5px solid var(--border); background: transparent; color: var(--muted); font-weight: 700; flex: none; }
.item .ok[aria-pressed="true"], .setrow .ok[aria-pressed="true"] { border-color: var(--good-fill); background: var(--good-bg); color: var(--good); }
.item.done .name { text-decoration: line-through; color: var(--muted); }
.evdate { width: 44px; flex: none; text-align: center; font-size: 12px; color: var(--text-2); text-transform: uppercase; line-height: 1.15; }
.evdate b { display: block; font-size: 20px; color: var(--text); text-transform: none; font-family: var(--font-num); }
.evday + .evday { margin-top: 14px; }
.evday h3 { font-size: 15px; margin-bottom: 2px; }
details { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 8px; }
details summary { cursor: pointer; color: var(--text-2); font-size: 14px; min-height: 32px; display: flex; align-items: center; }
details p, details li { font-size: 14.5px; color: var(--text-2); }
details ul { margin: 6px 0 0; padding-left: 20px; }
details.plain { border: 0; margin: 0; padding: 0; }
details.more > summary { cursor: pointer; color: var(--accent); font-size: 14.5px; min-height: 32px; }
details.fold { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 16px; margin: 0 0 12px; box-shadow: var(--shadow); }
details.fold > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; cursor: pointer; list-style: none; color: var(--text); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "›"; font-size: 20px; color: var(--muted); transition: transform .2s ease; }
details.fold[open] > summary::after { transform: rotate(90deg); }
details.fold > summary b { font-size: 16px; font-weight: 600; flex: none; }
details.fold > summary .muted { flex: 1; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.fold[open] { padding-bottom: 14px; }
details.fold .card { border: 0; padding: 8px 0 0; margin: 0; background: transparent; box-shadow: none; }
details.fold.rest > summary { min-height: 56px; }
/* Gå / iş satırı bir katlamaya kaydırınca başlık sabit Menü düğmesinin altında kalmasın. */
details.fold, .card { scroll-margin-top: calc(env(safe-area-inset-top) + 64px); }
.gfold { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.gfold summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; cursor: pointer; color: var(--text); }
.ffold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 36px; color: var(--text); }
.ffold > summary::-webkit-details-marker { display: none; }
.ffold > summary::after { content: "›"; font-size: 22px; color: var(--muted); transition: transform .2s; }
.ffold[open] > summary::after { transform: rotate(90deg); }
.fclosed summary { cursor: pointer; padding: 8px 0; }

/* ---------- İş satırları ---------- */
.todo-list { display: grid; gap: 6px; margin-top: 4px; }
.todo-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 24px; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 10px; border: 1px solid transparent; border-radius: 14px; background: var(--surface-2); text-align: left; cursor: pointer; color: var(--text); font: inherit; transition: transform .12s ease, background .2s ease; }
.todo-row:active { transform: scale(.99); }
.todo-row .ti { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--accent); }
.todo-row .ti svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.todo-row[data-todo="workout"] .ti { color: var(--c-workout); } .todo-row[data-todo="food"] .ti { color: var(--c-food); }
.todo-row[data-todo="sv"] .ti { color: var(--c-sv); } .todo-row[data-todo="posture"] .ti { color: var(--c-body); } .todo-row[data-todo="scores"] .ti { color: var(--c-mem); }
.todo-row .tt { display: grid; gap: 2px; min-width: 0; }
.todo-row .tt b { font-size: 16px; font-weight: 600; }
.todo-row .tm { font-size: 13.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-row .tbar { display: block; height: 4px; border-radius: 4px; background: var(--surface); overflow: hidden; margin-top: 4px; }
.todo-row .tbar i { display: block; height: 100%; background: var(--accent-fill); border-radius: 4px; }
.todo-row .ts { font-size: 20px; color: var(--text-2); text-align: center; }
.todo-row.done { background: var(--good-bg); }
.todo-row.done .ti { background: transparent; color: var(--good); }
.todo-row.done .ts { color: var(--good); font-weight: 700; }
.todo-row.done .tt b { color: var(--text-2); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-2) 50%, transparent); }
.todo-row.ev { grid-template-columns: 36px minmax(0, 1fr); cursor: default; }
.todo-row.ev:active { transform: none; }
.todo-row .tcheck { width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); color: transparent; font-weight: 800; font-size: 17px; }
.todo-row .tcheck[aria-pressed="true"] { border-color: var(--good-fill); background: var(--good-fill); color: var(--surface); }
.todo-sub { margin: 14px 2px 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--crit); }
.todo { --g-gold: var(--accent-fill); }

/* ---------- Antrenman ---------- */
.ex { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.ex:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.ex .target { color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ex .last { font-size: 13.5px; color: var(--text-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.ex .hint { font-size: 13.5px; color: var(--good); margin-top: 2px; font-weight: 600; }
.ex [data-all] { margin-top: 8px; }
.hint.coach { color: var(--accent); }
.sets { display: grid; gap: 8px; margin-top: 10px; }
.setrow { display: grid; grid-template-columns: 22px minmax(0, 1fr) 12px minmax(0, 1fr) 36px; align-items: center; gap: 8px; }
.setrow.nokg { grid-template-columns: 22px minmax(0, 1fr) 36px; }
.setrow.split .n, .setrow.split .ok { grid-row: span 2; }
.setrow .n { color: var(--muted); font-size: 13.5px; text-align: center; }
.setrow input { text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.setrow .x { color: var(--muted); text-align: center; }
.setrow input.sug { color: var(--muted); font-weight: 500; border-style: dashed; }
#timer { position: fixed; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 88px); z-index: 20; background: var(--accent); color: var(--on-accent); border-radius: 24px; padding: 10px 16px; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: var(--shadow-lg); cursor: pointer; }

/* ---------- Yemek, fotoğraflar ---------- */
.thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); }
.preview { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photos figure { margin: 0; position: relative; }
.photos img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; display: block; }
.photos figcaption { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.thumbs .th { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .icon { position: absolute; top: 4px; right: 4px; width: 28px; min-height: 28px; height: 28px; border-radius: 50%; font-size: 13px; background: color-mix(in srgb, var(--surface) 85%, transparent); }
.thumbs:empty { display: none; }
.est { display: grid; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.est:last-child { border-bottom: 0; padding-bottom: 0; }
.estnums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 44px; gap: 8px; align-items: end; }
.estnums input { text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- Tablo, grafik ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 600; color: var(--text-2); font-size: 12.5px; padding: 6px 4px; border-bottom: 1px solid var(--border); }
td { padding: 8px 4px; border-bottom: 1px solid var(--border); }
td.r, th.r { text-align: right; }
.ftable { width: 100%; margin-top: 6px; font-size: 14px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart .tip { position: absolute; pointer-events: none; background: var(--text); color: var(--bg); border-radius: 8px; padding: 4px 8px; font-size: 12.5px; white-space: nowrap; transform: translate(-50%, -130%); font-variant-numeric: tabular-nums; }
.chart text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .axis { stroke: var(--grid); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--series); stroke: var(--surface); stroke-width: 2; }
.chart .band { fill: var(--text-2); opacity: .12; }
.chart .bar { fill: var(--series); }
.chart .cross { stroke: var(--muted); stroke-width: 1; }
.chart .target { stroke: var(--text-2); stroke-width: 1; }
.insight h3 { font-size: 18px; line-height: 1.3; }
.insight .finding { padding: 10px 0; border-top: 1px solid var(--border); }
.insight .finding strong { display: flex; align-items: center; gap: 8px; }
.insight .finding p { color: var(--text-2); font-size: 14.5px; margin-top: 2px; }
.insight ol { margin: 6px 0 0; padding-left: 22px; }
.insight ol li { margin-top: 6px; }
.radar .rsec { border-top: 1px solid var(--border); padding: 10px 0 2px; margin-top: 8px; }
.radar .rsec summary { font-weight: 600; cursor: pointer; color: var(--text); }
.radar .rsec p { margin-top: 6px; line-height: 1.5; }
.coach .cfocus { border-top: 1px solid var(--border); padding: 8px 0 2px; }
.coach .cfocus summary { cursor: pointer; line-height: 1.4; }
.coach .cfocus p { margin-top: 4px; line-height: 1.45; }

/* ---------- Sohbet (Burnaks) ---------- */
.thr { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 10px; padding: 2px 0 4px; scrollbar-width: none; }
.thr::-webkit-scrollbar { display: none; }
.thr button { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 14px; background: var(--surface); }
.thr button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chatlog { display: grid; gap: 8px; margin-top: 12px; }
.msg { max-width: 86%; padding: 10px 12px; border-radius: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.msg span { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.msg.user { justify-self: end; background: var(--accent-bg); color: var(--text); border-bottom-right-radius: 6px; }
.msg.assistant { justify-self: start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; box-shadow: var(--shadow); }
.msg.typing { color: var(--muted); }
.msg ul { margin: 4px 0; padding-left: 18px; } .msg li { margin: 2px 0; }
.msg .acts { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--good); font-weight: 600; display: grid; gap: 2px; }
.msg .rtag { display: inline-block; margin: 0 0 6px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; background: var(--surface-2); color: var(--text-2); }
.msg .rt-dietitian { background: var(--good-bg); color: var(--good); } .msg .rt-coach { background: var(--series-bg); color: var(--series); }
.msg .rt-finance { background: var(--warn-bg); color: var(--warn); } .msg .rt-teacher { background: color-mix(in srgb, var(--c-mem) 14%, var(--surface)); color: var(--c-mem); }
.mimgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 4px; margin: -2px -4px 8px; }
.mimgs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.chatbox { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-top: 12px; }
.chatbox textarea { min-height: 48px; max-height: 160px; resize: vertical; }
.chatbox input { min-height: 44px; }
.chatbox.att { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 6px; }
[data-attach] svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qchips { display: flex; flex-wrap: wrap; gap: 8px; margin: -2px 0 10px; }
.qchips button { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--accent); background: transparent; color: var(--accent); font-weight: 600; font-size: 14px; }
.qchips button:active { background: var(--accent); color: var(--on-accent); }

/* ---------- Svenska: yalnız test ---------- */
.svlevel { display: flex; align-items: baseline; gap: 8px; }
.svlevel b { font-size: 34px; font-weight: 500; line-height: 1; }
.svbar { height: 3px; margin: 10px 0; border-radius: 2px; background: var(--border); overflow: hidden; }
.svbar i { display: block; height: 100%; background: var(--text); }
.svozet { margin: 10px 0; }
.svstart { margin: 12px 0 4px; min-height: 48px; }
.svrow { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.svrow span:last-child { flex: none; }
.svtest { display: grid; gap: 12px; }
.svsoru { font-size: 18px; line-height: 1.4; }
.svopts, .svform { display: grid; gap: 8px; }
.svfb { display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.svfb b { font-weight: 500; }
.svfb.ok > b:first-child { color: var(--good); }
.svfb.bad > b:first-child { color: var(--crit); }
.svfb .row { margin-top: 4px; }
.svfb .grow { flex: 1; }

/* ---------- Kropp: 3D sahne, hedef çubukları, seviye ---------- */
.game { --stage-bg: radial-gradient(120% 90% at 50% 15%, var(--stage-1) 0%, var(--stage-2) 45%, var(--stage-3) 100%); }
.stage3d { position: relative; height: 340px; margin-top: 12px; border-radius: 14px; overflow: hidden; background: radial-gradient(120% 90% at 50% 15%, var(--stage-1) 0%, var(--stage-2) 45%, var(--stage-3) 100%); touch-action: pan-y; color: var(--stage-ink); }
.stage3d canvas { position: absolute; inset: 0; }
.stage3d.flat { height: auto; min-height: 0; background: none; color: var(--text); }
.stage3d.flat .legend3d, .stage3d.flat .stage-chips { display: none; }
.stage3d.flat .hud { position: static; padding: 4px 0; }
.hud { position: absolute; left: 14px; top: 12px; display: grid; line-height: 1; pointer-events: none; z-index: 1; }
.hud b { font: 800 46px/1 var(--font-num); letter-spacing: -.02em; color: var(--accent-fill); font-variant-numeric: tabular-nums; }
.hud span { font-size: 13px; font-weight: 600; color: var(--stage-ink-2); margin-top: 4px; }
.stage3d.flat .hud span { color: var(--text-2); }
.legend3d { position: absolute; right: 12px; top: 12px; display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--stage-ink-2); z-index: 1; pointer-events: none; }
.legend3d span { display: flex; align-items: center; gap: 6px; }
.legend3d i { width: 12px; height: 12px; border-radius: 4px; }
.legend3d i.now { background: var(--g-cyan); }
.legend3d i.goal { border: 2px dashed var(--g-gold); }
.stage-chips { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; gap: 6px; justify-content: center; z-index: 1; }
.stage-chips button { min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--stage-line); background: var(--stage-chip); color: var(--stage-ink); font-weight: 600; }
.stage-chips button[aria-pressed="true"] { background: var(--stage-ink); color: var(--stage-1); border-color: var(--stage-ink); }
.gms { display: grid; gap: 12px; margin-top: 14px; }
.gm b { font-size: 15px; }
.gm-r { font-size: 13.5px; font-weight: 600; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.gm-s { display: block; font-size: 13px; color: var(--text-2); margin-top: 4px; }
.gbar { height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.gbar i { display: block; height: 100%; border-radius: 6px; background: var(--g-cyan); transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.gbar.fat_pct i { background: var(--g-gold); }
.gbar.chin i { background: var(--g-blue); }
.gbar.waist i { background: var(--g-coral); }
.lvl { flex: none; font-size: 13px; font-weight: 700; color: var(--on-accent); background: var(--accent); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.xpbar { height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.xpbar i { display: block; height: 100%; border-radius: 6px; background: var(--accent-fill); }
.xp-line { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--accent); }

/* ---------- Ekonomi ---------- */
.fhero .fk { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fhero .fnet { font: 700 clamp(32px, 9vw, 44px)/1.1 var(--font-num); letter-spacing: -.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.flive { color: var(--good); font-weight: 600; white-space: nowrap; }
.fbar { display: flex; height: 8px; border-radius: 6px; overflow: hidden; background: var(--surface-2); margin-top: 12px; gap: 2px; }
.fbar i { display: block; height: 100%; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.fbar.debt { height: 6px; margin-top: 4px; background: transparent; }
.fbar.debt i { background: var(--crit-fill); border-radius: 6px; opacity: .8; }
.ftiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
@media (min-width: 720px) { .ftiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ftile { position: relative; display: grid; gap: 2px; text-align: left; padding: 12px 12px 34px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; overflow: hidden; min-height: 108px; min-width: 0; transition: transform .15s, border-color .2s, box-shadow .2s; }
.ftile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.ftile:active { transform: scale(.98); }
.ftile.on { border-color: var(--c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 35%, transparent); }
.ftile .fk { font-size: 12px; font-weight: 600; color: var(--text-2); overflow-wrap: anywhere; }
.ftile .fv { font: 700 clamp(16px, 4.6vw, 20px)/1.2 var(--font-num); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ftile .fd { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.ftile .spark { position: absolute; left: 8px; right: 8px; bottom: 6px; width: calc(100% - 16px); height: 24px; opacity: .9; }
.fpanel { border-top: 4px solid var(--c); }
.fitem { padding: 12px 0; border-top: 1px solid var(--border); }
.fitem:first-of-type { margin-top: 8px; }
.famt { font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; font-family: var(--font-num); }
.fbtns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fbtns button { min-height: 36px; }
.fadj { margin-top: 10px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.fflow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 10px; }
.fflow > div { display: grid; gap: 2px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.fflow span { font-size: 12px; color: var(--muted); font-weight: 600; }
.fflow b { font-size: clamp(14px, 4vw, 18px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; font-family: var(--font-num); }
.fmvs { display: grid; gap: 2px; }
.fmv { display: flex; align-items: center; gap: 10px; padding: 8px 0 8px 10px; border-left: 3px solid var(--c); }
.fmv b:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fmv.neutral b:last-child { color: var(--text-2); font-weight: 600; }
.fchg { display: grid; gap: 8px; margin-top: 8px; }
.fchgrow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; }
.fchgrow span { color: var(--text-2); font-weight: 600; border-left: 3px solid var(--c); padding-left: 8px; }
.fchgrow em, .fchgtot em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 12px; }
.fchgrow i { display: block; height: 8px; border-radius: 4px; width: var(--w); min-width: 3px; background: var(--c); opacity: .75; }
.fchgrow b { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 14px; }
.fchgtot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-weight: 700; }
.fsub { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px; }
.fsum { margin-top: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.fsumchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fsumchips button { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 600; }
.fsumchips button[aria-pressed="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--text); }
.fsumchips button[aria-pressed="true"]::before { content: "✓ "; color: var(--c); }
.fsumtot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; }
.fsumtot span { font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.fsumtot b { font: 700 clamp(20px, 6vw, 26px)/1.2 var(--font-num); font-variant-numeric: tabular-nums; }
.fopps .opps { display: grid; gap: 2px; margin-top: 6px; }
.opp { border-top: 1px solid var(--border); }
.opp > summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; color: var(--text); }
.opp > summary::-webkit-details-marker { display: none; }
.opp > summary .grow { display: grid; gap: 2px; min-width: 0; }
.opp > summary b { font-size: 15px; overflow-wrap: anywhere; }
.opp .oc { flex: none; font-size: 16px; line-height: 1.3; }
.opp p { font-size: 14px; color: var(--text-2); margin: 0 0 8px 26px; overflow-wrap: anywhere; }

/* ---------- Bildirim, hedef formu ---------- */
#toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 96px); transform: translate(-50%, 10px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 14px; font-size: 14.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s cubic-bezier(.2, 1, .4, 1); z-index: 30; max-width: calc(100vw - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.gsheet { position: fixed; inset: 0; z-index: 80; display: grid; align-items: end; justify-items: center; }
.gsheet-bg { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .2s; }
.gsheet-in { position: relative; width: min(480px, 100%); margin: 0; border-radius: 14px 20px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateY(16px); opacity: 0; transition: transform .22s, opacity .22s; max-height: 90vh; overflow: auto; }
.gsheet.open .gsheet-bg { opacity: 1; }
.gsheet.open .gsheet-in { transform: none; opacity: 1; }
@media (min-width: 700px) { .gsheet { align-items: center; } .gsheet-in { border-radius: 14px; } }

/* ---------- Giriş ---------- */
.auth { max-width: 380px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 96px) 20px 40px; }
.auth h1 { font-size: 34px; font-weight: 500; line-height: 1.15; margin-bottom: 6px; }
.auth form { display: grid; gap: 12px; margin-top: 24px; }

/* ---------- Idag ---------- */
.ktop { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.sum, .yday { border-top: 1.5px solid var(--text); border-bottom: 1.5px solid var(--text); }
.sum { padding: 10px 0 8px; }
.sum h2 { font-size: 16px; font-weight: 500; margin-bottom: 2px; }
.sumprio, .sumrow { display: flex; justify-content: space-between; gap: 12px; width: 100%; min-height: 34px; padding: 4px 0; border: 0; border-radius: 0; background: none; font-size: 15px; font-weight: 400; text-align: left; white-space: normal; align-items: center; }
.sumprio { font-weight: 500; }
.sumrow span:first-child { flex: none; color: var(--muted); }
.sumrow span:last-child { min-width: 0; text-align: right; }
/* Mat idag: değerin altında ince protein çubuğu (hedefe ulaşınca yeşil). */
.sumbar { display: block; width: 120px; max-width: 100%; height: 4px; margin: 5px 0 0 auto; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.sumbar i { display: block; height: 100%; border-radius: 4px; background: var(--accent-fill); }
.sumbar.ok i { background: var(--good-fill); }
.ktiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.ktiles + .ktiles { margin-top: 8px; }
.ktile { display: grid; place-items: center; aspect-ratio: 1 / 1; min-height: 0; padding: 4px; border: 0; border-radius: 14px; color: var(--on-accent); font-size: 16px; font-weight: 500; text-align: center; text-decoration: none; white-space: normal; }
.t-cal { background: var(--tile-cal); } .t-eko { background: var(--tile-eko); } .t-halsa { background: var(--tile-halsa); } .t-sv { background: var(--tile-sv); }
.t-tra { background: var(--tile-tra); } .t-mat { background: var(--tile-mat); } .t-rad { background: var(--tile-rad); } .t-esther { background: var(--tile-esther); }
@media (min-width: 560px) { .ktile { aspect-ratio: auto; height: 120px; } }
.yday { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; margin-top: 12px; padding: 12px 0; }
.score { align-self: start; display: grid; align-content: center; justify-items: center; width: 84px; min-height: 84px; padding: 6px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 400; white-space: normal; }
.score b { font-size: 26px; font-weight: 500; line-height: 1.1; color: var(--text); }
.ylines { display: grid; gap: 2px; align-content: center; font-size: 14.5px; }
.yareas { grid-column: 1 / -1; display: grid; gap: 4px; }
.yarea { display: grid; grid-template-columns: 76px 36px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 14px; }
.yarea b { font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- Råd: düz liste, ince çizgiler ---------- */
.ksec { margin-top: 18px; }
.ksec > h2 { padding-bottom: 6px; border-bottom: 1.5px solid var(--text); font-size: 16px; font-weight: 500; }
.krow { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.krow-main, .krow-text { flex: 1; min-width: 0; display: grid; gap: 2px; font-weight: 400; text-align: left; white-space: normal; }
.krow-main { min-height: 44px; padding: 0; border: 0; border-radius: 0; background: none; }
.krow-main b, .krow-text b { font-weight: 500; }
.krow-main span, .krow-text span { font-size: 14px; color: var(--muted); }
.krow > .small { flex: none; }

/* ---------- Träning: inceleme satırı ---------- */
details.krev > summary { align-items: flex-start; min-height: 0; padding: 12px 0; }
.krev-head { flex: 1; min-width: 0; display: grid; gap: 2px; }
details.krev .krev-head b, .card .krev-head b { font-size: 15px; font-weight: 500; }
.krev-head span { font-size: 14px; color: var(--muted); }
.krev-list { font-size: 14.5px; }
.krev-loads { margin: 0 0 12px; }

/* ---------- Hälsa ---------- */
.ktrend { font-size: 13px; font-weight: 500; }
.kchart { margin-top: 8px; }

/* ---------- Alt çubuk: ev + Fråga Burnaks ---------- */
.kbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; max-width: 720px; margin: 0 auto; padding: 8px 16px calc(env(safe-area-inset-bottom) + 8px); background: var(--bg); border-top: 1px solid var(--border); }
.kbar-home { flex: none; display: grid; place-items: center; width: 44px; padding: 0; border: 0; border-radius: 999px; background: var(--surface-2); }
.kbar-home svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kbar-ask { flex: 1; min-width: 0; text-align: left; font-weight: 400; color: var(--muted); border: 0; border-radius: 999px; background: var(--surface-2); }
.kb .kbar { display: none; }
.kb .shell { padding-bottom: 12px; }

/* ---------- Burnaks yazı alanı: başlık çipleri + yazı kutusu birlikte altta yapışkan ---------- */
.shell:has(.composer) { padding-bottom: 0; }
.shell:has(.composer[hidden]) { padding-bottom: calc(env(safe-area-inset-bottom) + 16px); }
.shell:has(.composer) #view { display: flex; flex-direction: column; min-height: calc(100dvh - env(safe-area-inset-top) - 12px); }
.shell:has(.composer) .chatlog { flex: 1 0 auto; align-content: start; }
.composer { position: sticky; z-index: 12; bottom: 0; margin: 12px -16px 0; padding: 8px 16px calc(env(safe-area-inset-bottom) + 10px); background: var(--bg); border-top: 1px solid var(--border); }
.composer .thumbs { margin: 0 0 8px; }
.composer .chatbox { margin-top: 0; }
.composer textarea { min-height: 44px; resize: none; }
.composer .kbar-ask { display: block; width: 100%; }
/* Burnaks listesi ve sohbet başlığı. */
.ktop { flex-wrap: nowrap; }
.klist { flex: 1 0 auto; }
.kbadge { flex: none; font-size: 14px; font-weight: 500; color: var(--blue); }
.kebab-in .chatbox { margin-top: 0; }

/* Acil numaralar: tek satır; dokununca tam metin ve aranabilir numaralar açılır. */
.sos, .kebab { border: 0; padding: 0; } /* genel details çizgisi ve boşluğu burada yok */
.sos { margin: -4px 0 8px; font-size: 13.5px; color: var(--text-2); }
.sos > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; list-style: none; font-weight: 600; color: var(--warn); }
.sos > summary::-webkit-details-marker { display: none; }
.sos > summary::after { content: "›"; font-size: 18px; line-height: 1; transition: transform .2s; }
.sos[open] > summary::after { transform: rotate(90deg); }
.sos > p { margin: 0 0 6px; padding: 10px 12px; border-radius: 14px; background: var(--warn-bg); line-height: 1.5; }
.sos a { color: var(--warn); font-weight: 700; }
/* ⋯ menüsü: gizlilik notu ve Radera burada (yıkıcı eylem en görünür yerde durmaz). */
.kebab { position: relative; flex: none; margin: 0; }
.kebab > summary { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; cursor: pointer; list-style: none; font-size: 22px; line-height: 1; color: var(--text-2); }
.kebab > summary::-webkit-details-marker { display: none; }
.kebab[open] > summary { background: var(--surface-2); color: var(--text); }
.kebab-in { position: absolute; z-index: 15; right: 0; top: 48px; width: min(290px, 80vw); display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
/* ---------- Dar telefonlar (≤380 px) ---------- */
@media (max-width: 380px) {
  .shell { padding-left: 12px; padding-right: 12px; }
  .composer { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
  .kbar { padding-left: 12px; padding-right: 12px; }
  .card { padding: 14px 12px; }
  .tile { padding: 10px 8px; }
  .tile .v { font-size: 19px; }
  .chip { font-size: 13.5px; }
  .unit input { padding-right: 48px; }
}
