/* Pomodoro — koyu öncelikli, tek vurgu rengi (kehribar kum), ince çizgiler. */
:root {
  --bg: #111318;
  --bg2: #0c0e12;
  --surface: #181b22;
  --surface2: #1f232c;
  --surface3: #272c37;
  --line: #2a2f3a;
  --line2: #363c49;
  --text: #e9ebf1;
  --muted: #9198a8;
  --faint: #636b7b;
  --accent: #f2b84b;
  --accent-ink: #1b1406;
  --accent-soft: rgba(242, 184, 75, 0.14);
  --break: #4fc3a1;
  --break-soft: rgba(79, 195, 161, 0.16);
  --danger: #ef6b6b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --dock-h: 196px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f4ef;
  --bg2: #ece9e2;
  --surface: #ffffff;
  --surface2: #f3f1ec;
  --surface3: #e8e5de;
  --line: #e2ded5;
  --line2: #d3cec3;
  --text: #1d1f24;
  --muted: #646b78;
  --faint: #959baa;
  --accent: #d48d12;
  --accent-ink: #ffffff;
  --accent-soft: rgba(212, 141, 18, 0.13);
  --break: #1f9a78;
  --break-soft: rgba(31, 154, 120, 0.13);
  --danger: #cf3f3f;
  --shadow: 0 10px 30px rgba(40, 30, 10, 0.14);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f4ef;
    --bg2: #ece9e2;
    --surface: #ffffff;
    --surface2: #f3f1ec;
    --surface3: #e8e5de;
    --line: #e2ded5;
    --line2: #d3cec3;
    --text: #1d1f24;
    --muted: #646b78;
    --faint: #959baa;
    --accent: #d48d12;
    --accent-ink: #ffffff;
    --accent-soft: rgba(212, 141, 18, 0.13);
    --break: #1f9a78;
    --break-soft: rgba(31, 154, 120, 0.13);
    --danger: #cf3f3f;
    --shadow: 0 10px 30px rgba(40, 30, 10, 0.14);
    color-scheme: light;
  }
}

