/* Ajanda: mobil öncelikli arayüz */
:root {
  /* Kâğıt zemin, mürekkep yazı, ince çizgiler; tek vurgu mat bronz (bugün ve korumalı planlar). */
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #f1efea;
  --ink: #171717;
  --ink-2: #57534e;
  --ink-3: #8c877f;
  --line: #e6e2da;
  --line-strong: #d4cfc5;
  --accent: #171717;
  --accent-ink: #faf9f6;
  --accent-soft: #eeece6;
  --gold: #87672f;
  --gold-strong: #a8854c;
  --gold-soft: #f4eee2;
  --danger: #a3322a;
  --danger-soft: #f7ebe8;
  --ok: #2f6a4c;
  --shadow: none;
  --radius: 14px;
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f10;
    --surface: #18181a;
    --surface-2: #212124;
    --ink: #f1efea;
    --ink-2: #b4afa6;
    --ink-3: #7d7972;
    --line: #2a2a2d;
    --line-strong: #3a3a3e;
    --accent: #f1efea;
    --accent-ink: #121212;
    --accent-soft: #242427;
    --gold: #cdac77;
    --gold-strong: #c4a26c;
    --gold-soft: #29231a;
    --danger: #e58a7f;
    --danger-soft: #2f1c1a;
    --ok: #7ec3a0;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
  min-height: 100dvh;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
img { max-width: 100%; }
[hidden] { display: none !important; }
svg { flex-shrink: 0; }
.num { font-variant-numeric: tabular-nums; }

.splash { min-height: 100dvh; display: grid; place-items: center; background: #141414; }
.splash img { border-radius: 18px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* ------------------------------------------------------------- düğmeler */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 15px;
  text-decoration: none; user-select: none;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.secondary { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--ink-2);
  display: inline-grid; place-items: center;
}
.icon-btn:active { background: var(--surface-2); }
.text-btn { border: 0; background: none; color: var(--ink); font-weight: 600; padding: 8px 4px; font-size: 16px; }
.text-btn.muted { color: var(--ink-2); font-weight: 500; }

/* ------------------------------------------------------------- giriş */
.auth {
  min-height: 100dvh; display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--top) + 32px) 24px calc(var(--bottom) + 32px);
  background: #141414;
  color: #f1efea;
}
.auth-card { width: 100%; max-width: 380px; margin: 0 auto; }
.auth .logo { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 0 0 1px rgba(255,255,255,.1); }
.auth h1 { font-size: 30px; letter-spacing: -.025em; margin: 22px 0 6px; font-weight: 700; }
.auth p.lead { margin: 0 0 28px; color: #a9a49b; }
.auth label { display: block; font-size: 13px; color: #a9a49b; margin: 14px 0 6px; font-weight: 500; }
.auth input {
  width: 100%; height: 52px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05); color: #f1efea; padding: 0 16px; font-size: 17px; outline: none;
}
.auth input:focus { border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.08); }
.auth .btn { margin-top: 26px; background: #f1efea; color: #141414; min-height: 52px; font-size: 16px; }
.auth .err { color: #f0a297; min-height: 22px; margin-top: 12px; font-size: 14px; }
.auth .fine { color: #7d7972; font-size: 13px; margin-top: 18px; }

/* ------------------------------------------------------------- iskelet */
.shell { min-height: 100dvh; }
.col { min-width: 0; }
.top {
  position: sticky; top: 0; z-index: 20;
  padding: calc(var(--top) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  display: flex; align-items: center; gap: 8px;
}
.top .titles { flex: 1; min-width: 0; }
.top h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.025em; font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .sub { color: var(--ink-3); font-size: 13px; font-weight: 500; }
main { padding: 4px 16px calc(var(--nav-h) + var(--bottom) + 96px); max-width: 860px; margin: 0 auto; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 6px calc(var(--bottom) + 6px);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-top: 1px solid var(--line);
}
.tabs .brand, .tabs .side-new, .tabs .side-foot { display: none; }
.tab {
  border: 0; background: none; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; font-weight: 600; padding: 6px 0; border-radius: 12px; user-select: none;
}
.tab.on { color: var(--ink); }
.tab svg { width: 24px; height: 24px; }

.fab {
  position: fixed; right: 18px; bottom: calc(var(--nav-h) + var(--bottom) + 18px); z-index: 25;
  height: 52px; padding: 0 20px 0 16px; border-radius: 14px; border: 0;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 16px;
  display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
}
.fab:active { transform: scale(.97); }

/* ------------------------------------------------------------- kartlar */
.card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }
.section-label {
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  margin: 24px 2px 10px; display: flex; align-items: center; justify-content: space-between;
}
.section-label span:last-child { color: var(--ink-3); font-weight: 500; }
.notice {
  display: flex; gap: 12px; align-items: center; padding: 14px; margin: 10px 0;
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line);
}
.notice .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); }
.notice.gold .ic { background: var(--gold-soft); color: var(--gold); }
.notice .tx { flex: 1; min-width: 0; }
.notice strong { display: block; font-size: 15px; }
.notice span { display: block; font-size: 13px; color: var(--ink-2); }

