/* Mutfağımız: oyun havasında, sıcak renkli, yuvarlak hatlı ve dokunmaya uygun arayüz. Renkler :root'ta, koyu tema
   aynı değişkenlerle. CSP satır içi stile izin vermez; dinamik genişlik ve konfeti konumları JS ile (CSSOM) verilir. */
:root {
  --bg: #fff7ee;
  --surface: #ffffff;
  --surface-2: #fff0df;
  --surface-3: #ffe6cc;
  --text: #2b2118;
  --muted: #7d6b5b;
  --border: #f1dfca;
  --brand: #ff6b3d;
  --brand-dark: #db4f24;
  --brand-soft: #ffe3d6;
  --green: #22a565;
  --green-dark: #17834e;
  --green-soft: #ddf5e7;
  --yellow: #ffc23d;
  --yellow-dark: #d89c13;
  --yellow-soft: #fff1c9;
  --orange: #f08a24;
  --orange-soft: #ffe7cf;
  --danger: #e03e45;
  --danger-dark: #b52a31;
  --danger-soft: #fde3e3;
  --sky: #2f8fe6;
  --sky-soft: #dfeefd;
  --ice: #18a7c9;
  --ice-soft: #d9f4fa;
  --wood: #b9772e;
  --wood-soft: #f8e9d5;
  --purple: #8a5cf6;
  --purple-soft: #ece4ff;
  --radius: 20px;
  --nav-h: 66px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Rounded", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1411; --surface: #261e19; --surface-2: #30261f; --surface-3: #3b2f26; --text: #f7ece1; --muted: #bba795;
    --border: #3d3129; --brand: #ff7b4f; --brand-dark: #c4502c; --brand-soft: #4a2a1d;
    --green: #3cc47e; --green-dark: #1f8c55; --green-soft: #1d3a2a; --yellow: #ffcc55; --yellow-dark: #b88710; --yellow-soft: #43361a;
    --orange: #ff9d45; --orange-soft: #46301c; --danger: #ff6b70; --danger-dark: #b43a40; --danger-soft: #4a2224;
    --sky: #66adf0; --sky-soft: #1d3247; --ice: #47c4e2; --ice-soft: #173640; --wood: #e0a35c; --wood-soft: #3e2d1d;
    --purple: #a888ff; --purple-soft: #2f2650;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1a1411; --surface: #261e19; --surface-2: #30261f; --surface-3: #3b2f26; --text: #f7ece1; --muted: #bba795;
  --border: #3d3129; --brand: #ff7b4f; --brand-dark: #c4502c; --brand-soft: #4a2a1d;
  --green: #3cc47e; --green-dark: #1f8c55; --green-soft: #1d3a2a; --yellow: #ffcc55; --yellow-dark: #b88710; --yellow-soft: #43361a;
  --orange: #ff9d45; --orange-soft: #46301c; --danger: #ff6b70; --danger-dark: #b43a40; --danger-soft: #4a2224;
  --sky: #66adf0; --sky-soft: #1d3247; --ice: #47c4e2; --ice-soft: #173640; --wood: #e0a35c; --wood-soft: #3e2d1d;
  --purple: #a888ff; --purple-soft: #2f2650;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 var(--font);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--brand-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
/* iOS, 16px altındaki alanlara odaklanınca sayfayı yakınlaştırır */
input, select, textarea { font-size: 16px; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.center { text-align: center; }
.hidden, [hidden] { display: none !important; }
.spacer { flex: 1; }

/* ---------- üst çubuk ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px);
  padding-top: env(safe-area-inset-top);
}
.topbar-row { display: flex; align-items: center; gap: 10px; max-width: 980px; margin: 0 auto; padding: 8px 16px; }
.brand { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; margin: 0; font-size: 20px; font-weight: 900; color: var(--text); text-decoration: none; }
.brand-logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: var(--green-soft); font-size: 22px; box-shadow: 0 3px 0 color-mix(in srgb, var(--green) 40%, var(--green-soft)); }
.sync { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.sync.ok { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.sync.err { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.avatar-btn {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; text-decoration: none;
  background: var(--purple); color: #fff; font-weight: 900; font-size: 18px; box-shadow: 0 3px 0 color-mix(in srgb, var(--purple) 70%, #000);
}
.banner { background: var(--yellow-soft); color: var(--text); padding: 9px 16px; font-size: 14px; text-align: center; }
.banner .btn { margin-left: 8px; }

/* ---------- alt menü ---------- */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: center; gap: 2px;
  background: var(--surface); border-top: 2px solid var(--border);
  padding: 0 4px env(safe-area-inset-bottom);
}
.bottomnav a {
  flex: 1; max-width: 120px; height: var(--nav-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 700;
}
.nav-icon { position: relative; display: grid; place-items: center; width: 50px; height: 34px; border-radius: 14px; font-size: 22px; line-height: 1; transition: transform 0.15s, background 0.15s; }
.bottomnav .active { color: var(--brand-dark); }
.bottomnav .active .nav-icon { background: var(--brand-soft); transform: translateY(-2px) scale(1.06); }
.nav-badge {
  position: absolute; top: -3px; right: 2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; line-height: 15px; text-align: center; border: 2px solid var(--surface);
}

.view { max-width: 980px; margin: 0 auto; padding: 8px 16px 32px; }
.view.narrow { max-width: 680px; }
.empty { color: var(--muted); text-align: center; padding: 28px 8px; }
.empty .big { display: block; font-size: 44px; margin-bottom: 6px; }

/* ---------- iskelet ---------- */
.skeleton { display: grid; gap: 12px; padding-top: 8px; }
.sk { background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; border-radius: 18px; animation: shimmer 1.2s infinite; }
.sk-title { height: 56px; width: 70%; }
.sk-card { height: 120px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- temel parçalar ---------- */
.card {
  position: relative; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 14px; box-shadow: 0 3px 0 var(--border);
}
.section { margin: 18px 0 8px; }
.section-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 10px; }
.section-head h3 { margin: 0; font-size: 17.5px; flex: 1; }
.section-head .count { background: var(--surface-3); border-radius: 999px; padding: 1px 9px; font-size: 13px; font-weight: 800; }
.section-hint { margin: -6px 2px 10px; color: var(--muted); font-size: 13.5px; }
.page-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.page-head h2 { margin: 0; font-size: 26px; flex: 1; }
.back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 800; padding: 6px 0; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 48px; padding: 0 18px; border-radius: 16px; cursor: pointer; white-space: nowrap; text-decoration: none;
  border: 2px solid var(--border); background: var(--surface); color: var(--text); font-weight: 800; font-size: 15.5px;
  box-shadow: 0 4px 0 var(--border); transition: transform 0.06s, box-shadow 0.06s;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--border); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 0 var(--brand-dark); }