/* görev renkleri */
.c0 { --tc: #f2b84b; } .c1 { --tc: #6aa8ff; } .c2 { --tc: #4fc3a1; } .c3 { --tc: #ef7d6b; }
.c4 { --tc: #b88cff; } .c5 { --tc: #e86fb0; } .c6 { --tc: #9ccc5a; } .c7 { --tc: #4cc3e0; }

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.4; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ic { flex: none; display: block; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

.app {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding-top: env(safe-area-inset-top);
}
.app > .top { grid-row: 1; }
.app > .tabs { grid-row: 2; }
.app > .board { grid-row: 3; }
.app > .dock { grid-row: 4; }

/* ---------------------------------------------------------------- üst çubuk */
.top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.brand { display: flex; align-items: center; gap: 9px; flex: none; }
.brand img { border-radius: 7px; }
.brand-name { font-weight: 650; letter-spacing: -0.01em; font-size: 16px; }
.today { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; font-variant-numeric: tabular-nums; }
.top-actions { display: flex; align-items: center; gap: 4px; flex: none; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  border: 0; background: transparent; color: var(--muted);
  flex: none;
}
.icon-btn.sm { width: 32px; height: 32px; border-radius: 8px; }
.icon-btn.sm .ic { width: 18px; height: 18px; }
#sync-ind[data-state="syncing"] { color: var(--accent); }
#sync-ind[data-state="error"], #sync-ind[data-state="offline"], #sync-ind[data-state="logged_out"] { color: var(--danger); }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line2);
  background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-left: 4px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line2); background: var(--surface2); color: var(--text);
  text-decoration: none; font-weight: 550; white-space: nowrap;
}
.btn.sm { min-height: 34px; padding: 0 11px; font-size: 14px; }
.btn .ic { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.danger { color: var(--danger); }
.btn.danger:not(.ghost) { background: var(--danger); border-color: var(--danger); color: #fff; }

/* ---------------------------------------------------------------- sekmeler (telefon) */
.tabs { display: none; }

/* ---------------------------------------------------------------- pano */
.board {
  display: flex;
  gap: 14px;
  padding: 16px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left));
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 0;
  align-items: stretch;
  scrollbar-width: thin;
}
.col {
  flex: 1 1 280px; min-width: 280px;
  display: flex; flex-direction: column;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.15s, background 0.15s;
}
.col.drop { border-color: var(--accent); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 12px 8px 6px 14px; min-width: 0; }
.col-name { margin: 0; font-size: 14px; font-weight: 650; letter-spacing: 0.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-head .icon-btn { margin-left: auto; }
.count { font-size: 12px; color: var(--muted); background: var(--surface2); border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums; flex: none; }
.role-chip { font-size: 11px; color: var(--faint); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; white-space: nowrap; flex: none; }
.role-done .col-name { color: var(--muted); }

.col-add { display: flex; gap: 4px; padding: 4px 8px 8px 10px; align-items: center; }
.add-input {
  flex: 1; min-width: 0; height: 38px; padding: 0 12px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; outline: none;
}
.add-input:focus { border-color: var(--accent); }
.add-input::placeholder { color: var(--faint); }

.col-list { flex: 1; overflow-y: auto; padding: 2px 10px 12px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; scrollbar-width: thin; }
.empty-col { color: var(--faint); font-size: 13px; text-align: center; padding: 18px 8px; margin: 0; }

.col-new {
  flex: 0 0 150px; align-self: flex-start; margin-left: auto;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; border-radius: 14px; border: 1px dashed var(--line2); background: transparent; color: var(--muted);
}

/* kart */
.card {
  position: relative;
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 8px 10px 10px;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--tc);
  border-radius: 10px;
  cursor: pointer;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: manipulation;
  transition: border-color 0.15s, transform 0.15s, opacity 0.15s;
}
.card.active { border-color: var(--tc); box-shadow: 0 0 0 1px var(--tc) inset; }
.card.done .card-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.card.dragging { opacity: 0.35; }
.card.ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; box-shadow: var(--shadow); opacity: 0.95; }
.card-body { flex: 1; min-width: 0; }
.card-title { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.35; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.card-meta:empty { display: none; }
.card-meta .ic { width: 14px; height: 14px; }
.spent, .has-notes { display: inline-flex; align-items: center; gap: 4px; }
.dots { display: inline-flex; align-items: center; gap: 3px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--tc); }
.dots i.full { background: var(--tc); }
.dots i.half { background: linear-gradient(90deg, var(--tc) 50%, transparent 50%); }
.play, .check {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line2); background: transparent; color: var(--muted);
}
.play .ic, .check .ic { width: 15px; height: 15px; }
.card.active .play { color: var(--tc); border-color: var(--tc); animation: pulse 1.8s ease-in-out infinite; }
.check.on { background: var(--break); border-color: var(--break); color: #fff; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--tc) 22%, transparent); } }
.drop-line { height: 3px; border-radius: 2px; background: var(--accent); margin: -2px 0; flex: none; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }

/* ---------------------------------------------------------------- alt panel */
.dock {
  border-top: 1px solid var(--line);
  background: var(--bg2);
  padding-bottom: env(safe-area-inset-bottom);
  min-width: 0;
}
.dock-main {
  display: flex; align-items: center; gap: 16px;
  padding: 12px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  min-width: 0;
}
.phase {
  position: relative; flex: none;
  width: 92px; height: 92px; border-radius: 50%;
  border: 0; background: transparent; padding: 0;
  display: grid; place-items: center; align-content: center;
}
.ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: var(--surface3); stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 0.9s linear, stroke 0.3s; }
.dock[data-kind="break"] .ring-fg { stroke: var(--break); }
.dock[data-status="paused"] .ring-fg { stroke: var(--faint); }
.phase-clock { position: relative; font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.1; }
.phase-label { position: relative; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock[data-kind="work"][data-status="running"] .phase-label { color: var(--accent); }
.dock[data-kind="break"][data-status="running"] .phase-label { color: var(--break); }

.now { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.now-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); }
.now-task {
  max-width: 100%; border: 0; background: transparent; padding: 0; text-align: left;
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.now-task.empty { color: var(--muted); font-weight: 500; }
.now-sub { font-size: 13px; color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }

.controls { display: flex; gap: 8px; flex: none; }
.ctl {
  height: 46px; min-width: 46px; border-radius: 12px; border: 1px solid var(--line2);
  background: var(--surface2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px;
}
.ctl.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 650; min-width: 128px; padding: 0 18px; }
.dock[data-kind="break"][data-status="running"] .ctl.primary { background: var(--break); border-color: var(--break); color: #fff; }

/* zaman çizelgesi */
.timeline {
  position: relative;
  height: 86px;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin;
  border-top: 1px solid var(--line);
  overscroll-behavior-x: contain;
}
.tl-inner { position: relative; height: 100%; min-width: 100%; }
.tl-tick { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--line); }
.tl-tick.hour { border-left-style: solid; }
.tl-tick span { position: absolute; top: 4px; left: 5px; font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-seg { position: absolute; top: 24px; height: 10px; border-radius: 3px; display: grid; place-items: center; }
.tl-seg.work { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.tl-seg.break { background: var(--break-soft); top: 22px; height: 54px; color: var(--break); }
.tl-seg.break .ic { width: 13px; height: 13px; margin-top: 18px; opacity: 0.8; }
.tl-seg.pause { background: repeating-linear-gradient(135deg, var(--surface3) 0 4px, transparent 4px 8px); top: 22px; height: 54px; }
.tl-seg.proj { opacity: 0.55; }
.tl-piece {
  position: absolute; top: 40px; height: 32px; border-radius: 6px; border: 0; padding: 0 7px;
  background: var(--tc); color: #15171c; font-size: 12px; font-weight: 600; text-align: left; overflow: hidden;
  display: flex; align-items: center;
}
.tl-piece span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tl-piece.live { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 3px var(--tc); }
.tl-piece.proj {
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--tc) 30%, transparent) 0 6px, color-mix(in srgb, var(--tc) 18%, transparent) 6px 12px);
  color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 60%, transparent);
}
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--text); z-index: 2; }
.tl-now::before { content: ""; position: absolute; top: 0; left: -4px; border: 5px solid transparent; border-top-color: var(--text); }
.tl-hint { position: absolute; top: 44px; color: var(--faint); font-size: 12.5px; white-space: nowrap; }