/* hafta şeridi */
.week { display: flex; align-items: center; gap: 2px; margin: 4px -6px 0; }
.week .days { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day {
  border: 0; background: transparent; border-radius: 14px; padding: 8px 0 7px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink-2);
}
.day .wd { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.day .dn { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.day .dots { height: 6px; display: flex; gap: 3px; }
.day .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }
.day .dot.lock { background: var(--gold-strong); }
.day.today .dn { color: var(--gold); }
.day.on { background: var(--accent); }
.day.on .wd, .day.on .dn { color: var(--accent-ink); }
.day.on .dot { background: var(--accent-ink); }

/* plan kartı */
.plans { display: flex; flex-direction: column; gap: 10px; }
.plan {
  display: flex; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); width: 100%; text-align: left;
  background: var(--surface); border-radius: var(--radius); position: relative; overflow: hidden; color: var(--ink);
}
.plan:active { background: var(--surface-2); }
.plan.past { opacity: .5; }
.plan .time { width: 50px; flex-shrink: 0; font-variant-numeric: tabular-nums; padding-right: 12px; border-right: 1px solid var(--line); box-sizing: content-box; }
.plan .time b { display: block; font-size: 16px; font-weight: 600; }
.plan .time span { font-size: 13px; color: var(--ink-3); }
.plan .time b.word { font-size: 11.5px; line-height: 1.25; padding-top: 3px; white-space: nowrap; letter-spacing: -.02em; }
.plan .body { flex: 1; min-width: 0; }
.plan .ttl { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 6px; letter-spacing: -.01em; }
.plan .ttl .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan .meta { color: var(--ink-2); font-size: 13px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.plan .meta span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.plan .meta svg { width: 14px; height: 14px; }
.plan .date-tag { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.lock-ic { color: var(--gold); display: inline-flex; }
.lock-ic svg { width: 16px; height: 16px; }

.avatars { display: flex; margin-top: 8px; align-items: center; }
.avatars .av { margin-right: -5px; border: 2px solid var(--surface); }
.avatars .more { margin-left: 10px; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.av {
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 600; color: #fbfaf7; flex-shrink: 0; letter-spacing: .03em;
}
.av.lg { width: 44px; height: 44px; font-size: 15px; }
.av.xl { width: 64px; height: 64px; font-size: 22px; }

.empty { text-align: center; padding: 36px 20px; color: var(--ink-3); }
.empty svg { width: 40px; height: 40px; opacity: .6; }
.empty p { margin: 8px 0 16px; }

/* ay görünümü */
.month { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); padding: 10px 8px 8px; }
.month .head, .month .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month .head span { text-align: center; font-size: 12px; font-weight: 500; color: var(--ink-3); padding: 4px 0 8px; }
.mcell {
  border: 0; background: none; min-height: 52px; border-radius: 12px; padding: 6px 2px; min-width: 0; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink);
}
.mcell .n { font-size: 15px; font-weight: 500; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.mcell.out { color: var(--ink-3); opacity: .5; }
.mcell.today .n { color: var(--gold); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--gold-strong); }
.mcell.on .n { background: var(--accent); color: var(--accent-ink); box-shadow: none; font-weight: 600; }
.mcell .dots { display: flex; gap: 3px; height: 6px; }
.mcell .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }
.mcell .dot.lock { background: var(--gold-strong); }
.mcell .items { display: none; }