.btn.primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--brand-dark); }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-dark); }
.btn.green:active:not(:disabled) { box-shadow: 0 1px 0 var(--green-dark); }
.btn.danger { color: var(--danger); }
.btn.danger.armed { background: var(--danger); border-color: var(--danger); color: #fff; box-shadow: 0 4px 0 var(--danger-dark); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn.small { min-height: 38px; padding: 0 13px; font-size: 14px; border-radius: 13px; box-shadow: 0 3px 0 var(--border); }
.btn.small.primary { box-shadow: 0 3px 0 var(--brand-dark); }
.btn.small.green { box-shadow: 0 3px 0 var(--green-dark); }
.btn.block { width: 100%; }
.btn .e { font-size: 18px; line-height: 1; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.row-btns.stretch > .btn { flex: 1 1 0; }
.link-btn { border: 0; background: none; color: var(--brand-dark); font-weight: 800; cursor: pointer; padding: 6px 2px; font-size: 14.5px; }

.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 20px; cursor: pointer;
  border: 2px solid var(--border); background: var(--surface); font-weight: 750; font-size: 14.5px; color: var(--text); user-select: none;
}
.chip b { font-size: 12.5px; background: var(--surface-3); border-radius: 10px; padding: 0 7px; }
.chip.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.chip.on b { background: color-mix(in srgb, var(--surface) 25%, transparent); }

.seg { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface-2); }
.seg-btn {
  flex: 1; min-height: 42px; border: 0; border-radius: 12px; background: transparent; cursor: pointer;
  font-weight: 800; font-size: 14.5px; color: var(--muted); padding: 0 8px; white-space: nowrap;
}
.seg-btn.on { background: var(--surface); color: var(--text); box-shadow: 0 2px 0 var(--border); }

