:root {
  color-scheme: dark;
  --bg: #101512;
  --bg-soft: #141d17;
  --surface: #19231c;
  --surface-raised: #202d23;
  --line: #34473a;
  --line-strong: #536b57;
  --text: #edf1e9;
  --muted: #a4b1a3;
  --sage: #b9cdae;
  --sage-deep: #789174;
  --warm: #d6c7a3;
  --danger: #d1a28e;
  --shadow: 0 24px 80px rgb(0 0 0 / 28%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 300px; min-height: 100dvh; background: var(--bg); color: var(--text); }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
[hidden] { display: none !important; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.app-shell { min-height: 100dvh; background: radial-gradient(ellipse at 78% 5%, rgb(79 111 80 / 17%), transparent 34%), var(--bg); }
.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 clamp(22px, 5vw, 64px); border-bottom: 1px solid rgb(107 134 109 / 18%); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font-size: 17px; letter-spacing: .01em; text-decoration: none; }
.topbar-actions { display: flex; align-items: center; gap: 20px; }
.preview-badge { padding: 6px 10px; border: 1px solid #405542; border-radius: 999px; color: #aebfa9; font-size: 10px; letter-spacing: .08em; }
.quiet-button, .icon-button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--muted); }
.quiet-button:hover, .icon-button:hover { color: var(--text); }