/* ---------------------------------------------------------------- sheet */
body.sheet-open { overflow: hidden; }
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(5, 6, 9, 0.55);
  display: grid; place-items: center; padding: 20px;
  animation: fade 0.15s ease-out;
}
.sheet-backdrop.closing { animation: fade 0.15s ease-in reverse forwards; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  min-width: 0;
  width: min(560px, 100%); max-height: min(86dvh, 820px);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  animation: rise 0.18s ease-out;
}
.sheet.wide { width: min(720px, 100%); }
@keyframes rise { from { transform: translateY(12px); opacity: 0.6; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px 20px; }
.sheet-head h2 { margin: 0; font-size: 17px; }
.sheet-body { padding: 6px 20px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.sheet-actions.spread { justify-content: space-between; }
.row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row.spread { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
h3.sub { margin: 8px 0 -4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); font-weight: 650; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text); }
.hint { font-size: 12.5px; color: var(--muted); display: block; }
.field input, .field select, .field textarea, .plan-add select {
  width: 100%; max-width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line); outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; }
.title-input {
  width: 100%; border: 0; background: transparent; outline: none; resize: none; overflow: hidden;
  font-size: 20px; font-weight: 650; letter-spacing: -0.01em; padding: 4px 0; line-height: 1.3;
  border-bottom: 1px solid transparent;
}
.title-input:focus { border-bottom-color: var(--accent); }
.notes-input { min-height: 96px; line-height: 1.5; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-height: 42px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; background: var(--tc); padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--tc); }