.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 10px 14px; border-radius: 15px; border: 2px solid var(--border); background: var(--surface);
}
.field textarea, textarea.input { min-height: 96px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); }
.field { display: grid; gap: 6px; margin-top: 12px; }
.field > span { font-size: 14px; font-weight: 800; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-error { color: var(--danger); background: var(--danger-soft); border-radius: 14px; padding: 10px 14px; margin: 10px 0 0; font-weight: 700; }

.add-bar { display: flex; gap: 8px; }
.add-bar .input { flex: 1; min-width: 0; }
.add-bar .btn { flex: none; }
.preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.preview span { display: inline-flex; gap: 5px; align-items: center; padding: 5px 10px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; font-weight: 700; }

/* ---------- tazelik (can barı) ---------- */
.hp { height: 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.hp i { display: block; height: 100%; border-radius: 6px; background: var(--green); min-width: 6px; }
.lv-izle .hp i { background: var(--yellow); }
.lv-yakin .hp i { background: var(--orange); }
.lv-bugun .hp i { background: var(--danger); }
.lv-gecti .hp { background: var(--danger-soft); }
.lv-gecti .hp i { background: var(--danger); width: 100%; opacity: 0.35; }
.fresh {
  flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 10px; font-size: 13px; font-weight: 800;
  background: var(--green-soft); color: var(--green-dark); white-space: nowrap;
}
.fresh.izle { background: var(--yellow-soft); color: var(--yellow-dark); }
.fresh.yakin { background: var(--orange-soft); color: var(--orange); }
.fresh.bugun { background: var(--danger-soft); color: var(--danger); }
.fresh.gecti { background: var(--danger); color: #fff; }
.fresh.frozen { background: var(--ice-soft); color: var(--ice); }

/* ---------- ana ekran ---------- */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 6px 2px 12px; }
.hello h2 { margin: 0; font-size: 25px; }
.hello p { margin: 2px 0 0; color: var(--muted); font-weight: 700; }

.people { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 4px; padding: 2px 16px 8px; scrollbar-width: none; }
.people::-webkit-scrollbar { display: none; }
.person {
  flex: 1 0 auto; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 6px 14px 6px 6px; border-radius: 20px; cursor: pointer;
  border: 2px solid var(--border); background: var(--surface); box-shadow: 0 3px 0 var(--border); text-align: left;
}
.person:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--border); }
.person .ava { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; background: var(--green-soft); }
.person.is .ava { background: var(--sky-soft); }
.person.yok .ava { background: var(--surface-3); }
.person b { display: block; font-size: 15.5px; }
.person small { display: block; color: var(--muted); font-weight: 700; font-size: 13px; }
.person.override small::after { content: " · bugüne özel"; color: var(--brand-dark); }
.people-note { margin: 0 2px 10px; color: var(--muted); font-size: 13.5px; font-weight: 600; }

.domi { display: grid; grid-template-columns: 58px 1fr; gap: 10px; align-items: start; margin: 4px 0 14px; }
.domi-face {
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 22px; background: var(--green-soft); font-size: 32px;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--green) 40%, var(--green-soft)); animation: bob 3.2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-4px) rotate(-3deg); } }
.bubble {
  position: relative; background: var(--surface); border: 2px solid var(--border); border-radius: 6px 22px 22px 22px; padding: 12px 14px;
  box-shadow: 0 3px 0 var(--border);
}
.bubble p { margin: 0 0 6px; }
.bubble p:last-of-type { margin-bottom: 0; }
.bubble .who { font-size: 12.5px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-dark); margin-bottom: 4px; }
.bubble .row-btns { margin-top: 10px; }
.bubble .reason { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 6px; }
.tile {
  display: grid; justify-items: center; gap: 0; padding: 10px 4px 8px; border-radius: 18px; text-decoration: none; color: var(--text);
  border: 2px solid var(--border); background: var(--surface); box-shadow: 0 3px 0 var(--border); min-width: 0;
}
.tile .e { font-size: 24px; line-height: 1.2; }
.tile b { font-size: 21px; font-weight: 900; line-height: 1.15; }
.tile small { font-size: 12px; font-weight: 750; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tile.fridge { background: var(--sky-soft); border-color: color-mix(in srgb, var(--sky) 30%, var(--border)); }
.tile.freezer { background: var(--ice-soft); border-color: color-mix(in srgb, var(--ice) 30%, var(--border)); }
.tile.pantry { background: var(--wood-soft); border-color: color-mix(in srgb, var(--wood) 30%, var(--border)); }
.tile.meals { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 30%, var(--border)); }