/* Ensō, mevcut ZenOne işaret dilini dış varlık veya yeni marka üretmeden sürdürür. */
.enso { position: relative; display: block; border-radius: 50%; background: conic-gradient(from 22deg, transparent 0 8deg, #b8ccae 14deg 296deg, #849b80 320deg, transparent 346deg); filter: drop-shadow(0 14px 24px rgb(77 104 78 / 20%)); }
.enso::after { content: ""; position: absolute; inset: 13%; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 22px rgb(129 158 126 / 8%); }
.enso-small { width: 27px; height: 27px; }
.enso-small::after { inset: 15%; }
.enso-hero { width: clamp(92px, 12vw, 144px); height: clamp(92px, 12vw, 144px); opacity: .92; flex: none; }

.workspace { width: min(920px, calc(100% - 40px)); margin: 0 auto; padding: clamp(38px, 7vw, 82px) 0 72px; }
.intro { display: flex; justify-content: space-between; align-items: center; gap: 42px; margin-bottom: 36px; }
.intro-copy { max-width: 630px; }
.eyebrow { margin: 0 0 11px; color: #98ad94; font-size: 10px; letter-spacing: .21em; }
h1, h2, h3, h4, p { overflow-wrap: anywhere; }
h1 { margin: 0 0 13px; font-size: clamp(42px, 7vw, 72px); line-height: .98; font-weight: 350; letter-spacing: -.055em; }
.intro-copy > p:last-child { margin: 0; color: var(--muted); font-size: clamp(15px, 2vw, 18px); line-height: 1.7; }

/* Hızlı başlık daima önde; tür, önem, tarih ve not yalnız istenirse açılır. */
.quick-add { margin-bottom: 24px; border: 1px solid var(--line-strong); border-radius: 21px; padding: 13px 14px 12px 20px; background: rgb(25 35 28 / 88%); box-shadow: var(--shadow); }
.composer-context { display: inline-flex; min-height: 25px; align-items: center; margin: 0 0 2px; padding: 2px 8px; border-radius: 999px; background: #26342a; color: #aebdaa; font-size: 10px; letter-spacing: .02em; }
.quick-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.quick-entry > input { width: 100%; min-height: 55px; padding: 7px 4px; border: 0; background: transparent; color: var(--text); font-size: clamp(17px, 2.2vw, 21px); }
.quick-entry > input::placeholder, textarea::placeholder { color: #788879; }
.quick-entry > input:focus-visible { outline: 0; }
.add-details { margin: 3px 0 0; border-top: 1px solid transparent; }
.add-details[open] { padding-top: 10px; border-top-color: rgb(94 118 96 / 22%); }
.add-details summary { width: max-content; min-height: 44px; display: flex; align-items: center; color: #93a492; font-size: 11px; cursor: pointer; }
.add-details summary::marker { color: #738a76; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.detail-grid label, .wide-field { display: grid; gap: 7px; color: #adbaaa; font-size: 11px; }
.wide-field { margin-top: 12px; }
.detail-grid input, .detail-grid select, .wide-field textarea { width: 100%; min-height: 44px; padding: 9px 11px; color: var(--text); color-scheme: dark; background: #121a15; border: 1px solid var(--line); border-radius: 11px; }
.wide-field textarea { resize: vertical; line-height: 1.55; }

/* Alan erişimi, Bölüm ise aynı Alan içindeki takip noktasını anlatır. */
.place-picker { margin: 0 0 23px; padding: 18px 19px 15px; border: 1px solid #2f4134; border-radius: 18px; background: rgb(19 28 22 / 70%); }
.place-heading, .section-strip, .manage-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.place-heading h2 { margin: 0; font-size: 18px; font-weight: 470; letter-spacing: -.015em; }
.place-heading .eyebrow { margin-bottom: 5px; }
.place-actions, .order-actions { display: flex; gap: 7px; }
.small-action { min-height: 44px; padding: 0 12px; border: 1px solid #415544; border-radius: 10px; background: transparent; color: #a8b8a4; font-size: 11px; }
.small-action:hover { border-color: #627a65; color: var(--text); }
.area-tabs, .section-tabs { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.area-tabs { margin: 15px 0 14px; padding-bottom: 2px; }
.area-tabs::-webkit-scrollbar, .section-tabs::-webkit-scrollbar, .filters::-webkit-scrollbar { display: none; }
.area-tab, .section-tab { flex: none; min-height: 44px; padding: 0 13px; border: 1px solid #3a4d3e; border-radius: 11px; background: #131c16; color: #92a291; font-size: 12px; }
.area-tab[aria-pressed="true"] { border-color: #789275; background: #27372a; color: #eff4eb; }
.section-tab { padding-inline: 11px; border: 0; border-radius: 9px; background: transparent; font-size: 11px; }
.section-tab[aria-pressed="true"] { background: #222f26; color: #cfddc9; }
.place-label { margin: 0 0 4px; color: #758a76; font-size: 8px; letter-spacing: .17em; }
.section-strip > div { min-width: 0; }
.access-line { margin: 12px 0 0; color: #829382; font-size: 10px; line-height: 1.5; }

.primary-button, .secondary-button, .danger-button { min-height: 44px; border-radius: 11px; padding: 0 18px; border: 1px solid transparent; }
.primary-button { background: var(--sage); color: #182019; font-weight: 620; }
.primary-button:hover { background: #d0dfc7; }
.secondary-button { background: transparent; border-color: var(--line); color: var(--muted); }
.secondary-button:hover { border-color: var(--line-strong); color: var(--text); }
.danger-button { margin-right: auto; background: transparent; border-color: #684c42; color: #d3a28f; }
.standalone-danger { margin-top: 14px; }

.list-section { margin-top: 50px; }
.list-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.list-toolbar h2 { margin: 0; font-size: 27px; font-weight: 430; letter-spacing: -.02em; }
.count { margin: 0 0 3px; color: var(--muted); font-size: 12px; }
.filters { display: flex; gap: 5px; margin: 22px 0 17px; padding: 4px; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; border: 1px solid rgb(70 92 73 / 52%); border-radius: 13px; background: #111813; }
.filters button { flex: none; min-height: 44px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: #91a090; font-size: 12px; }
.filters button[aria-pressed="true"] { color: var(--text); background: #293a2d; }
.loading { padding: 34px 8px; color: var(--muted); }
.todo-list { display: grid; gap: 9px; padding: 0; margin: 0; list-style: none; }
.todo-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 15px; min-height: 82px; padding: 14px 14px 14px 16px; border: 1px solid #2e4033; border-radius: 15px; background: linear-gradient(110deg, rgb(26 37 29 / 94%), rgb(19 27 22 / 92%)); }
.todo-card:hover { border-color: #49604d; }
.todo-card[data-status="completed"] { opacity: .66; }
.todo-card[data-status="archived"] { border-style: dashed; opacity: .78; }
.check-button, .archive-mark { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #657966; border-radius: 50%; background: #111a14; color: transparent; font-size: 17px; }
.archive-mark { color: #9dae9a; border-style: dashed; }
.todo-card[data-status="completed"] .check-button { color: #182019; background: var(--sage); border-color: var(--sage); }
.todo-copy { min-width: 0; }
.todo-title { margin: 0; color: #e7ece3; font-size: 15px; font-weight: 520; line-height: 1.45; }
.todo-card[data-status="completed"] .todo-title { text-decoration: line-through; text-decoration-color: #839081; }
.todo-note { margin: 5px 0 0; color: #98a897; font-size: 12px; line-height: 1.55; white-space: pre-line; }
.todo-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.meta-chip { padding: 3px 7px; border-radius: 999px; background: #223025; color: #a7baa2; font-size: 9px; letter-spacing: .035em; }
.meta-chip.important { color: #d7c79e; background: #342f22; }
.meta-chip.overdue { color: #ddb39f; background: #382821; }
.meta-chip.shared { color: #c8d9c3; background: #2b3c2e; }
.meta-chip.zenone { color: #d6c7a3; background: #332f23; }
.edit-button, .restore-button { min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: #829383; font-size: 20px; }
.edit-button:hover { color: var(--text); background: #263429; }
.restore-button { padding-inline: 12px; border: 1px solid #4b6250; color: #b6c6b2; font-size: 11px; }
.restore-button:hover { border-color: #77917a; color: var(--text); }
.empty-state { padding: 55px 20px; border: 1px dashed #34463a; border-radius: 16px; text-align: center; }
.empty-mark { color: #80947e; font-size: 34px; }
.empty-state h3 { margin: 13px 0 6px; font-size: 16px; font-weight: 470; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; }
.boundary-note { display: flex; align-items: flex-start; gap: 13px; margin: 32px 3px 0; color: #879987; }
.boundary-note > span { color: var(--sage-deep); }
.boundary-note p { margin: 0; max-width: 680px; font-size: 11px; line-height: 1.75; }
.boundary-note strong { color: #aebdab; font-weight: 540; }

/* Dialoglar aynı doğrulama ve sade hiyerarşiyi korur; yönetim ana akışın dışında kalır. */
dialog { width: min(520px, calc(100% - 32px)); max-height: min(760px, 88dvh); padding: 28px 31px 31px; border: 1px solid #455a49; border-radius: 21px; background: #18221b; color: var(--text); box-shadow: 0 40px 120px rgb(0 0 0 / 55%); }
dialog::backdrop { background: rgb(5 10 7 / 78%); backdrop-filter: blur(7px); }
.manage-dialog { width: min(720px, calc(100% - 32px)); }
.dialog-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 25px; }
.dialog-bar h2 { margin: 0; font-size: 26px; font-weight: 420; letter-spacing: -.025em; }
.icon-button { margin: -8px -8px 0 0; border-radius: 50%; font-size: 27px; font-weight: 280; }
dialog form > label, .edit-row label, .inline-form label { display: grid; gap: 8px; margin: 15px 0; color: #adbaaa; font-size: 12px; }
dialog input, dialog textarea, dialog select { width: 100%; min-height: 44px; padding: 11px 13px; color: var(--text); color-scheme: dark; background: #121a15; border: 1px solid var(--line); border-radius: 11px; }
dialog textarea { resize: vertical; line-height: 1.55; }
.edit-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.about-copy { color: #afbdab; font-size: 14px; line-height: 1.85; }
.about-copy p { margin: 0 0 17px; }
.about-copy strong { color: #d7e1d2; font-weight: 560; }
.form-hint { margin: 12px 0 0; color: #839282; font-size: 11px; line-height: 1.65; }
.about-done { display: block; margin: 25px 0 0 auto; }

.manage-section { padding: 22px 0; border-top: 1px solid rgb(94 118 96 / 25%); }
.manage-section:first-of-type { border-top: 0; }
.manage-section h3 { margin: 0; color: #dbe4d7; font-size: 17px; font-weight: 510; }
.manage-section h4, .recent-actions h4, .archived-group h4 { margin: 22px 0 10px; color: #aebaaa; font-size: 11px; font-weight: 540; letter-spacing: .04em; }
.inline-form { display: flex; align-items: end; gap: 10px; }
.inline-form .grow-field { flex: 1; min-width: 0; margin-bottom: 0; }
.order-actions { margin-top: 10px; }
.manage-list, .people-list, .recent-actions ul { display: grid; gap: 8px; padding: 0; margin: 14px 0 0; list-style: none; }
.manage-item, .person-row, .recent-actions li { min-height: 58px; padding: 8px 9px 8px 13px; border: 1px solid #314337; border-radius: 12px; background: #141d17; }
.section-manage-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.section-manage-item input { margin: 0; border-color: transparent; background: transparent; }
.section-manage-item input:focus { border-color: var(--line); background: #111813; }
.row-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.row-action { min-width: 44px; min-height: 44px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: #9eaf9c; font-size: 10px; }
.row-action:hover { background: #243127; color: var(--text); }
.danger-text { color: #d0a08c; }
.compact-manage-item, .person-row, .recent-actions li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.compact-manage-item > span { color: #cbd6c7; font-size: 12px; }
.person-row > span { display: grid; gap: 4px; }
.person-row strong { color: #dbe4d7; font-size: 13px; font-weight: 530; }
.person-row small { color: #879787; font-size: 10px; }
.switch-row { display: flex !important; align-items: center; justify-content: space-between; gap: 20px; min-height: 62px; margin-block: 12px !important; }
.switch-row > span { display: grid; gap: 4px; }
.switch-row strong { color: #dbe4d7; font-size: 13px; font-weight: 530; }
.switch-row small { color: #879787; font-size: 10px; }
.switch-row input { width: 48px; min-width: 48px; height: 27px; min-height: 27px; padding: 0; accent-color: var(--sage-deep); }
.capability-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0 0 13px; padding: 0; border: 0; }
.capability-grid label { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 7px 10px; border: 1px solid #304135; border-radius: 10px; color: #aebaaa; font-size: 11px; }
.capability-grid input { width: 18px; min-height: 18px; margin: 0; padding: 0; accent-color: var(--sage-deep); }
.recent-actions { margin-top: 22px; }
.recent-actions li { color: #aebaaa; font-size: 11px; }
.recent-actions time { flex: none; color: #788a7a; font-size: 9px; }

.toast { position: fixed; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); z-index: 20; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); margin: 0; padding: 12px 16px; border: 1px solid #596e5b; border-radius: 11px; background: #243127; color: var(--text); box-shadow: var(--shadow); font-size: 12px; }
.toast[data-error="true"] { border-color: #8b6556; color: #efd0c0; }

@media (max-width: 640px) {
  html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  .app-shell { height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; padding-inline: env(safe-area-inset-left) env(safe-area-inset-right); }
  .topbar { min-height: 60px; padding: calc(8px + env(safe-area-inset-top)) 19px 8px; }
  .preview-badge { display: none; }
  .quiet-button { font-size: 10px; }
  .workspace { width: 100%; height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 27px 18px calc(32px + env(safe-area-inset-bottom)); }
  .intro { margin-bottom: 25px; gap: 18px; }
  .enso-hero { width: 72px; height: 72px; }
  h1 { font-size: clamp(38px, 12vw, 52px); }
  .intro-copy > p:last-child { font-size: 14px; }
  .quick-add { padding: 10px 11px 10px 15px; border-radius: 17px; }
  .quick-entry { gap: 8px; }
  .quick-entry > input { min-height: 50px; font-size: 17px; }
  .quick-entry .primary-button { padding-inline: 14px; }
  .detail-grid { grid-template-columns: 1fr; }
  .place-picker { padding: 15px 14px 13px; border-radius: 15px; }
  .place-actions { gap: 4px; }
  .place-actions .small-action { padding-inline: 9px; }
  .area-tabs { margin-block: 13px 11px; }
  .section-strip { align-items: end; }
  .list-section { margin-top: 40px; }
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .filters button { padding-inline: 7px; }
  .todo-card { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding-inline: 11px; }
  .restore-button { padding-inline: 8px; }
  .boundary-note { margin-bottom: 12px; }
  dialog[open] { position: fixed; inset: 0; width: 100%; max-width: 100%; height: 100dvh; max-height: none; margin: 0; padding: calc(22px + env(safe-area-inset-top)) 23px calc(25px + env(safe-area-inset-bottom)); border: 0; border-radius: 0; overflow-y: auto; background: var(--bg); }
  .sticky-dialog-bar { position: sticky; top: calc(-22px - env(safe-area-inset-top)); z-index: 2; margin-inline: -23px; padding: calc(22px + env(safe-area-inset-top)) 23px 15px; background: rgb(16 21 18 / 96%); border-bottom: 1px solid #2e4033; backdrop-filter: blur(12px); }
  .edit-row, .capability-grid { grid-template-columns: 1fr; gap: 0; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .inline-form .secondary-button { align-self: stretch; }
  .section-manage-item { grid-template-columns: 1fr; }
  .section-manage-item input { background: #111813; border-color: var(--line); }
  .row-actions { justify-content: flex-end; }
}

@media (max-width: 390px) {
  .enso-hero { display: none; }
  .todo-card { grid-template-columns: auto minmax(0, 1fr); }
  .todo-card > :last-child { grid-column: 2; justify-self: start; }
  .dialog-actions { flex-wrap: wrap; }
  .dialog-actions .danger-button { width: 100%; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media (forced-colors: active) {
  .enso { border: 4px solid CanvasText; background: transparent; }
  .enso::after { display: none; }
}

.chat-settings{margin:1.2rem 0;padding:1rem;border:1px solid #ffffff25;border-radius:16px}.chat-settings summary{cursor:pointer}.chat-settings p{color:#a8b7ae}.chat-settings input{max-width:21rem;margin:.6rem}.brand-hero{opacity:.7}@media(max-width:600px){.brand-hero{width:70px;height:70px}.chat-settings input{max-width:100%;margin:.6rem 0}}
