/* Yerleşim: tek sütun (telefon) → model sayfasında solda yapışkan model kartı + sağda not akışı (masaüstü).
   Dünya: kalıp kartonu (soluk gri-yeşil), tükenmez kalem mavisi, düzeltme için kırmızı-turuncu işaret kalemi. */
:root {
  --paper: #eceee9;
  --surface: #fbfcfa;
  --sunk: #e2e5df;
  --ink: #1b2230;
  --muted: #5b6370;
  --line: #cdd2ca;
  --pen: #2443c8;
  --pen-soft: #e3e8fb;
  --fix: #c2410c;
  --fix-soft: #fbe9df;
  --ok: #2c7a4b;
  --ok-soft: #e1f1e6;
  --grid: rgba(36, 67, 200, 0.07);
  --shadow: 0 1px 2px rgba(27, 34, 48, 0.06), 0 4px 14px rgba(27, 34, 48, 0.05);

  --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --r: 10px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #13161b;
    --surface: #1b1f26;
    --sunk: #23282f;
    --ink: #e7eaef;
    --muted: #9aa3b0;
    --line: #2f3540;
    --pen: #8299ff;
    --pen-soft: #252d4d;
    --fix: #ff8a5c;
    --fix-soft: #3a2219;
    --ok: #62c58d;
    --ok-soft: #1a3226;
    --grid: rgba(130, 153, 255, 0.07);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #13161b;
  --surface: #1b1f26;
  --sunk: #23282f;
  --ink: #e7eaef;
  --muted: #9aa3b0;
  --line: #2f3540;
  --pen: #8299ff;
  --pen-soft: #252d4d;
  --fix: #ff8a5c;
  --fix-soft: #3a2219;
  --ok: #62c58d;
  --ok-soft: #1a3226;
  --grid: rgba(130, 153, 255, 0.07);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.55 var(--f-body);
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
body.modal-open { overflow: hidden; }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: var(--pen); }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; line-height: 1.15; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Üst çubuk ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  background: var(--surface); z-index: 30;
}
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1120px; margin: 0 auto;
  padding: 10px var(--gutter-r) 10px var(--gutter-l);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand span { font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.tabs { display: flex; gap: 4px; background: var(--sunk); padding: 3px; border-radius: 999px; }
.tabs a {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; text-decoration: none;
  color: var(--muted); font-weight: 500; font-size: 14px; white-space: nowrap;
}
.tabs a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--fix); color: #fff; font: 600 12px/20px var(--f-mono); text-align: center;
}
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px;
  color: var(--muted); text-decoration: none;
}
.icon-btn:hover, .icon-btn[aria-current="page"] { background: var(--sunk); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
@media (max-width: 640px) {
  .tabs { order: 3; width: 100%; }
  .tabs a { flex: 1; justify-content: center; }
}

/* ---------- Sayfa ---------- */
.page {
  max-width: 1120px; margin: 0 auto;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  padding-block: 24px 80px;
}
.page.narrow { max-width: 760px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: clamp(28px, 5vw, 38px); font-weight: 700; letter-spacing: -0.02em; }
.lede { margin: 6px 0 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.lede-fix { color: var(--fix); font-weight: 600; }

/* ---------- Düğmeler ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.primary { background: var(--pen); border-color: var(--pen); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--sunk); color: var(--ink); }
.btn.danger { color: var(--fix); }
.btn.danger-solid { background: var(--fix); border-color: var(--fix); color: #fff; }
.btn.sm { min-height: 34px; padding: 5px 12px; font-size: 14px; }
.btn.icon-only { padding: 5px 9px; }
.btn.fix-done {
  background: var(--ok); border-color: var(--ok); color: #fff; font-weight: 600;
  min-height: 36px; padding: 6px 16px;
}
.btn.fix-done:hover { filter: brightness(1.08); }
:root[data-theme="dark"] .btn.fix-done, :root[data-theme="dark"] .btn.primary { color: #0f1320; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn.fix-done,
  :root:not([data-theme="light"]) .btn.primary,
  :root:not([data-theme="light"]) .btn.danger-solid { color: #0f1320; }
}
label.btn { cursor: pointer; }

/* ---------- Arama ---------- */
.filters { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px;
  color: var(--muted);
}
.search:focus-within { border-color: var(--pen); }
.search input { flex: 1; min-width: 0; border: 0; background: none; padding: 10px 0; outline: none; color: var(--ink); }
.filters select, .field input, .field select, .field textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; color: var(--ink);
}
.filters select { border-radius: 999px; padding-inline: 14px; }

/* ---------- Model kartları ---------- */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.model-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; text-decoration: none; color: var(--ink);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.model-card:hover { border-color: var(--pen); box-shadow: var(--shadow); transform: translateY(-2px); }
.cover { aspect-ratio: 16 / 10; background: var(--sunk); max-width: 100%; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-ph {
  display: grid; place-items: center; position: relative;
  background-color: var(--sunk);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 12px 12px;
}
.cover-ph::after {
  content: ""; position: absolute; inset: 12px; border: 1.5px dashed color-mix(in srgb, var(--pen) 45%, transparent); border-radius: 6px;
}
.cover-ph span { font: 600 clamp(18px, 4vw, 24px)/1 var(--f-mono); color: var(--pen); letter-spacing: 0.04em; }
.mc-body { padding: 14px 16px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.code { font: 500 12.5px var(--f-mono); color: var(--muted); letter-spacing: 0.03em; }
.model-card h3 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; margin-top: 2px; }
.mc-sub { margin: 0; color: var(--muted); font-size: 14px; }
.mc-foot {
  display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px;
  font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.mc-ago { margin-left: auto; }
.fix-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--fix-soft); color: var(--fix); font-weight: 600; font-size: 12.5px;
  padding: 2px 9px; border-radius: 999px; white-space: nowrap;
}
.sample-tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
  font: 600 10.5px var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 4px;
}
.sample-tag.inline { position: static; }