/* satır listesi (bozulacaklar, dolaptaki yemek, plan) */
.rows { display: grid; gap: 8px; }
.row {
  display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 18px;
  background: var(--surface); border: 2px solid var(--border); box-shadow: 0 3px 0 var(--border); color: inherit; text-decoration: none; min-width: 0;
}
button.row { width: 100%; text-align: left; cursor: pointer; font: inherit; }
button.row:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--border); }
.row .e { text-decoration: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--surface-2); font-size: 25px; }
.row-main { min-width: 0; color: inherit; text-decoration: none; }
.row-main b { display: block; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main small { display: block; color: var(--muted); font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.row-side { display: flex; align-items: center; gap: 6px; }
.row-actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions .btn { flex: 1 1 auto; }
.row.done { opacity: 0.7; }
.row.done .row-main b { text-decoration: line-through; }
.row.empty-slot { border-style: dashed; box-shadow: none; background: transparent; }
.row.empty-slot .e { background: transparent; border: 2px dashed var(--border); }
.icon-btn {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; border: 2px solid var(--border); cursor: pointer;
  background: var(--surface); font-size: 19px; box-shadow: 0 3px 0 var(--border);
}
.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--border); }

/* ---------- dolap ---------- */
.zones { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 10px; padding: 2px 16px 8px; scrollbar-width: none; }
.zones::-webkit-scrollbar { display: none; }
.zone {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 48px; padding: 0 15px; border-radius: 18px; cursor: pointer; text-decoration: none;
  border: 2px solid var(--border); background: var(--surface); color: var(--text); font-weight: 800; box-shadow: 0 3px 0 var(--border);
}
.zone .e { font-size: 20px; }
.zone b { font-size: 12.5px; background: var(--surface-3); border-radius: 10px; padding: 1px 7px; }
.zone.on.fridge { background: var(--sky); border-color: var(--sky); color: #fff; box-shadow: 0 3px 0 color-mix(in srgb, var(--sky) 70%, #000); }
.zone.on.freezer { background: var(--ice); border-color: var(--ice); color: #fff; box-shadow: 0 3px 0 color-mix(in srgb, var(--ice) 70%, #000); }
.zone.on.pantry { background: var(--wood); border-color: var(--wood); color: #fff; box-shadow: 0 3px 0 color-mix(in srgb, var(--wood) 70%, #000); }
.zone.on.meals { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 3px 0 var(--green-dark); }
.zone.on.done { background: var(--text); border-color: var(--text); color: var(--surface); box-shadow: 0 3px 0 #000; }
.zone.on b { background: rgb(255 255 255 / 25%); color: inherit; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tcard {
  position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px; border-radius: 20px; text-decoration: none; color: inherit;
  background: var(--surface); border: 2px solid var(--border); box-shadow: 0 4px 0 var(--border);
}
.tcard:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--border); }
.tcard .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.tcard .e { font-size: 34px; line-height: 1.1; }
.tcard b { font-size: 15.5px; line-height: 1.25; overflow-wrap: anywhere; }
.tcard small { color: var(--muted); font-size: 13px; font-weight: 650; }
.tcard .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 9px; font-size: 12.5px; font-weight: 800; background: var(--surface-2); color: var(--muted); }
.tag.ok { background: var(--green-soft); color: var(--green-dark); }
.tag.miss { background: var(--yellow-soft); color: var(--yellow-dark); }
.tag.save { background: var(--brand-soft); color: var(--brand-dark); }
.tag.ice { background: var(--ice-soft); color: var(--ice); }
.tag.star { background: var(--yellow-soft); color: var(--yellow-dark); }
.tag.heart { background: var(--danger-soft); color: var(--danger); }

/* ---------- ayrıntı sayfaları ---------- */
.hero { text-align: center; padding: 18px 14px 16px; }
.hero .e { font-size: 64px; line-height: 1.1; }
.hero h2 { margin: 6px 0 2px; font-size: 25px; }
.hero .sub { color: var(--muted); font-weight: 700; }
.hero .big-amount { font-size: 28px; font-weight: 900; margin-top: 8px; }
.hero .hp { max-width: 300px; margin: 10px auto 0; height: 12px; border-radius: 8px; }
.hero .when { margin-top: 8px; font-weight: 700; }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.actions .btn { min-height: 56px; white-space: normal; text-align: center; line-height: 1.15; }
.panel { margin-top: 14px; }
.panel h3 { margin: 0 0 10px; font-size: 17.5px; }
.use-row { display: flex; gap: 8px; align-items: center; }
.use-row .input { flex: 1; min-width: 0; }
.unit { font-weight: 800; color: var(--muted); }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.log li { display: flex; gap: 8px; color: var(--muted); }
.log li b { color: var(--text); font-weight: 700; }
details.more { margin-top: 14px; }
details.more > summary { list-style: none; cursor: pointer; font-weight: 800; padding: 12px 4px; color: var(--muted); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸ "; }
details.more[open] > summary::before { content: "▾ "; }

.ing { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ing li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: start; padding: 9px 11px; border-radius: 14px; background: var(--surface-2); }
.ing li .mark { font-size: 17px; line-height: 1.3; }
.ing li small { display: block; color: var(--muted); font-weight: 600; font-size: 13px; }
.ing li.temel { background: transparent; color: var(--muted); padding-top: 4px; padding-bottom: 4px; }
.ing li.miss { background: var(--yellow-soft); }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 8px; }
.steps li {
  counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 16px;
  background: var(--surface); border: 2px solid var(--border); cursor: pointer;
}
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 900;
}
.steps li.done { opacity: 0.55; }
.steps li.done::before { content: "✓"; background: var(--green); }
.tips ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.tips li { padding: 9px 12px; border-radius: 14px; background: var(--yellow-soft); line-height: 1.45; }
.nutri { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface-2); }
.stepper button { width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--surface); font-size: 22px; font-weight: 900; cursor: pointer; box-shadow: 0 2px 0 var(--border); }
.stepper output { min-width: 46px; text-align: center; font-size: 19px; font-weight: 900; }
.stars { display: inline-flex; gap: 2px; }
.stars button { border: 0; background: none; font-size: 30px; cursor: pointer; padding: 0 2px; filter: grayscale(1) opacity(0.35); }
.stars button.on { filter: none; }
.sticky-actions {
  position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); z-index: 5; display: flex; gap: 8px; margin-top: 16px;
  padding: 8px; border-radius: 22px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px);
}
.sticky-actions .btn { flex: 1; }

