/* Bugün ekranı (telefonda açılış ekranı; masaüstünde de çalışır) ve blok ekleme penceresi */
.today { flex: 1; min-height: 0; overflow-y: auto; background: var(--bg); }
.td2-wrap { max-width: 720px; margin: 0 auto; padding: 18px 16px 28px; display: flex; flex-direction: column; gap: 14px; }
.td2-head { display: flex; flex-direction: column; gap: 6px; }
.td2-date b { display: block; font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 40px; line-height: 1; letter-spacing: .02em; color: var(--strong); }
.td2-date span { font-size: 14px; color: var(--muted); font-weight: 500; }
.td2-theme, .td2-rel { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 4px 10px; border-radius: 14px; font-size: 13px; font-weight: 600; }
.td2-theme { background: var(--accent-soft); color: var(--accent-2); }
.td2-rel { background: color-mix(in srgb, #2e8b57 12%, var(--panel)); color: #2e8b57; }
:root[data-theme="dark"] .td2-rel { color: #5fc792; }

.td2-card { border-radius: 16px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.td2-card.now { --c: var(--accent); border-left: 6px solid var(--c); background-image: linear-gradient(135deg, color-mix(in srgb, var(--c) 12%, transparent), transparent 70%); }
.td2-card.now.free { --c: var(--muted-2); }
.td2-card.empty { align-items: flex-start; gap: 8px; color: var(--muted); }
.td2-card.empty b { color: var(--text); font-size: 16px; }
.td2-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.td2-t { font-size: 22px; font-weight: 700; color: var(--strong); line-height: 1.2; }
.td2-s { font-size: 14px; color: var(--text-2); }
.td2-bar { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; margin-top: 6px; }
.td2-bar i { display: block; height: 100%; background: var(--c); border-radius: 3px; }
.td2-next { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: baseline; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.td2-next b { font-size: 15px; border-left: 4px solid var(--c); padding-left: 8px; }
.td2-next span:last-child { grid-column: 2; font-size: 13px; color: var(--muted); padding-left: 12px; }

.td2-sec { display: flex; flex-direction: column; gap: 6px; }
.td2-sh { display: flex; align-items: center; justify-content: space-between; }
.td2-sh b { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.td2-sh .btn { color: var(--accent-2); font-weight: 600; }
.td2-none { color: var(--muted); font-size: 14px; padding: 8px 0; }
.td2-sec > .btn { align-self: flex-start; }

.td2-tl { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.td2-it {
  display: grid; grid-template-columns: 50px 14px 1fr auto; align-items: center; gap: 10px; padding: 11px 14px; border: none; background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer; border-top: 1px solid var(--line); min-height: 54px;
}
.td2-it:first-child { border-top: none; }
.td2-it:active { background: var(--hover); }
.td2-time { display: flex; flex-direction: column; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; line-height: 1.2; }
.td2-time small { font-weight: 500; color: var(--muted); font-size: 12px; }
.td2-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); justify-self: center; }
.td2-name { display: flex; flex-direction: column; min-width: 0; font-weight: 600; line-height: 1.25; }
.td2-name small { font-weight: 500; color: var(--muted); font-size: 12px; }
.td2-len { font-size: 12px; color: var(--muted); white-space: nowrap; }
.td2-it.past { opacity: .5; }
.td2-it.cur { background: color-mix(in srgb, var(--c) 10%, var(--panel)); }
.td2-it.cur .td2-dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent); }
.td2-it.done .td2-name { text-decoration: line-through; color: var(--muted); }

.td2-task { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; }
.td2-task .td-check { width: 28px; height: 28px; }
.td2-task.done .td2-name { text-decoration: line-through; color: var(--muted); }

.td2-aw { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.td2-awi { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--panel)); }
.td2-aw b { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 21px; white-space: nowrap; }
.td2-vision { display: flex; align-items: center; gap: 8px; border: none; background: none; font: inherit; color: var(--accent-2); font-style: italic; text-align: left; padding: 6px 2px; cursor: pointer; }

/* blok ekleme penceresi */
.as { display: flex; flex-direction: column; gap: 12px; }
.as-g { display: flex; flex-direction: column; gap: 6px; }
.as-gt { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.as-cs { display: flex; flex-wrap: wrap; gap: 6px; }
.as-c { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; font: inherit; font-size: 14px; color: var(--text); }
.as-c .dot { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.as-c small { color: var(--muted); font-size: 11.5px; }
.as-c.on { border-color: var(--c); box-shadow: 0 0 0 2px var(--c); font-weight: 600; background: color-mix(in srgb, var(--c) 10%, var(--panel)); }
.as-row { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.as-row .grow { flex: 1; min-width: 180px; }
.as div.lbl, .as label.lbl { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.as-lens { display: flex; flex-wrap: wrap; gap: 6px; }
.as-l { min-height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; font: inherit; font-size: 13.5px; color: var(--text); }
.as-l.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.as-sum { font-variant-numeric: tabular-nums; }

/* hafta listesi penceresi */
.wl { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.wl-i { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font: inherit; color: inherit; text-align: left; }
.wl-i span { font-size: 12.5px; color: var(--muted); }
.wl-i.on { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- ekleme penceresi v2: Ne? → Ne kadar? → Ne zaman? ---------- */
.as-step { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--text); margin-top: 4px; }
.as-step b { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.as-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.as-d { display: flex; flex-direction: column; align-items: center; padding: 5px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font: inherit; color: var(--text); cursor: pointer; }
.as-d span { font-size: 10.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.as-d b { font-size: 15px; }
.as-d.today { border-color: var(--accent); }
.as-d.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.as-d.on span { color: rgba(255, 255, 255, .85); }
.as-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.as-s { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.as-s b { font-variant-numeric: tabular-nums; font-size: 15px; }
.as-s small { font-size: 11.5px; color: var(--muted); }
.as-s.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
.as-none { padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn-text); font-size: 13px; }
.as-man > summary { cursor: pointer; font-size: 13px; color: var(--accent-2); font-weight: 600; padding: 2px 0; }
.as-man .field { margin-top: 6px; width: 100%; }
.modal.as-modal { width: 520px; }
.modal.as-modal .mb { max-height: min(72vh, 660px); overflow-y: auto; }

/* ---------- blok düzenleyici: hızlı düğmeler ---------- */
.qa { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.qa-r { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.qa-l { width: 44px; flex: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.qa-b { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 11px; border-radius: 17px; border: 1px solid var(--line-2); background: var(--panel); font: inherit; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; }
.qa-b:hover { border-color: var(--muted-2); }
.qa-v { font-size: 12px; color: var(--muted); margin-left: 4px; font-variant-numeric: tabular-nums; }
.ed-more { margin-top: 8px; }
.ed-more > summary { cursor: pointer; font-size: 13px; color: var(--accent-2); font-weight: 600; }

/* ---------- Bugün: eylemler ve "Bu haftayı planla" ---------- */
.td2-acts { display: flex; gap: 6px; align-items: center; }
.td2-plan {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; border: none; cursor: pointer; text-align: left; font: inherit;
  color: #fff; background: linear-gradient(135deg, #00a39a, #0f7f78); box-shadow: 0 8px 22px rgba(0, 163, 154, .3);
}
.td2-plan span { flex: 1; display: flex; flex-direction: column; }
.td2-plan b { font-size: 16px; }
.td2-plan small { opacity: .85; font-size: 13px; }

/* ---------- Haftayı planla ---------- */
body.wz-open { overflow: hidden; }
.wz {
  position: fixed; inset: 0; z-index: 550; display: flex; flex-direction: column; background: var(--bg);
  animation: wzIn .22s ease;
}
@keyframes wzIn { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 901px) {
  .wz { inset: 4vh auto 4vh 50%; width: 600px; transform: translateX(-50%); border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); overflow: hidden; animation: none; }
}
.wz-h { display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px; background: var(--panel); border-bottom: 1px solid var(--line); }
.wz-t { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.wz-t b { font-size: 17px; }
.wz-t span { font-size: 12.5px; color: var(--muted); }
.wz-dots { display: flex; gap: 6px; }
.wz-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--panel); font: inherit; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; }
.wz-dot.done { border-color: var(--accent); color: var(--accent-2); }
.wz-dot.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.wz-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 14px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.wz-sum > div:not(.wz-meter) { display: flex; flex-direction: column; }
.wz-sum small { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.wz-sum b { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 26px; line-height: 1.05; }
.wz-sum .ok b { color: var(--ok); } .wz-sum .bad b { color: var(--danger); }
.wz-meter { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; display: flex; }
.wz-meter i { display: block; height: 100%; background: var(--accent); }
.wz-meter i.over { background: var(--danger); }
.wz-b { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 14px 24px; }
.wz-st { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 28px; margin: 0 0 6px; letter-spacing: .02em; }
.wz-p { margin: 0 0 12px; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.wz-sec { display: flex; flex-direction: column; gap: 8px; }
.wz-sub { margin-top: 12px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.wz-f { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--panel); border-top: 1px solid var(--line); }
.wz-f .btn.big { flex: 1; justify-content: center; height: 48px; }
.wz-f > span { flex: 1; }

/* 1) zorunlular */
.wz-fx { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.wz-fd { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-top: 1px solid var(--line); }
.wz-fd:first-child { border-top: none; }
.wz-fdn { width: 34px; flex: none; font-weight: 700; font-size: 13px; color: var(--text-2); padding-top: 6px; }
.wz-fcs { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: 32px; }
.wz-fc { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 16px; background: color-mix(in srgb, var(--c) 15%, var(--panel)); border: 1px solid color-mix(in srgb, var(--c) 45%, var(--panel)); font-size: 13px; }
.wz-fc small { color: var(--muted); font-variant-numeric: tabular-nums; }
.wz-x { width: 24px; height: 24px; border-radius: 50%; border: none; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.wz-x:hover { background: var(--hover); color: var(--danger); }
.wz-x.big { width: 34px; height: 34px; }
.wz-add { width: 32px; height: 32px; border-radius: 50%; border: 1px dashed var(--line-2); background: var(--panel); color: var(--accent-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.wz-set { margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.wz-set-h { font-weight: 700; font-size: 13px; }
.wz-set-r { display: flex; gap: 10px; flex-wrap: wrap; }
.wz-set-r .lbl { flex: 1; min-width: 130px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }

/* 2) hedefler */
.wz-c { background: var(--panel); border: 1px solid var(--line); border-left: 5px solid color-mix(in srgb, var(--c) 35%, var(--line)); border-radius: 14px; padding: 8px 8px 8px 12px; }
.wz-c.on { border-left-color: var(--c); }
.wz-cr { display: flex; align-items: center; gap: 8px; }
.wz-cn { flex: 1; min-width: 0; display: grid; grid-template-columns: 12px 1fr; column-gap: 8px; align-items: center; border: none; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; padding: 4px 0; }
.wz-cn .dot { width: 12px; height: 12px; border-radius: 4px; background: var(--c); grid-row: 1 / 3; }
.wz-cn b { font-size: 15px; }
.wz-cn small { grid-column: 2; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-step { display: flex; align-items: center; gap: 2px; flex: none; }
.wz-sb { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); font: inherit; font-size: 22px; line-height: 1; color: var(--text); cursor: pointer; }
.wz-sb:active { background: var(--accent-soft); }
.wz-sv { min-width: 52px; text-align: center; font-family: 'Bebas Neue', sans-serif; font-size: 26px; line-height: 1; }
.wz-sv small { font-family: 'Inter', sans-serif; font-size: 11px; color: var(--muted); margin-left: 2px; }
.wz-cx { display: flex; flex-direction: column; gap: 8px; padding: 8px 4px 4px 0; }
.wz-cx textarea { width: 100%; font-size: 14px; }
.wz-prefs { display: flex; gap: 5px; flex-wrap: wrap; }
.wz-pref { min-height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel); font: inherit; font-size: 13px; cursor: pointer; color: var(--text); }
.wz-pref.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.wz-pool { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 0 12px; }
.wz-pool > summary { cursor: pointer; padding: 10px 0; font-weight: 600; font-size: 13.5px; color: var(--accent-2); }
.wz-pi { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.wz-pi span { flex: 1; min-width: 0; }
.wz-pi small { color: var(--muted); }

/* 3) yerleştir */
.wz-run { width: 100%; justify-content: center; height: 52px; font-size: 16px; margin-top: 4px; }
.wz-fill { display: flex; flex-direction: column; gap: 4px; }
.wz-fi { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; }
.wz-fi .dot { width: 10px; height: 10px; border-radius: 50%; }
.wz-fi .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-fi .v { font-variant-numeric: tabular-nums; color: var(--warn-text); font-weight: 600; }
.wz-fi.ok .v { color: var(--ok-text); }
.wz-dayrow { display: flex; gap: 6px; align-items: stretch; }
.wz-dayrow .wz-day { flex: 1; min-width: 0; }
.wz-dadd { width: 46px; height: auto; border-radius: 10px; flex: none; }
.wz-days { display: flex; flex-direction: column; gap: 4px; }
.wz-day { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font: inherit; color: inherit; cursor: pointer; }
.wz-dn { font-weight: 700; font-size: 13px; }
.wz-db { display: flex; gap: 2px; height: 14px; align-items: stretch; min-width: 0; }
.wz-db i { display: block; border-radius: 3px; min-width: 4px; }
.wz-dh { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wz-dh.bad { color: var(--danger); font-weight: 600; }
.wz-empty { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 16px; border: 1.5px dashed var(--line-2); border-radius: 14px; color: var(--muted); }
.wz-empty b { color: var(--text); }