/* listeler */
.list { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; border: 0; background: none; text-align: left;
  border-bottom: 1px solid var(--line); min-height: 60px;
}
.row:last-child { border-bottom: 0; }
.row .tx { flex: 1; min-width: 0; }
.row .tx strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .tx span { display: block; font-size: 13px; color: var(--ink-2); }
.row .end { color: var(--ink-3); display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.badge { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.badge.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.badge.bad { background: var(--danger-soft); color: var(--danger); }

.set-card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); padding: 16px; margin-bottom: 12px; }
.set-card h3 { margin: 0 0 4px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.set-card p { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; }
.set-card .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.profile { display: flex; align-items: center; gap: 14px; }
.profile strong { font-size: 18px; display: block; }
.profile span { color: var(--ink-2); font-size: 14px; }

/* ------------------------------------------------------------- alt sayfa (sheet) */
.backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(12, 12, 12, .42);
  display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease;
}
.sheet {
  background: var(--surface); width: 100%; max-height: calc(100dvh - var(--top) - 10px);
  border-radius: 20px 20px 0 0; display: flex; flex-direction: column; overflow: hidden;
  animation: up .28s cubic-bezier(.2, .9, .3, 1);
}
.sheet.full { height: calc(100dvh - var(--top) - 10px); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--line); min-height: 56px; position: relative;
}
.sheet-head::before {
  content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px;
  border-radius: 4px; background: var(--line);
}
.sheet-head h2 { font-size: 17px; margin: 0; position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.sheet-body { overflow-y: auto; padding: 16px 16px calc(var(--bottom) + 24px); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

/* form */
.title-input {
  width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 6px 2px 12px;
  font-size: 22px; font-weight: 600; letter-spacing: -.015em; outline: none; border-radius: 0;
}
.title-input:focus { border-color: var(--ink); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.fields .fld:first-child { grid-column: 1 / -1; }
@media (min-width: 720px) { .fields { grid-template-columns: 1.4fr 1fr 1fr; } .fields .fld:first-child { grid-column: auto; } }
/* birkaç gün süren plan: başlangıç tarihi + saat, bitiş tarihi + saat */
.fields.multi { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.fields.multi .fld:first-child { grid-column: auto; }
@media (min-width: 720px) { .fields.multi { grid-template-columns: 1.4fr 1fr 1.4fr 1fr; } }
.fields.multi.dates { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.opts { margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.opts .opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 10px 8px 14px; font-size: 15px; font-weight: 500; cursor: pointer; }
.opts .opt + .opt { border-top: 1px solid var(--line); }
.fld { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; color: var(--ink-2); min-width: 0; }
.input, .fld input, textarea.input {
  width: 100%; min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
  padding: 10px 12px; font-size: 16px; outline: none; color: var(--ink); min-width: 0;
}
.input:focus, .fld input:focus { border-color: var(--ink-3); background: var(--surface); }
.fld input[type="date"], .fld input[type="time"] { -webkit-appearance: none; appearance: none; text-align: left; }
textarea.input { resize: vertical; min-height: 88px; line-height: 1.45; }
.with-ic { position: relative; margin-top: 10px; }
.with-ic svg { position: absolute; left: 12px; top: 13px; width: 20px; height: 20px; color: var(--ink-3); }
.with-ic .input { padding-left: 40px; }

.group { margin-top: 22px; }
.group > h3 { font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; }
.group > h3 .count { color: var(--ink); font-variant-numeric: tabular-nums; }
.hint { font-size: 13px; color: var(--ink-2); margin: 6px 2px 0; }
.hint.gold { color: var(--gold); }

.pick { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; max-height: 300px; overflow-y: auto; }
.pick label { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pick label:last-child { border-bottom: 0; }
.pick .tx { flex: 1; min-width: 0; }
.pick .tx strong { display: block; font-weight: 600; font-size: 15px; }
.pick .tx span { display: block; font-size: 13px; color: var(--ink-2); }
.check {
  appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line-strong);
  display: grid; place-items: center; margin: 0; flex-shrink: 0; background: var(--surface);
}
.check:checked { background: var(--accent); border-color: var(--accent); }
.check:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }

.lock-box {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2);
}
.lock-box.on { border-color: var(--gold-strong); background: var(--gold-soft); }
.lock-box .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.lock-box.on .ic { color: var(--gold); }
.lock-box .tx { flex: 1; }
.lock-box strong { display: block; }
.lock-box span { display: block; font-size: 13px; color: var(--ink-2); }
.switch {
  appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 30px; background: var(--line);
  position: relative; margin: 0; flex-shrink: 0; transition: background .2s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s;
}
.switch:checked { background: var(--gold-strong); }
.switch.blue:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink-2); border-radius: 10px;
  padding: 8px 14px; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; user-select: none;
}
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.files { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.file {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--line); text-decoration: none; color: inherit; min-width: 0;
}
.file .thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--line); display: grid; place-items: center; color: var(--ink-2); flex-shrink: 0; }
.file .thumb.pdf { background: var(--surface); border: 1px solid var(--line); color: var(--danger); font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.file .tx { flex: 1; min-width: 0; }
.file .tx strong { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .tx span { font-size: 12px; color: var(--ink-3); }
.file.pending { border-style: dashed; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 8px; }
.gallery a { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--line); }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* detay */
.detail-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  padding: 5px 10px; border-radius: 8px; background: var(--gold-soft); color: var(--gold);
}
.detail-badge svg { width: 15px; height: 15px; }
.detail h2.big { font-size: 26px; font-weight: 700; letter-spacing: -.025em; margin: 12px 0 14px; line-height: 1.2; overflow-wrap: anywhere; }
.info { display: flex; gap: 12px; padding: 10px 0; align-items: flex-start; }
.info > svg { width: 22px; height: 22px; color: var(--ink-3); margin-top: 1px; }
.info .tx { flex: 1; min-width: 0; }
.info strong { display: block; font-weight: 600; }
.info span { color: var(--ink-2); font-size: 14px; }
.notes { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--ink); font-size: 15px; overflow-wrap: anywhere; }
.people-list { display: flex; flex-direction: column; gap: 10px; }
.person { display: flex; align-items: center; gap: 10px; }
.person .tx strong { display: block; font-size: 15px; font-weight: 600; }
.person .tx span { font-size: 13px; color: var(--ink-2); }
.foot-actions { display: flex; gap: 10px; margin-top: 26px; }
.foot-actions .btn { flex: 1; }