.check-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 2px solid var(--border); }
.check-row input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--green); }
.check-row .amt { display: flex; align-items: center; gap: 6px; }
.check-row .amt input { width: 84px; min-height: 42px; padding: 6px 8px; border-radius: 12px; border: 2px solid var(--border); background: var(--bg); text-align: right; }
.check-row.off { opacity: 0.55; }
.check-row > span:nth-child(2) { min-width: 0; }
.check-row b, .check-row small { display: block; }

/* ---------- plan ---------- */
.week-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.week-head h3 { flex: 1; text-align: center; margin: 0; font-size: 18px; }
.day { margin-bottom: 12px; }
.day.today { border-color: var(--brand); box-shadow: 0 3px 0 var(--brand-dark); }
.day-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.day-head h4 { margin: 0; font-size: 16.5px; flex: 1; }
.badge-today { background: var(--brand); color: #fff; border-radius: 9px; padding: 2px 8px; font-size: 12px; font-weight: 900; }
.mini-people { display: flex; gap: 4px; }
.mini-people button { border: 0; border-radius: 10px; padding: 3px 7px; font-size: 12.5px; font-weight: 800; cursor: pointer; background: var(--green-soft); color: var(--green-dark); }
.mini-people button.is { background: var(--sky-soft); color: var(--sky); }
.mini-people button.yok { background: var(--surface-3); color: var(--muted); }
.slot { display: grid; grid-template-columns: 84px 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 2px dashed var(--border); text-decoration: none; color: inherit; }
.slot:first-of-type { border-top: 0; }
.slot .ogun { font-size: 13px; font-weight: 800; color: var(--muted); }
.slot .what { min-width: 0; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .what.none { color: var(--muted); font-weight: 600; }
.slot.done .what { text-decoration: line-through; color: var(--muted); }

/* ---------- alışveriş ---------- */
.shop { display: grid; gap: 8px; }
.shop-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 18px; background: var(--surface); border: 2px solid var(--border); }
.tick {
  width: 40px; height: 40px; border-radius: 13px; border: 3px solid var(--border); background: var(--surface); cursor: pointer; font-size: 20px; font-weight: 900; color: #fff;
}
.shop-item.on .tick { background: var(--green); border-color: var(--green); }
.shop-item.on .name { text-decoration: line-through; color: var(--muted); }
.shop-item .name b { display: block; font-size: 15.5px; overflow-wrap: anywhere; }
.shop-item .name small { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.receipt-row { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start; padding: 10px; border-radius: 18px; background: var(--surface); border: 2px solid var(--border); }
.receipt-row.off { opacity: 0.5; }
.receipt-main { display: grid; gap: 6px; min-width: 0; }
.receipt-name { display: flex; align-items: center; gap: 6px; }
.receipt-name span { font-size: 22px; }
.receipt-name .input { min-height: 42px; padding: 6px 10px; font-weight: 750; }
.receipt-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.receipt-meta .input { min-height: 40px; padding: 4px 8px; width: 74px; flex: none; }
.receipt-meta select.input { width: 96px; }
.zone-pick { display: flex; gap: 3px; margin-left: auto; }
.zone-pick button { width: 38px; height: 38px; border-radius: 11px; border: 2px solid var(--border); background: var(--surface); font-size: 17px; cursor: pointer; opacity: 0.45; }
.zone-pick button.on { opacity: 1; border-color: var(--brand); background: var(--brand-soft); }
.tick.on { background: var(--green); border-color: var(--green); }
.ask { border-color: var(--yellow); background: var(--yellow-soft); }
.place-row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px; border-radius: 16px; background: var(--surface-2); }
.place-row b { font-size: 15px; }

/* ---------- Domi (sohbet) ---------- */
.chat-log { display: grid; gap: 10px; padding-bottom: 92px; }
.chat-empty { text-align: center; padding: 10px 4px; }
.chat-empty .domi-face { margin: 0 auto 8px; }
.chat-empty p { margin: 6px auto; max-width: 460px; }
.suggestions { display: grid; gap: 8px; margin-top: 14px; justify-items: center; }
.suggestion {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 15px; border-radius: 18px; cursor: pointer; text-align: left;
  border: 2px solid var(--border); background: var(--surface); font-weight: 750; box-shadow: 0 3px 0 var(--border);
}
.msg { max-width: 88%; padding: 10px 14px; border-radius: 20px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); border: 2px solid var(--border); }
.msg.user { justify-self: end; background: var(--brand); border-color: var(--brand); color: #fff; border-bottom-right-radius: 6px; font-weight: 600; }
.msg.assistant { justify-self: start; border-top-left-radius: 6px; }
.msg.error { background: var(--danger-soft); color: var(--danger); }
.msg-wrap { display: grid; grid-template-columns: 36px 1fr; gap: 8px; align-items: start; justify-self: start; max-width: 92%; }
.msg-wrap .mini-face { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 13px; background: var(--green-soft); font-size: 20px; }
.msg-wrap .msg { max-width: 100%; }
.typing { display: inline-flex; align-items: center; gap: 4px; }
.typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
.typing small { margin-left: 8px; color: var(--muted); font-weight: 700; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.proposal { justify-self: stretch; min-width: 0; max-width: 520px; margin-left: 44px; }
.proposal-head { font-size: 13px; font-weight: 900; color: var(--brand-dark); text-transform: uppercase; letter-spacing: 0.05em; }
.proposal ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.proposal .row-btns { margin-top: 10px; }
.proposal-status { margin: 10px 0 0; font-weight: 800; color: var(--muted); }
.proposal-status.ok { color: var(--green-dark); }
.proposal-status.err { color: var(--danger); }
.chat-form {
  position: fixed; left: 0; right: 0; z-index: 8; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  display: flex; gap: 8px; padding: 10px max(16px, calc(50vw - 324px)); background: var(--bg); border-top: 2px solid var(--border);
}
.chat-form textarea { flex: 1; min-width: 0; resize: none; min-height: 50px; max-height: 140px; padding: 12px 16px; border-radius: 24px; border: 2px solid var(--border); background: var(--surface); }
.chat-form textarea:focus { outline: none; border-color: var(--brand); }
.chat-form .btn { width: 52px; padding: 0; border-radius: 26px; font-size: 22px; }
.msg.md { white-space: normal; line-height: 1.5; }
.msg.md > :first-child { margin-top: 0; }
.msg.md > :last-child { margin-bottom: 0; }
.msg.md p { margin: 0 0 8px; }
.msg.md h3, .msg.md h4, .msg.md h5 { margin: 12px 0 6px; line-height: 1.3; }
.msg.md h3 { font-size: 17px; }
.msg.md h4 { font-size: 16px; }
.msg.md h5 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--brand-dark); }
.msg.md ul, .msg.md ol { margin: 4px 0 10px; padding-left: 20px; }
.msg.md li { margin: 3px 0; }
.msg.md strong { font-weight: 800; }
.msg.md a { font-weight: 800; text-decoration: none; color: var(--brand-dark); }
.msg.md code { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.msg.md pre { background: var(--surface-2); padding: 10px; border-radius: 10px; overflow-x: auto; }
.msg.md blockquote { margin: 6px 0 10px; padding: 2px 0 2px 12px; border-left: 3px solid var(--border); color: var(--muted); }
.msg.md hr { border: 0; border-top: 2px dashed var(--border); margin: 10px 0; }
.msg.md .md-table { overflow-x: auto; margin: 6px 0 10px; }
.msg.md table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.msg.md th, .msg.md td { text-align: left; padding: 6px 8px; border-bottom: 2px solid var(--border); white-space: nowrap; }

/* ---------- profil ---------- */
.profile { display: flex; align-items: center; gap: 14px; }
.profile .avatar-btn { width: 60px; height: 60px; font-size: 26px; cursor: default; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.week-grid button {
  display: grid; justify-items: center; gap: 1px; padding: 7px 0; border-radius: 13px; border: 2px solid var(--border); cursor: pointer;
  background: var(--green-soft); font-weight: 800; font-size: 12px; color: var(--text);
}
.week-grid button span { font-size: 19px; }
.week-grid button.is { background: var(--sky-soft); }
.week-grid button.yok { background: var(--surface-3); }
.person-week + .person-week { margin-top: 14px; }
.menu-list { padding: 4px 0; }
.menu-item { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 16px; border: 0; background: none; color: var(--text); text-decoration: none; cursor: pointer; text-align: left; font-size: 16px; font-weight: 750; }
.menu-item + .menu-item { border-top: 2px solid var(--border); }
.menu-item span { color: var(--muted); }
.menu-item.danger { color: var(--danger); }
.stack { display: grid; gap: 10px; }
.switch, .select-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; cursor: pointer; }
.switch div { display: grid; flex: 1; }
.switch small { color: var(--muted); font-size: 13px; font-weight: 600; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch > span { flex: none; width: 52px; height: 32px; border-radius: 16px; background: var(--border); position: relative; transition: background 0.15s; order: 2; }
.switch > span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 2px rgb(0 0 0 / 20%); transition: transform 0.15s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.user-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.user-list li + li { border-top: 2px solid var(--border); padding-top: 12px; }
.user-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- alttan açılan pencere (hızlı ekle) ---------- */
.sheet { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; background: rgb(20 12 6 / 45%); animation: fade 0.15s ease; }
.sheet-card {
  width: min(100%, 640px); max-height: 88vh; overflow-y: auto; background: var(--bg); border-radius: 28px 28px 0 0;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); animation: up 0.2s ease;
}
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--border); margin: 0 auto 10px; }
.sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sheet-head h3 { margin: 0; flex: 1; font-size: 20px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0.6; } }