.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 2px 9px 2px 8px; border: 1px solid var(--line); border-radius: 999px;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-arge { color: var(--pen); }
.st-numune { color: #b7791f; }
.st-revize { color: var(--fix); }
.st-onay { color: var(--ok); }
.st-uretim { color: var(--ink); }

/* ---------- Boş durumlar ---------- */
.empty {
  border: 1.5px dashed var(--line); border-radius: var(--r);
  padding: 36px 24px; text-align: center; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  grid-column: 1 / -1;
}
.empty h2 { color: var(--ink); font-size: 22px; }
.empty p { max-width: 52ch; margin: 0; }
.empty.small { padding: 24px 18px; font-size: 14px; }

/* ---------- Model sayfası ---------- */
.back {
  display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px;
  color: var(--muted); text-decoration: none; font-weight: 500;
}
.back:hover { color: var(--ink); }
.model-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 900px) {
  .model-layout { grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
  .model-info { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 76px); }
}
.model-info {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.info-cover { position: relative; }
.cover-btn {
  position: absolute; right: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  background: color-mix(in srgb, var(--surface) 90%, transparent); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 11px; font-size: 13px; cursor: pointer; color: var(--ink);
}
.info-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.info-body h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.info-brand { margin: -6px 0 0; color: var(--muted); font-weight: 500; }
.info-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.info-stats div { padding: 8px 10px; display: flex; flex-direction: column; }
.info-stats div + div { border-left: 1px solid var(--line); }
.info-stats b { font: 600 20px var(--f-mono); font-variant-numeric: tabular-nums; }
.info-stats span { font-size: 12px; color: var(--muted); }
.info-stats .is-fix { background: var(--fix-soft); }
.info-stats .is-fix b, .info-stats .is-fix span { color: var(--fix); }
.specs { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.specs div { min-width: 0; }
.specs dt { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.specs dd { margin: 1px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.info-extra { display: flex; flex-direction: column; gap: 10px; }
.info-toggle {
  display: none; align-items: center; gap: 4px; align-self: flex-start;
  background: none; border: 0; padding: 2px 0; color: var(--pen); font-weight: 500; cursor: pointer;
}
.info-toggle[aria-expanded="true"] svg { transform: rotate(-90deg); }
.info-toggle:not([aria-expanded="true"]) svg { transform: rotate(90deg); }
@media (max-width: 899px) {
  .info-toggle { display: inline-flex; }
  .info-extra:not(.open) { display: none; }
  .info-cover .cover { aspect-ratio: 16 / 6; }
  .info-body h1 { font-size: 23px; }
}
.info-desc { margin: 0; font-size: 14px; color: var(--ink); white-space: pre-wrap; }
.info-date { margin: 0; font-size: 12.5px; color: var(--muted); }
.info-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Not yazma alanı ---------- */
.composer {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow); transition: border-color .15s;
}
.composer:focus-within { border-color: var(--pen); }
.composer.is-fix { border-color: var(--fix); box-shadow: 0 0 0 3px var(--fix-soft); }
.composer.drop { border-style: dashed; border-color: var(--pen); background: var(--pen-soft); }
.composer-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ch-title { font-family: var(--f-display); font-weight: 650; font-size: 16px; }
.ch-now { font: 12.5px var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.ch-now b { color: var(--ink); font-weight: 600; }
.composer textarea {
  width: 100%; min-height: 84px; resize: vertical; border: 0; outline: none; background: transparent;
  font-size: 16px; line-height: 1.55; padding: 0;
}
.live { margin: 0; font-size: 14px; color: var(--pen); font-style: italic; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  padding: 3px 11px; border-radius: 999px; font-size: 13px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--pen-soft); border-color: var(--pen); color: var(--pen); font-weight: 600; }
.composer-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }
.tools { display: flex; gap: 4px; flex-wrap: wrap; margin-right: auto; }
.tool {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: none; border: 0; color: var(--muted); padding: 7px 10px; border-radius: 8px; font-size: 14px; font-weight: 500;
}
.tool:hover { background: var(--sunk); color: var(--ink); }
.tool.active { background: var(--pen-soft); color: var(--pen); }
.composer-submit { display: flex; align-items: center; gap: 12px; margin-left: auto; }
@media (max-width: 520px) {
  .tool span { display: none; }
  .tool { padding: 9px 11px; }
  .tool svg { width: 21px; height: 21px; }
}

/* Düzeltme anahtarı */
.fix-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; font-size: 14px; user-select: none; }
.fix-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch {
  width: 36px; height: 21px; border-radius: 999px; background: var(--line); position: relative; flex: none;
  transition: background .15s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--surface); transition: transform .15s;
}
.fix-toggle input:checked + .switch { background: var(--fix); }
.fix-toggle input:checked + .switch::after { transform: translateX(15px); }
.fix-toggle input:checked ~ span:last-child { color: var(--fix); }
.fix-toggle input:focus-visible + .switch { outline: 2px solid var(--pen); outline-offset: 2px; }