/* yükleme kurulumu */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 8px 0 0; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(s); width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--ink);
  display: grid; place-items: center; font-weight: 600; font-size: 14px; flex-shrink: 0;
}
.steps .k { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; }
.steps .k svg { width: 16px; height: 16px; color: #2f7cf6; }

/* ------------------------------------------------------------- alarm ekranı */
.alarm {
  position: fixed; inset: 0; z-index: 100; color: #fff; text-align: center;
  background: #0f0f10;
  display: flex; flex-direction: column; align-items: center; justify-content: safe center;
  padding: calc(var(--top) + 24px) 24px calc(var(--bottom) + 24px); animation: fade .25s ease;
  overflow-y: auto; overscroll-behavior: contain;
}
.alarm.locked { background: #12110e; }
.alarm .ring { position: relative; width: 96px; height: 96px; display: grid; place-items: center; margin-bottom: 26px; }
.alarm .bell {
  width: 80px; height: 80px; border-radius: 50%; border: 1px solid rgba(241, 239, 234, .22); color: #f1efea;
  display: grid; place-items: center; animation: shake 1.4s ease-in-out infinite;
}
.alarm.locked .bell { border-color: rgba(205, 172, 119, .45); color: #cdac77; }
.alarm .bell svg { width: 34px; height: 34px; stroke-width: 1.6; }
@keyframes shake { 0%, 44%, 100% { transform: rotate(0); } 8%, 24% { transform: rotate(-9deg); } 16%, 32% { transform: rotate(9deg); } }
.alarm .when { font-size: 15px; font-weight: 500; color: #cdac77; }
.alarm .clock { font-size: 76px; font-weight: 200; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1.05; margin: 6px 0 10px; color: #f6f4ef; }
.alarm .clock.word { font-size: 52px; letter-spacing: -.02em; }
.alarm h2 { font-size: 24px; font-weight: 600; letter-spacing: -.015em; margin: 0 0 6px; max-width: 520px; overflow-wrap: anywhere; color: #f6f4ef; }
.alarm .where { color: #a9a49b; margin: 0; }
.alarm .call { margin: 28px auto 0; max-width: 420px; font-size: 17px; line-height: 1.5; color: #dedad2; padding: 14px 18px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.alarm .acts { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 360px; margin-top: 30px; }
.alarm .btn.primary { background: #f1efea; color: #141414; min-height: 56px; font-size: 17px; }
.alarm .btn.quiet { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: #f1efea; }

/* bildirim */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--bottom) + 88px); transform: translateX(-50%); z-index: 120;
  background: #171717; color: #faf9f6; padding: 12px 18px; border-radius: 12px; font-size: 15px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); max-width: calc(100vw - 32px); animation: up .25s ease;
}
#toast.err { background: var(--danger); }
@media (prefers-color-scheme: dark) { #toast { background: #f1efea; color: #121212; } }

/* ------------------------------------------------------------- masaüstü */
@media (min-width: 720px) {
  .backdrop { align-items: center; padding: 24px; }
  .sheet { max-width: 620px; border-radius: 22px; max-height: min(88vh, 900px); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
  .sheet.full { height: auto; }
  .sheet-head::before { display: none; }
  .mcell { min-height: 76px; }
}
@media (min-width: 1000px) {
  :root { --nav-h: 0px; }
  .shell { display: grid; grid-template-columns: 264px 1fr; }
  .tabs {
    position: sticky; top: 0; height: 100dvh; grid-template-columns: none; display: flex; flex-direction: column; gap: 4px;
    padding: 24px 16px; border-top: 0; border-right: 1px solid var(--line); background: var(--surface);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .tabs .brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; letter-spacing: -.02em; padding: 0 8px 18px; }
  .tabs .brand img { width: 36px; height: 36px; border-radius: 10px; }
  .tabs .side-new { display: flex; margin: 0 0 16px; }
  .tabs .side-foot { display: block; margin-top: auto; padding: 12px 8px 0; font-size: 13px; color: var(--ink-3); border-top: 1px solid var(--line); }
  .tab { flex-direction: row; gap: 12px; font-size: 15px; padding: 11px 12px; justify-content: flex-start; color: var(--ink-2); }
  .tab svg { width: 22px; height: 22px; }
  .tab.on { background: var(--surface-2); color: var(--ink); }
  .tab:hover:not(.on) { background: var(--surface-2); }
  .fab { display: none; }
  .top { padding: 28px 32px 14px; }
  .top h1 { font-size: 30px; }
  main { padding: 4px 32px 48px; max-width: 980px; margin: 0; }
  #toast { bottom: 32px; }
  .agenda-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .mcell { min-height: 108px; align-items: stretch; padding: 6px; border: 1px solid transparent; }
  .mcell:hover { background: var(--surface-2); }
  .mcell .n { align-self: flex-end; width: 28px; height: 28px; font-size: 14px; }
  .mcell { border-radius: 10px; }
  .mcell .dots { display: none; }
  .mcell .items { display: flex; flex-direction: column; gap: 3px; width: 100%; }
  .mcell .it {
    font-size: 12px; text-align: left; padding: 2px 6px; border-radius: 5px; background: var(--surface-2); color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500;
  }
  .mcell .it.lock { background: var(--gold-soft); color: var(--gold); }
  .mcell .it.more { background: none; color: var(--ink-3); }
}
@media (min-width: 1300px) {
  main { max-width: 1200px; }
}

/* ses ayarları */
.set-card.sound .fld { margin-top: 12px; }
.set-card.sound .actions { margin-top: 16px; }
.set-card.sound .hint { margin-top: 6px; }
select.input { -webkit-appearance: none; appearance: none; padding-right: 36px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b91a0' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 20px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.seg .chip { padding: 8px 12px; font-size: 14px; min-height: 40px; color: var(--ink-2); }
.seg .chip.on { color: var(--accent-ink); }

/* küçük ya da yatay ekranlarda alarm sığsın */
@media (max-height: 720px) {
  .alarm .ring { width: 84px; height: 84px; margin-bottom: 14px; }
  .alarm .bell { width: 60px; height: 60px; }
  .alarm .bell svg { width: 30px; height: 30px; }
  .alarm .clock { font-size: 46px; }
  .alarm .clock.word { font-size: 36px; }
  .alarm .call { margin-top: 14px; padding: 10px 14px; font-size: 16px; }
  .alarm .acts { margin-top: 16px; }
}
.alarm .more-alarms { margin-top: 14px; font-size: 14px; color: #cdac77; }

/* iOS durum çubuğu (black-translucent) beyaz yazı kullanır: açık temada arkasına koyu şerit */
body::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: var(--top); background: #141414; z-index: 40;
  pointer-events: none;
}

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ellipsis { max-width: calc(100% - 120px); overflow: hidden; text-overflow: ellipsis; }
.end-hint { color: var(--gold); font-weight: 700; }
.range-err { color: var(--danger); font-weight: 600; }
.fld > .nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fld > .end-hint:empty { display: none; } /* boşken alanı aşağı itmesin (saat alanları hizalı kalsın) */
button.file { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.gallery button { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--line); border: 0; padding: 0; cursor: pointer; }
.gallery button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .heic { display: grid; place-items: center; height: 100%; font-weight: 800; color: var(--ink-2); font-size: 13px; }

/* ek görüntüleyici */
.viewer { flex: 1; min-height: 0; background: var(--surface-2); display: flex; }
.viewer.img { overflow: auto; align-items: center; justify-content: center; padding: 8px; -webkit-overflow-scrolling: touch; }
.viewer.img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.viewer.pdf iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.viewer-acts { display: flex; gap: 8px; padding: 10px 12px calc(var(--bottom) + 10px); border-top: 1px solid var(--line); }
.viewer-acts .btn { flex: 1; }
@media (min-width: 720px) { .sheet.full:has(.viewer) { height: min(88vh, 900px); } }
.badge svg { width: 12px; height: 12px; vertical-align: -2px; margin-right: 2px; }

/* arama */
.search-bar {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 10px 0 4px; padding: 0 14px; height: 44px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink-3); font-size: 15px; text-align: left;
}
.search-bar svg { width: 20px; height: 20px; }
.search-box { position: relative; margin: 6px 0 4px; }
.search-box svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-3); pointer-events: none; }
.search-box .input { padding-left: 42px; height: 50px; font-size: 17px; }
.search-box .input::-webkit-search-decoration { -webkit-appearance: none; }

/* takvim: hafta / ay */
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 12px; }
.cal-bar .seg { margin: 0; }
.cal-bar .chip { min-width: 72px; justify-content: center; }
.week-list .section-label { margin-top: 18px; }
.week-list .wk-day:first-child .section-label { margin-top: 4px; }
.wk-day.today .section-label { color: var(--ink); }
.today-tag { background: var(--gold-soft); color: var(--gold); border-radius: 6px; padding: 2px 7px; margin-right: 6px; font-size: 12px; font-weight: 600; }
.wk-empty {
  display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 14px; min-height: 46px;
  border: 1px dashed var(--line); border-radius: 12px; background: transparent; color: var(--ink-3); font-size: 14px;
}
.wk-empty .add { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-weight: 600; }
.wk-empty svg { width: 16px; height: 16px; }

/* kim gördü */
.plan .meta .seen-meta { color: var(--gold); font-weight: 600; }
.plan .meta .seen-meta.all { color: var(--ok); }
.person > .badge { margin-left: auto; display: inline-flex; align-items: center; }
.person .tx { min-width: 0; flex: 1; }

/* ayarlar: ek bölümler, giriş bilgileri */
details.more { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; color: var(--ink); font-weight: 600; font-size: 14px; padding: 4px 0; }
details.more .input { width: 100%; font-size: 13px; }
textarea.creds { width: 100%; font-size: 14px; line-height: 1.5; min-height: 210px; background: var(--surface-2); }
.cred-acts { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 4px; }
.top.compact h1 { font-size: 22px; }
@media (max-width: 400px) { .top.mon h1 { font-size: 24px; } } /* "Ağustos" oklarla sığsın */
.section-label span:last-child { white-space: nowrap; margin-left: 8px; }
/* kişi satırı: bildirim durumu ismin altında */
.row .tx .dev { margin-top: 4px; }
.cal-nav { display: flex; align-items: center; }
.row .tx .dev .badge { display: inline-flex; align-items: center; font-size: 11px; }
.row .tx .dev .badge.ok { color: var(--ok); }
.row .tx .dev .badge.bad { color: var(--danger); }

/* takvim: gün penceresi */
.month-hint { text-align: center; color: var(--ink-3); font-size: 13px; margin: 14px 0 0; }
.day-sheet .day-count { margin: 0 2px 10px; color: var(--ink-3); font-size: 13px; }
.day-sheet .day-empty { margin: 8px 2px 0; color: var(--ink-2); font-size: 15px; text-align: center; padding: 18px 0 6px; }

/* odak çerçevesi: tarayıcının mavisi yerine sade bir halka */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink-3); outline-offset: 2px; }
.alarm .btn:focus-visible { outline: 2px solid rgba(241, 239, 234, .55); outline-offset: 3px; }

/* masaüstü ay ızgarası: ince çizgili, numaralar ve gün adları sağa hizalı */
@media (min-width: 1000px) {
  .month { padding: 0; overflow: hidden; }
  .month .head span { text-align: right; padding: 12px 12px 10px; }
  .month .grid { gap: 0; }
  .mcell { border: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 0; padding: 8px; }
  .mcell:nth-child(7n + 1) { border-left: 0; }
  .mcell:hover { background: var(--surface-2); }
  .mcell.out { opacity: 1; color: var(--ink-3); background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
  .mcell.out .n { opacity: .6; }
}
.profile .av { color: #fbfaf7; }

/* ------------------------------------------------------------- alarm rehberi ve masa modu */
.set-card .steps { margin: 0 0 14px; }
.set-card .steps li { align-items: flex-start; padding: 10px 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.set-card .steps li b { color: var(--ink); font-weight: 600; }
.set-card .actions + .hint { margin-top: 12px; }

.desk {
  position: fixed; inset: 0; z-index: 90; background: #0b0b0c; color: #f1efea;
  display: flex; flex-direction: column; padding: calc(var(--top) + 14px) 22px calc(var(--bottom) + 22px);
  animation: fade .25s ease; overflow-y: auto; overscroll-behavior: contain;
}
.desk-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.desk-state { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #a9a49b; }
.desk-state .pulse { width: 8px; height: 8px; border-radius: 50%; background: #cdac77; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.desk .btn.quiet { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: #f1efea; }
.desk-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 220px; }
.desk-clock { font-size: clamp(84px, 30vw, 168px); font-weight: 200; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; color: #f6f4ef; }
.desk-date { margin-top: 10px; font-size: 18px; color: #a9a49b; }
.desk-next {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 16px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); max-width: 520px; width: 100%; margin: 0 auto;
}
.desk-next .lbl { font-size: 13px; color: #cdac77; }
.desk-next strong { font-size: 20px; font-weight: 600; overflow-wrap: anywhere; display: flex; align-items: center; gap: 8px; }
.desk-next strong svg { width: 18px; height: 18px; color: #cdac77; }
.desk-next span:last-child:not(.lbl) { color: #a9a49b; font-size: 15px; }
.desk-hint { margin: 14px auto 0; max-width: 520px; text-align: center; font-size: 13px; line-height: 1.5; color: #77736b; }
@media (orientation: landscape) and (max-height: 500px) {
  .desk-clock { font-size: clamp(72px, 22vh, 140px); }
  .desk-mid { min-height: 0; }
}