.stepper { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 2px; flex: none; }
.step-val { min-width: 92px; text-align: center; font-size: 13.5px; font-variant-numeric: tabular-nums; }

.task-plan { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); }
.log-list { list-style: none; margin: 8px 0 0; padding: 0; }
.log-day { font-size: 12px; color: var(--faint); margin: 10px 0 2px; }
.log-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 2px 0; font-variant-numeric: tabular-nums; font-size: 14px; }
.live-row { display: flex; align-items: center; gap: 6px; color: var(--accent); font-size: 13px; margin: 8px 0 0; }
.live-row .ic { width: 14px; height: 14px; }

.plan-list, .pick-list, .bars, .done-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plan-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); min-width: 0;
}
.plan-row.active { border-color: var(--tc); }
.plan-row.spent .plan-title { color: var(--muted); }
.plan-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tc); flex: none; }
.plan-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.plan-title { border: 0; background: none; padding: 0; text-align: left; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-move { display: flex; flex: none; }
.plan-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.plan-add select { flex: 1 1 200px; width: auto; min-width: 0; max-width: 100%; }

.pick { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); text-align: left; }
.pick.on { border-color: var(--tc); }
.pick-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.switch-row { display: flex; align-items: center; gap: 12px; cursor: pointer; position: relative; }
.switch-row > span:first-child { flex: 1; min-width: 0; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 44px; height: 26px; border-radius: 999px; background: var(--surface3); position: relative; flex: none; transition: background 0.15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.switch-row input:checked + .switch { background: var(--accent); }
.switch-row input:checked + .switch::after { transform: translateX(18px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; align-self: flex-start; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 7px; color: var(--muted); }
.seg button.on { background: var(--surface3); color: var(--text); }

.account-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.account-card p { margin: 0; }
.account-card .row.spread { width: 100%; }

/* rapor */
.day-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.day-nav strong { text-align: center; flex: 1; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stat { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); display: flex; flex-direction: column; min-width: 0; }
.stat strong { font-size: 19px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat span { font-size: 12px; color: var(--muted); }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto; align-items: center; gap: 10px; }
.bar-title { border: 0; background: none; padding: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.bar-track { height: 10px; background: var(--surface2); border-radius: 5px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--tc); border-radius: 5px; }
.bar-val { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week-day { border: 1px solid transparent; background: none; border-radius: 10px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.week-day.on { border-color: var(--line2); background: var(--surface2); }
.week-bar { height: 70px; width: 14px; border-radius: 4px; background: var(--surface2); display: flex; align-items: flex-end; overflow: hidden; }
.week-fill { display: block; width: 100%; background: var(--accent); border-radius: 4px; }
.week-label { font-size: 12px; color: var(--muted); }
.week-val { font-size: 10.5px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.done-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.done-list .ic { width: 16px; height: 16px; color: var(--break); margin-top: 2px; }
.done-list span { overflow-wrap: anywhere; min-width: 0; }

/* bildirim baloncukları */
.toasts {
  position: fixed; z-index: 80; left: 50%; transform: translateX(-50%);
  top: calc(env(safe-area-inset-top) + 64px);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  width: min(440px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 10px 12px 10px 14px; border-radius: 12px; background: var(--surface3); border: 1px solid var(--line2);
  box-shadow: var(--shadow); font-size: 14px; max-width: 100%; animation: rise 0.2s ease-out;
}
.toast > span { overflow-wrap: anywhere; min-width: 0; }
.toast.strong { border-color: var(--accent); }
.toast.out { opacity: 0; transition: opacity 0.25s; }

/* login sonucu gibi düz sayfalar */
body.plain { overflow: auto; display: grid; place-items: center; min-height: 100%; padding: 24px 16px; }
.plain-card { max-width: 460px; text-align: center; }
.plain-card img { border-radius: 14px; }
.plain-card h1 { font-size: 22px; margin: 14px 0 8px; }
.plain-card p { color: var(--muted); }
.plain-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }

/* ---------------------------------------------------------------- telefon */
@media (max-width: 760px) {
  .top { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .brand-name { display: none; }
  .today { font-size: 12.5px; }
  .hide-xs { display: none; }
  .top-actions .btn.sm { padding: 0 9px; }

  .tabs {
    display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
    padding: 10px max(16px, env(safe-area-inset-right)) 2px max(16px, env(safe-area-inset-left));
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px;
    border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 550; max-width: 60vw;
  }
  .tab-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }
  .tab.active .count { background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); }
  .tab.drop { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
  .tab-add { padding: 0 10px; }

  .board { display: block; padding: 10px max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); overflow: hidden; }
  .col { display: none; min-width: 0; height: 100%; border: 0; background: transparent; border-radius: 0; }
  .col.active { display: flex; }
  .col-head { display: none; }
  .col-add { padding: 0 0 10px; }
  .col-list { padding: 0 0 16px; }
  .col-new { display: none; }
  .card { padding: 11px 8px 11px 11px; }
  .card-title { font-size: 15px; }
  .play, .check { width: 34px; height: 34px; }

  .dock-main {
    display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "phase now" "ctl ctl";
    gap: 10px 14px; padding-top: 10px;
  }
  .phase { grid-area: phase; width: 74px; height: 74px; }
  .phase-clock { font-size: 18px; }
  .phase-label { font-size: 9.5px; max-width: 60px; }
  .now { grid-area: now; }
  .now-task { font-size: 16px; }
  .now-sub { font-size: 12.5px; }
  .controls { grid-area: ctl; display: grid; grid-template-columns: minmax(0, 1fr) 46px 46px 46px; }
  .ctl.primary { min-width: 0; }
  .timeline { height: 80px; }
  .tl-seg.break, .tl-seg.pause { height: 50px; }
  .tl-piece { height: 28px; top: 40px; }

  .sheet-backdrop { place-items: end stretch; padding: 0; }
  .sheet { width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
  .sheet.wide { width: 100%; }
  .sheet-body { padding: 4px 16px 18px; }
  .sheet-head { padding-left: 16px; }
  .field input, .field select, .field textarea, .add-input, .plan-add select { font-size: 16px; } /* iOS otomatik yakınlaştırma */
  .grid2 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; grid-template-areas: "dot main x" ". step move"; gap: 6px 10px; }
  .plan-row .plan-dot { grid-area: dot; }
  .plan-row .plan-main { grid-area: main; }
  .plan-row .plan-x { grid-area: x; }
  .plan-row .stepper { grid-area: step; justify-self: start; }
  .plan-row .plan-move { grid-area: move; }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .bar-track { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 360px) {
  .step-val { min-width: 80px; font-size: 12.5px; }
  .today { display: none; }
  .top { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* yalnızca fareli cihazlarda: dokunmatikte :hover dokunduktan sonra takılı kalır */
@media (hover: hover) {
  .icon-btn:hover:not(:disabled) { background: var(--surface2); color: var(--text); }
  .btn:not(.primary):not(.danger):hover:not(:disabled) { background: var(--surface3); }
  .btn.primary:hover:not(:disabled) { filter: brightness(1.06); background: var(--accent); }
  .btn.ghost:hover:not(:disabled) { background: var(--surface2); color: var(--text); }
  .col-new:hover { color: var(--text); border-color: var(--muted); }
  .card:hover { border-color: var(--line2); border-left-color: var(--tc); }
  .play:hover { color: var(--tc); border-color: var(--tc); }
  .check:hover { color: var(--break); border-color: var(--break); }
  .now-task:hover { color: var(--accent); }
  .ctl:not(.primary):hover:not(:disabled) { background: var(--surface3); }
  .ctl.primary:hover:not(:disabled) { filter: brightness(1.06); }
  .pick:hover { border-color: var(--tc); }
}