/* Ses kaydı çubuğu */
.rec-bar {
  display: grid; grid-template-columns: auto auto 1fr; grid-template-areas: "dot time actions" "live live live";
  align-items: center; gap: 8px 10px;
  background: var(--fix-soft); border-radius: 8px; padding: 10px 12px;
}
.rec-dot { grid-area: dot; width: 12px; height: 12px; border-radius: 50%; background: var(--fix); animation: pulse 1.2s infinite; }
.rec-time { grid-area: time; font: 600 15px var(--f-mono); color: var(--fix); font-variant-numeric: tabular-nums; }
.rec-actions { grid-area: actions; display: flex; gap: 6px; justify-content: flex-end; }
.rec-live { grid-area: live; margin: 0; font-size: 14px; color: var(--ink); }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } * { transition: none !important; } }

/* Eklenmeyi bekleyen ekler */
.pending, .e-atts { display: flex; flex-wrap: wrap; gap: 8px; }
.p-img { position: relative; width: 92px; height: 92px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-x {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer;
  background: rgba(15, 18, 25, 0.7); color: #fff;
}
.p-x.static { position: static; flex: none; }
.p-x svg { width: 14px; height: 14px; }
.p-audio {
  flex: 1 1 100%; display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--paper);
}
.p-audio .field { width: 100%; }
.hint { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Not filtresi ---------- */
.note-tabs { display: flex; gap: 2px; margin: 26px 0 6px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.ntab {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 8px 12px; cursor: pointer; color: var(--muted); font-weight: 500;
}
.ntab span { font: 600 12px var(--f-mono); background: var(--sunk); padding: 1px 7px; border-radius: 999px; }
.ntab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--pen); }
.ntab.has-fix span { background: var(--fix); color: #fff; }

/* ---------- Not kartları ---------- */
.note-list { display: flex; flex-direction: column; gap: 12px; }
.day {
  font: 600 13px var(--f-body); color: var(--muted); text-transform: none;
  margin: 14px 0 -2px; display: flex; align-items: baseline; gap: 8px;
}
.day span { font-weight: 400; }
.note {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 10px;
  border-left-width: 4px;
}
.note-open { border-left-color: var(--fix); }
.note-fixed { border-left-color: var(--ok); }
.note-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.note-flags { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.flag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600;
  padding: 2px 9px 2px 7px; border-radius: 999px; text-decoration: none;
}
.flag svg { width: 13px; height: 13px; stroke-width: 2.2; }
.flag-fix { background: var(--fix-soft); color: var(--fix); }
.flag-ok { background: var(--ok-soft); color: var(--ok); font-variant-numeric: tabular-nums; }
.flag-model { background: var(--pen-soft); color: var(--pen); }
.tag { font-size: 12.5px; color: var(--muted); padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; }
.stamp {
  flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right;
  font-family: var(--f-mono); line-height: 1.25; font-variant-numeric: tabular-nums;
}
.st-day { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.st-time { font-size: 15px; font-weight: 600; color: var(--ink); }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; }
.note-fixed .note-text { color: var(--muted); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.thumb { padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; background: var(--sunk); max-width: 100%; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.clip { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.clip-row { display: flex; align-items: center; gap: 8px; width: 100%; }
.clip-ico { color: var(--pen); display: grid; }
.clip-row audio { flex: 1; min-width: 0; height: 36px; }
.clip-dur { font: 12.5px var(--f-mono); color: var(--muted); }
.transcript {
  margin: 0; font-size: 14.5px; padding: 8px 12px; background: var(--paper); border-radius: 8px; width: 100%;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.tr-label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 2px; }
.note-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.note-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.edited { font: 11.5px var(--f-mono); color: var(--muted); }

/* ---------- Düzeltilecekler ---------- */
.fix-group { margin-bottom: 28px; }
.fg-head {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink);
  margin-bottom: 10px; padding: 4px 0;
}
.fg-cover { width: 56px; height: 42px; border-radius: 6px; overflow: hidden; flex: none; aspect-ratio: auto; }
.fg-cover img { width: 100%; height: 100%; object-fit: cover; }
.fg-cover.cover-ph::after { inset: 4px; }
.fg-cover.cover-ph span { font-size: 10px; }
.fg-title { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.fg-title strong { font-family: var(--f-display); font-size: 19px; font-weight: 650; }
.fg-title span { font-size: 13px; color: var(--muted); font-family: var(--f-mono); }
.fg-head:hover strong { color: var(--pen); }
.recent-fixed { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 16px; }
.recent-fixed summary { cursor: pointer; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.recent-fixed summary span { font: 600 12px var(--f-mono); background: var(--ok-soft); color: var(--ok); padding: 1px 7px; border-radius: 999px; margin-left: 4px; }

/* ---------- Ayarlar ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 20px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px;
}
.panel h2 { font-size: 19px; }
.panel h3 { font-size: 16px; margin-top: 8px; }
.panel p { margin: 0; max-width: 65ch; }
.opt { font: 500 11px var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-left: 6px; }
.meta-line { color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--pen); }
.field textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.span2 { grid-column: 1 / -1; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- Pencere ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 50; background: rgba(12, 15, 22, 0.5);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  overflow-y: auto;
}
@media (min-width: 640px) { .modal-back { align-items: center; } }
.modal {
  width: 100%; max-width: 460px; background: var(--surface); border-radius: 14px;
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); margin: auto 0;
}
.modal.wide { max-width: 640px; }
.modal h2 { font-size: 21px; }
.modal-sub { margin: -6px 0 0; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.modal textarea#e-text { font-size: 15.5px; }
.modal > label.btn { align-self: flex-start; }

/* ---------- Fotoğraf görüntüleyici ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 60; background: rgba(8, 10, 14, 0.94);
  display: grid; place-items: center; padding: 56px 16px;
}
.lightbox img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 4px; }
.lb-btn {
  position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.12); color: #fff;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.22); }
.lb-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); }
.lb-prev { left: max(12px, env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); }
.lb-next { right: max(12px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); color: #fff; font: 13px var(--f-mono); }

/* ---------- Bildirim ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast button { background: none; border: 0; color: var(--pen-soft); font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }

/* ---------- Eşitleme durumu ---------- */
.sync-chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  border-radius: 999px; padding: 5px 12px 5px 10px; font-size: 13px; font-weight: 500; white-space: nowrap;
}
.sync-chip:hover { color: var(--ink); border-color: var(--muted); }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.sync-chip[data-state="synced"] .sync-dot { background: var(--ok); }
.sync-chip[data-state="syncing"] .sync-dot { background: var(--pen); animation: pulse 1s infinite; }
.sync-chip[data-state="pending"] .sync-dot { background: #b7791f; }
.sync-chip[data-state="offline"] .sync-dot { background: var(--muted); }
.sync-chip[data-state="auth"], .sync-chip[data-state="error"] { color: var(--fix); border-color: var(--fix); }
.sync-chip[data-state="auth"] .sync-dot, .sync-chip[data-state="error"] .sync-dot { background: var(--fix); }
@media (max-width: 640px) {
  .sync-chip { padding: 4px 10px 4px 8px; font-size: 12px; }
}

/* ---------- Giriş ---------- */
body.logged-out .tabs, body.logged-out .sync-chip, body.logged-out .icon-btn { display: none; }
.login-page { display: grid; place-items: center; min-height: 70vh; }
.login-card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px 24px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow);
}
.login-logo { width: 52px; height: 52px; border-radius: 12px; }
.login-card h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.login-card .lede { margin: 0 0 6px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form .btn { width: 100%; margin-top: 4px; }
.login-error { margin: 0; color: var(--fix); font-size: 14px; font-weight: 500; }