.fab {
  position: fixed; right: max(16px, calc(50vw - 474px)); z-index: 9; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
  width: 62px; height: 62px; border-radius: 22px; display: grid; place-items: center; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 34px; font-weight: 900; box-shadow: 0 5px 0 var(--brand-dark), 0 10px 22px rgb(219 79 36 / 30%);
}
.fab:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--brand-dark); }

/* ---------- bildirim balonu, kutlama ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 40; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px);
  display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); width: max-content;
  background: #2b2118; color: #fff; padding: 12px 16px; border-radius: 16px; font-weight: 700; font-size: 14.5px; box-shadow: 0 8px 24px rgb(0 0 0 / 25%);
}
.toast button { background: none; border: 0; color: #ffb48f; font-weight: 900; cursor: pointer; padding: 4px; white-space: nowrap; }
.toast.error { background: var(--danger); }
.toast.error button { color: #fff; }

.pop {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 70px); z-index: 45; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 32px);
  padding: 12px 16px; border-radius: 22px; background: var(--surface); border: 2px solid var(--border); box-shadow: 0 5px 0 var(--border), 0 14px 30px rgb(0 0 0 / 15%);
  animation: popin 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.pop .e { font-size: 34px; line-height: 1; animation: wiggle 0.8s ease 0.2s; }
.pop b { font-size: 15.5px; }
.pop button { border: 0; background: none; color: var(--brand-dark); font-weight: 900; cursor: pointer; padding: 4px 2px; white-space: nowrap; }
@keyframes popin { from { transform: translateX(-50%) scale(0.6); opacity: 0; } }
@keyframes wiggle { 25% { transform: rotate(-14deg) scale(1.2); } 60% { transform: rotate(10deg); } }
.confetti { position: fixed; inset: 0; z-index: 44; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 3px; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: 0.4; } }

/* ---------- giriş ---------- */
.login-page { display: grid; place-items: center; align-content: center; gap: 14px; min-height: 100vh; padding: 16px; }
.login-install { width: 100%; max-width: 390px; }
.login-card { width: 100%; max-width: 390px; display: grid; gap: 12px; padding: 26px 22px; text-align: center; }
.login-card .domi-face { margin: 0 auto; width: 76px; height: 76px; font-size: 44px; border-radius: 26px; }
.login-card h1 { margin: 4px 0 0; font-size: 26px; }
.login-card p { margin: 0 0 6px; color: var(--muted); font-weight: 700; }
.login-card label { display: grid; gap: 6px; text-align: left; font-weight: 800; color: var(--muted); font-size: 14px; }
.login-card .btn { min-height: 54px; font-size: 17px; }
.install-box { display: grid; gap: 10px; }
.install-guide { padding: 14px 14px 10px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--border); text-align: left; }
.install-guide ol { margin: 0; padding: 0; list-style: none; counter-reset: k; display: grid; gap: 10px; }
.install-guide li { counter-increment: k; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; line-height: 1.45; }
.install-guide li::before {
  content: counter(k); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sky); color: #fff; font-weight: 900; font-size: 14px;
}
.install-guide p { margin: 10px 0 0; }
.share-ico { width: 1.2em; height: 1.2em; vertical-align: -0.2em; color: var(--sky); }
.install-done { margin: 0; padding: 12px 14px; border-radius: var(--radius); background: var(--green-soft); font-weight: 700; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .confetti { display: none; }
}

/* ---------- görünüm boyutu ----------
   Küçük telefonda (iPhone SE: 375×667) her şey biraz küçülür; büyük telefonda (iPhone 15 Pro: 393×852) değişmez.
   Profil → Görünüm'den telefon başına seçilir (data-size, cihazda saklanır); seçim yoksa ekran boyutuna göre. */
@media (max-width: 400px) and (max-height: 700px) {
  html:not([data-size]) body { zoom: 0.88; }
}
html[data-size="kompakt"] body { zoom: 0.88; }
html[data-size="mini"] body { zoom: 0.8; }

