/* masabaşı notlar — koyu tema varsayılan; açık tema masabasi.vip kâğıt/mürekkep paletini kullanır */
:root {
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --felt: #4B2C83; --felt-2: #6A44AE; --mustard: #E1AE2A; --dice: #E2483D; --ink: #17140F; --paper: #F4EFE4;
  --radius: 14px; --radius-sm: 10px;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121110; --side: #121110; --card: #1D1B18; --card-2: #272420; --hover: rgba(244,239,228,.06);
  --line: #37332C; --line-soft: #2A2723; --card-border: #37332C; --card-shadow: none; --btn-shadow: none;
  --text: #ECE7DC; --muted: #A0988A; --faint: #6F695F;
  --accent: #B79BF5; --accent-bg: rgba(142,107,214,.18); --accent-line: rgba(142,107,214,.4);
  --primary: #6A44AE; --primary-hover: #7B56C0; --on-primary: #fff;
  --gold: #E1AE2A; --gold-bg: rgba(225,174,42,.13); --gold-line: rgba(225,174,42,.38);
  --danger: #F0685E; --ok: #5DBB83; --mark: rgba(225,174,42,.38);
  --code-bg: #0C0B0A; --overlay: rgba(0,0,0,.62);
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #F4EFE4; --side: #F4EFE4; --card: #FFFDF8; --card-2: #F3EDE0; --hover: rgba(23,20,15,.06);
  --line: #D9CFBC; --line-soft: #E6DECF; --card-border: #17140F; --card-shadow: 3px 3px 0 0 #17140F; --btn-shadow: 2px 2px 0 0 #17140F;
  --text: #17140F; --muted: #6B6457; --faint: #9A917F;
  --accent: #4B2C83; --accent-bg: rgba(75,44,131,.1); --accent-line: rgba(75,44,131,.35);
  --primary: #4B2C83; --primary-hover: #5B37A0; --on-primary: #fff;
  --gold: #8A6200; --gold-bg: rgba(225,174,42,.22); --gold-line: rgba(160,116,0,.5);
  --danger: #C7352B; --ok: #2E7D4F; --mark: rgba(225,174,42,.55);
  --code-bg: #17140F; --overlay: rgba(23,20,15,.45);
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
body { margin: 0; font-family: var(--font-sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.02em; margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
::selection { background: var(--mustard); color: var(--ink); }
:focus-visible { outline: 2px solid var(--mustard); outline-offset: 2px; border-radius: 6px; }
textarea:focus-visible, input:focus-visible { outline: none; }
svg.ic { flex: none; display: block; }
[hidden] { display: none !important; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.94); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ───────── Yerleşim ───────── */
.shell { display: flex; min-height: 100vh; max-width: 1240px; margin: 0 auto; }
.side { width: 264px; flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 14px 14px; border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 14px; background: var(--side); scrollbar-width: none; }
.side::-webkit-scrollbar { display: none; }
.main { flex: 1; min-width: 0; padding: 22px 22px 80px; }
.main-inner { max-width: 700px; margin: 0 auto; }
.main-inner.wide { max-width: 940px; }
.topbar { display: none; }
.scrim { display: none; }

@media (max-width: 860px) {
  .shell { display: block; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .22s ease; }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 39; background: var(--overlay); animation: fade .2s; }
  .topbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 30; padding: 10px 12px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-soft); }
  .topbar .brand { flex: 1; }
  .main { padding: 14px 12px 90px; }
}

/* ───────── Marka ───────── */
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; text-decoration: none; color: var(--text); }
.brand img { width: 30px; height: 30px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.brand-tag { font-family: var(--font-display); font-weight: 800; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; background: var(--mustard); color: var(--ink); border-radius: 6px; padding: 2px 6px; margin-left: 2px; border: 1.5px solid var(--ink); transform: rotate(-3deg); }
.ws-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 6px; margin: -4px -6px; border-radius: var(--radius-sm); text-align: left; }
.ws-btn:hover { background: var(--hover); }
.ws-name { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.ws-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; border: 1px solid rgba(0,0,0,.35); }

/* ───────── Düğmeler ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 13px; border-radius: var(--radius-sm); border: 1.5px solid var(--card-border); background: var(--card); font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none; color: var(--text); box-shadow: var(--btn-shadow); transition: transform .12s, background .12s, box-shadow .12s; user-select: none; }
.btn:hover { background: var(--card-2); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
[data-theme="light"] .btn-primary { border-color: var(--ink); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-gold { background: var(--mustard); color: var(--ink); border-color: var(--ink); }
.btn-gold:hover { background: #ECBD45; }
.btn-danger { background: var(--dice); color: #fff; border-color: var(--dice); }
.btn-sm { padding: 4px 9px; font-size: 13px; border-radius: 8px; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--muted); font-weight: 500; }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--muted); flex: none; }
.icon-btn:hover, .icon-btn.on { background: var(--hover); color: var(--text); }
.icon-btn.sm { width: 26px; height: 26px; border-radius: 7px; }
.spin { animation: spin .8s linear infinite; }

/* ───────── Kenar çubuğu ───────── */
.nav { display: flex; align-items: center; gap: 4px; }
.nav-main { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none; }
.nav-main.on, .nav .icon-btn.on { background: var(--accent-bg); color: var(--accent); }
.nav-main:hover { color: var(--text); }
.nav .icon-btn { text-decoration: none; }
.side-search { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); color: var(--muted); }
.side-search:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-bg); }
.side-search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 14px; }
.side-search input::placeholder { color: var(--faint); }
.side-search kbd { font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; color: var(--faint); }
.side hr { border: 0; border-top: 1px solid var(--line-soft); margin: 0; }
.sec-title { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 0 6px; margin-bottom: 4px; }
.side-list { display: flex; flex-direction: column; gap: 1px; }
.side-item { display: flex; align-items: center; gap: 9px; padding: 5px 8px; border-radius: 8px; color: var(--muted); font-size: 14px; text-align: left; width: 100%; text-decoration: none; min-width: 0; }
.side-item:hover { background: var(--hover); color: var(--text); }
.side-item.on { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.side-item .lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-item .cnt { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.side-foot { margin-top: auto; padding-top: 8px; }
.user-btn { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 8px; border-radius: var(--radius-sm); text-align: left; }
.user-btn:hover { background: var(--hover); }
.user-btn .who { flex: 1; min-width: 0; }
.user-btn .who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-btn .who span { display: block; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }

/* Mini takvim */
.mini { user-select: none; }
.mini-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 6px 6px; }
.mini-head b { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mini-dow { font-size: 10.5px; font-weight: 700; color: var(--faint); padding: 2px 0 4px; }
.mini-day { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--text); }
.mini-day:hover { background: var(--hover); }
.mini-day.out { color: var(--faint); opacity: .55; }
.mini-day.has { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.mini-day.has2 { background: color-mix(in srgb, var(--primary) 45%, transparent); color: var(--text); }
[data-theme="light"] .mini-day.has2 { color: #fff; background: var(--felt-2); }
.mini-day.today { box-shadow: inset 0 0 0 1.5px var(--mustard); font-weight: 700; }
.mini-day.sel { background: var(--primary); color: #fff; font-weight: 700; }
.mini-day.ev::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 2px; background: var(--mustard); transform: rotate(45deg); box-shadow: 0 0 0 1px var(--bg); }

/* Yaklaşan etkinlikler */
.up { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; width: 100%; text-align: left; min-width: 0; }
.up:hover, .up.on { background: var(--hover); }
.up.on { box-shadow: inset 0 0 0 1px var(--gold-line); }
.up-date { width: 38px; flex: none; border-radius: 9px; border: 1.5px solid var(--gold-line); background: var(--gold-bg); text-align: center; padding: 3px 0 4px; line-height: 1.05; }
.up-date b { display: block; font-family: var(--font-display); font-size: 16px; font-weight: 800; color: var(--text); }
.up-date span { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.up-body { min-width: 0; flex: 1; }
.up-body b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-body span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ───────── Kart ───────── */
.card { background: var(--card); border: 1.5px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--card-shadow); min-width: 0; }
[data-theme="dark"] .card { border-width: 1px; }

/* Yazma alanı */
.composer { padding: 12px 14px 10px; margin-bottom: 14px; position: relative; }
.composer.drag { outline: 2px dashed var(--mustard); outline-offset: -5px; }
.composer textarea { display: block; width: 100%; border: 0; background: transparent; resize: none; font-size: 15.5px; line-height: 1.55; min-height: 52px; max-height: 60vh; padding: 4px 2px; }
.composer textarea::placeholder { color: var(--faint); }
.composer-bar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.composer-bar .grow { flex: 1; }
.composer-bar .btn-primary { margin-left: auto; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 9px; font-size: 13.5px; color: var(--muted); max-width: 100%; min-width: 0; }
.pill:hover { background: var(--hover); color: var(--text); }
.pill.set { background: var(--gold-bg); color: var(--gold); }
.pill > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill .x { opacity: .7; margin-left: 2px; display: grid; }
.pill .x:hover { opacity: 1; }
.plus-btn { width: 30px; height: 30px; border-radius: 9px; border: 1.5px solid var(--line); display: grid; place-items: center; color: var(--text); }
.plus-btn:hover { background: var(--hover); }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 2px; }
.suggest button { font-size: 13px; padding: 3px 9px; border-radius: 8px; background: var(--accent-bg); color: var(--accent); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest button:hover, .suggest button.act { box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.suggest .hint { font-size: 12px; color: var(--faint); align-self: center; }
.uploads { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 2px; }
.upload { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card-2); display: flex; align-items: center; gap: 8px; font-size: 12.5px; max-width: 220px; }
.upload img { width: 64px; height: 64px; object-fit: cover; display: block; }
.upload .fname { padding: 8px 26px 8px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload .rm { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }
.upload.busy { opacity: .6; }

/* Süzgeç çubuğu */
.filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 2px 12px; font-size: 13.5px; color: var(--muted); }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 10px; border-radius: 9px; border: 1px solid var(--accent-line); background: var(--accent-bg); color: var(--accent); font-weight: 600; max-width: 100%; }
.fchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fchip button { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; color: inherit; opacity: .75; }
.fchip button:hover { opacity: 1; background: var(--hover); }

/* Etkinlik başlığı */
.event-head { padding: 0; overflow: hidden; margin-bottom: 14px; }
.event-head .band { height: 8px; background: repeating-linear-gradient(135deg, var(--mustard) 0 12px, var(--ink) 12px 14px); }
.event-head .in { padding: 14px 16px 14px; display: flex; gap: 14px; align-items: flex-start; }
.event-head h2 { font-size: 22px; font-weight: 800; line-height: 1.15; }
.event-head .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.event-head .meta span { display: inline-flex; align-items: center; gap: 5px; }
.event-head .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.countdown { flex: none; text-align: center; border: 1.5px solid var(--gold-line); background: var(--gold-bg); border-radius: 12px; padding: 7px 12px; min-width: 76px; }
.countdown b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 1; }
.countdown span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--gold); }
.progress { height: 6px; border-radius: 4px; background: var(--card-2); overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; background: var(--ok); border-radius: 4px; transition: width .3s; }

/* ───────── Not kartı ───────── */
.note { position: relative; padding: 12px 16px 12px; margin-bottom: 12px; animation: pop-in .22s ease both; }
.note.pinned::before { content: ""; position: absolute; top: -1px; right: -1px; width: 22px; height: 22px; background: var(--mustard); clip-path: polygon(0 0, 100% 0, 100% 100%); border-top-right-radius: calc(var(--radius) - 1px); }
.note-head { display: flex; align-items: center; gap: 8px; min-height: 28px; font-size: 13px; color: var(--muted); }
.note-head .who { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-head .when { white-space: nowrap; text-decoration: none; color: var(--muted); }
.note-head .when:hover { color: var(--text); text-decoration: underline; }
.note-head .sp { flex: 1; }
.note-head .vis { display: inline-flex; align-items: center; gap: 4px; }
.note-meta { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; row-gap: 2px; }
.ev-chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--gold-line); background: var(--gold-bg); color: var(--gold); font-size: 12px; font-weight: 600; max-width: 220px; }
.ev-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-chip:hover { filter: brightness(1.1); }
.avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 10.5px; font-weight: 800; color: #fff; flex: none; font-family: var(--font-display); border: 1.5px solid rgba(0,0,0,.35); letter-spacing: 0; }
.avatar.sm { width: 18px; height: 18px; font-size: 8.5px; border-width: 1px; }
.avatar.lg { width: 32px; height: 32px; font-size: 13px; }
.note-body { margin-top: 4px; }
.note-body.clip { max-height: 440px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
.more-link { font-size: 13px; font-weight: 600; color: var(--accent); margin-top: 4px; }
.note-links { margin-top: 8px; display: flex; flex-direction: column; gap: 1px; }
.note-link { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 3px 6px; margin: 0 -6px; border-radius: 7px; text-decoration: none; }
.note-link:hover { background: var(--hover); color: var(--text); }
.note-link .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-link .d { font-size: 12px; color: var(--faint); white-space: nowrap; }
.reacts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.react { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; background: var(--card-2); border: 1px solid transparent; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.react:hover { border-color: var(--line); }
.react.mine { background: var(--accent-bg); border-color: var(--accent-line); color: var(--accent); }
.react-add { color: var(--faint); }
.note-foot { display: flex; align-items: center; gap: 2px; margin-top: 8px; margin-left: -6px; }
.note-foot .btn-ghost { padding: 3px 8px; font-size: 13px; }
.comments { border-top: 1px solid var(--line-soft); margin: 10px -16px 0; padding: 10px 16px 0; }
.comments-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.comment { display: flex; gap: 8px; font-size: 14px; padding: 3px 0; align-items: flex-start; }
.comment .avatar { margin-top: 2px; }
.comment .c-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.comment .c-body b { margin-right: 6px; }
.comment .c-time { font-size: 11.5px; color: var(--faint); margin-left: 6px; white-space: nowrap; }
.comment .rm { opacity: 0; color: var(--faint); }
.comment:hover .rm, .comment .rm:focus-visible { opacity: 1; }
.comment-form { display: flex; gap: 6px; margin-top: 8px; }
.comment-form input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--card-2); border-radius: 9px; padding: 6px 10px; font-size: 14px; }
.comment-form input:focus { border-color: var(--accent-line); }

/* Ekler */
.gallery { display: grid; gap: 6px; margin-top: 10px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.gallery.one { grid-template-columns: 1fr; }
.gallery button { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--card-2); aspect-ratio: 4/3; }
.gallery.one button { aspect-ratio: auto; max-height: 420px; width: fit-content; max-width: 100%; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery.one img { width: auto; height: auto; max-width: 100%; max-height: 420px; object-fit: contain; }
.file-row { display: flex; align-items: center; gap: 9px; margin-top: 6px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; text-decoration: none; color: var(--text); background: var(--card-2); }
.file-row:hover { border-color: var(--accent-line); }
.file-row .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .s { color: var(--faint); font-size: 12px; white-space: nowrap; }

/* ───────── Markdown ───────── */
.md { font-size: 15.5px; line-height: 1.6; overflow-wrap: anywhere; }
.md > * + * { margin-top: .55em; }
.md p { margin: 0; white-space: pre-wrap; }
.md h1, .md h2, .md h3, .md h4 { font-weight: 800; line-height: 1.25; }
.md h1 { font-size: 1.45em; } .md h2 { font-size: 1.22em; } .md h3 { font-size: 1.08em; } .md h4 { font-size: 1em; }
.md ul, .md ol { margin: 0; padding: 0; list-style: none; }
.md li { display: flex; gap: .55em; align-items: flex-start; padding: 1px 0; }
.md li > .bul { flex: none; width: 1.3em; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; user-select: none; }
.md li > .bul.dot::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--mustard); transform: rotate(45deg) translateY(-2px); border-radius: 1px; }
.md li > .li-body { flex: 1; min-width: 0; white-space: pre-wrap; }
.md li.task > input { appearance: none; -webkit-appearance: none; flex: none; width: 17px; height: 17px; margin: .22em 0 0 .15em; border: 1.5px solid var(--muted); border-radius: 5px; background: transparent; cursor: pointer; display: grid; place-items: center; transition: background .12s, border-color .12s; }
.md li.task > input:checked { background: var(--primary); border-color: var(--primary); }
.md li.task > input:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.md li.task > input:disabled { cursor: default; opacity: .7; }
.md li.task.done > .li-body { text-decoration: line-through; color: var(--muted); }
.md blockquote { margin: 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--mustard); color: var(--muted); }
.md code { font-family: var(--font-mono); font-size: .86em; background: var(--hover); border-radius: 5px; padding: .1em .35em; }
.md pre { margin: 0; background: var(--code-bg); color: #F4EFE4; border-radius: 10px; padding: 11px 13px; overflow-x: auto; font-size: 13px; line-height: 1.5; border: 1px solid var(--line-soft); }
.md pre code { background: none; padding: 0; font-size: inherit; white-space: pre; }
.md hr { border: 0; border-top: 1.5px dashed var(--line); margin: .9em 0; }
.md a { color: var(--accent); font-weight: 500; }
.md img.inl { max-width: 100%; max-height: 360px; border-radius: 10px; display: block; border: 1px solid var(--line); }
.md mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.md mark.hit { box-shadow: 0 0 0 1.5px var(--mustard); }
.md table { border-collapse: collapse; font-size: .92em; display: block; overflow-x: auto; max-width: 100%; }
.md th, .md td { border: 1px solid var(--line); padding: 4px 9px; text-align: left; }
.md th { background: var(--card-2); font-weight: 700; }
.tag { display: inline-block; padding: 0 7px; border-radius: 7px; background: var(--accent-bg); color: var(--accent); font-size: .92em; font-weight: 500; line-height: 1.5; text-decoration: none; }
.tag:hover { box-shadow: inset 0 0 0 1px var(--accent-line); }
.ref { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 0 7px; border-radius: 7px; border: 1px solid var(--line); background: var(--card-2); font-size: .92em; text-decoration: none; color: var(--text); vertical-align: bottom; }
.ref span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.ref:hover { border-color: var(--accent-line); color: var(--accent); }

/* ───────── Menü / pencere / bildirim ───────── */
.menu-wrap { position: relative; display: inline-flex; }
.menu-wrap.ws-menu, .menu-wrap.user-menu { display: flex; width: 100%; }
.menu { position: absolute; z-index: 50; top: calc(100% + 4px); min-width: 210px; max-width: min(320px, 86vw); max-height: 340px; overflow-y: auto; background: var(--card); border: 1.5px solid var(--card-border); border-radius: 12px; box-shadow: 0 10px 34px rgba(0,0,0,.36); padding: 5px; animation: pop-in .14s ease both; }
[data-theme="dark"] .menu { border-width: 1px; border-color: var(--line); }
.menu.right { right: 0; } .menu.left { left: 0; } .menu.up { top: auto; bottom: calc(100% + 4px); }
.menu-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px; border-radius: 8px; font-size: 14px; text-align: left; color: var(--text); text-decoration: none; min-width: 0; }
.menu-item:hover { background: var(--hover); }
.menu-item.on { color: var(--accent); font-weight: 600; }
.menu-item.danger { color: var(--danger); }
.menu-item .lbl { flex: 1; min-width: 0; }
.menu-item .lbl small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; white-space: normal; line-height: 1.3; }
.menu-item .lbl b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-sep { height: 1px; background: var(--line-soft); margin: 4px 2px; }
.menu-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 6px 9px 3px; }
.menu-pad { padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.field input, .input { border: 1.5px solid var(--line); background: var(--card-2); border-radius: 9px; padding: 6px 9px; font-size: 14px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text); width: 100%; }
.field input:focus, .input:focus { border-color: var(--accent-line); }
.emoji-row { display: flex; gap: 2px; flex-wrap: wrap; padding: 4px; width: 216px; }
.emoji-row button { width: 38px; height: 36px; border-radius: 8px; font-size: 19px; }
.emoji-row button:hover { background: var(--hover); }

.overlay { position: fixed; inset: 0; z-index: 60; background: var(--overlay); display: grid; place-items: center; padding: 16px; animation: fade .16s; overflow-y: auto; }
.modal { width: min(520px, 100%); padding: 18px; animation: pop-in .2s ease both; }
.modal h3 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.modal p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.modal-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.copy-row { display: flex; gap: 6px; }
.copy-row input { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 12.5px; }
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.9); display: grid; place-items: center; padding: 20px; cursor: zoom-out; animation: fade .16s; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.picker-list { max-height: 320px; overflow-y: auto; margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }

.toasts { position: fixed; z-index: 80; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast { background: var(--ink); color: #F4EFE4; border: 1.5px solid var(--mustard); border-radius: 12px; padding: 8px 14px; font-size: 14px; font-weight: 500; box-shadow: 0 8px 28px rgba(0,0,0,.4); animation: pop-in .2s ease both; text-align: center; }
.toast.err { border-color: var(--dice); }

/* ───────── Takvim ───────── */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-head h1 { font-size: 24px; font-weight: 800; flex: 1; min-width: 150px; }
.cal-sync { font-size: 12px; color: var(--faint); }
.cal { overflow: hidden; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.cal-dow span { padding: 7px 9px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-cell { min-height: 108px; padding: 6px 6px 8px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: pointer; position: relative; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover { background: var(--hover); }
.cal-cell.out { background: color-mix(in srgb, var(--bg) 55%, transparent); }
.cal-cell.out .cal-num { color: var(--faint); opacity: .6; }
.cal-cell.filled { background: color-mix(in srgb, var(--card-2) 55%, transparent); }
.cal-num { font-size: 12.5px; font-weight: 600; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; font-variant-numeric: tabular-nums; }
.cal-cell.today .cal-num { background: var(--mustard); color: var(--ink); font-weight: 800; }
.cal-ev { display: flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--gold-bg); color: var(--gold); border: 1px solid var(--gold-line); min-width: 0; text-align: left; width: 100%; }
.cal-ev.canc { text-decoration: line-through; opacity: .6; }
.cal-ev span, .cal-note span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev:hover { filter: brightness(1.12); }
.cal-note { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text); min-width: 0; text-decoration: none; padding: 1px 2px; border-radius: 5px; }
.cal-note:hover { background: var(--accent-bg); color: var(--accent); }
.cal-note .lk { color: var(--faint); flex: none; }
.cal-more { font-size: 11px; color: var(--faint); padding-left: 2px; }
.cal-thumb { width: 44px; height: 30px; border-radius: 5px; object-fit: cover; border: 1px solid var(--line); }
.agenda { display: none; margin-top: 16px; }
.agenda h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin: 14px 2px 6px; font-family: var(--font-sans); }
@media (max-width: 720px) {
  .cal-cell { min-height: 54px; padding: 4px; align-items: center; gap: 2px; }
  .cal-ev, .cal-note, .cal-more, .cal-thumb { display: none; }
  .cal-dots { display: flex !important; }
  .agenda { display: block; }
  .cal-dow span { text-align: center; padding: 6px 0; }
}
.cal-dots { display: none; gap: 3px; flex-wrap: wrap; justify-content: center; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cal-dots i.e { background: var(--mustard); border-radius: 1px; transform: rotate(45deg); }
.agenda-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--text); width: 100%; text-align: left; font-size: 14px; }
.agenda-row:hover { background: var(--hover); }
.agenda-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-row .h { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ───────── Dosyalar ───────── */
.page-head { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 800; flex: 1; }
.page-head .sub { font-size: 13px; color: var(--muted); }
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.file-card { overflow: hidden; text-decoration: none; color: var(--text); display: flex; flex-direction: column; }
.file-card .ph { aspect-ratio: 4/3; background: var(--card-2); display: grid; place-items: center; color: var(--faint); overflow: hidden; }
.file-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.file-card .inf { padding: 7px 10px 8px; font-size: 12.5px; min-width: 0; }
.file-card .inf b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-card .inf span { color: var(--faint); font-size: 11.5px; }

.empty { text-align: center; padding: 44px 16px; color: var(--muted); }
.empty .big { font-size: 34px; margin-bottom: 6px; }
.empty b { display: block; font-family: var(--font-display); font-size: 18px; color: var(--text); margin-bottom: 2px; }
.center { display: flex; justify-content: center; padding: 14px 0; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); text-decoration: none; margin-bottom: 12px; }
.back:hover { color: var(--text); }
.sync-warn { font-size: 12.5px; color: var(--danger); margin: 0 6px; }

/* ───────── Karşılama & herkese açık not ───────── */
.landing { min-height: 100vh; display: flex; flex-direction: column; background-image: radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1px); background-size: 18px 18px; }
.landing-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; max-width: 1080px; width: 100%; margin: 0 auto; }
.landing-main { flex: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; max-width: 1080px; width: 100%; margin: 0 auto; padding: 24px 22px 60px; }
.landing h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; line-height: 1.02; }
.landing h1 em { font-style: normal; background: var(--mustard); color: var(--ink); padding: 0 .18em; border-radius: 8px; display: inline-block; transform: rotate(-1.5deg); border: 2px solid var(--ink); }
.landing .lead { font-size: 17px; color: var(--muted); margin: 18px 0 20px; max-width: 520px; }
.landing ul.points { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 8px; }
.landing ul.points li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.landing ul.points li::before { content: ""; flex: none; width: 9px; height: 9px; margin-top: 7px; background: var(--mustard); border: 1.5px solid var(--ink); transform: rotate(45deg); }
.landing .cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.landing .cta .btn { padding: 11px 18px; font-size: 15.5px; border-radius: 12px; }
.landing .fine { font-size: 12.5px; color: var(--faint); margin-top: 14px; max-width: 460px; }
.landing .err { border: 1.5px solid var(--dice); background: color-mix(in srgb, var(--dice) 14%, transparent); border-radius: 12px; padding: 9px 13px; font-size: 14px; margin-bottom: 16px; }
.demo { display: flex; flex-direction: column; gap: 12px; transform: rotate(1.2deg); pointer-events: none; }
.demo .note { margin: 0; animation: none; }
.demo .note:nth-child(2) { transform: translateX(-18px) rotate(-2deg); }
.landing-foot { text-align: center; font-size: 12.5px; color: var(--faint); padding: 18px; }
.landing-foot a { color: var(--muted); }
@media (max-width: 860px) { .landing-main { grid-template-columns: 1fr; gap: 28px; padding-top: 8px; } .demo { display: none; } }

.public { max-width: 720px; margin: 0 auto; padding: 22px 14px 60px; min-height: 100vh; }
.public-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 10px; }
.public-org { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.public-foot { text-align: center; font-size: 12.5px; color: var(--faint); margin-top: 22px; }

/* ───────── Bahsetme, bildirimler, PIN ───────── */
.mention { display: inline-block; padding: 0 6px; border-radius: 7px; background: var(--gold-bg); color: var(--gold); font-weight: 600; font-size: .94em; line-height: 1.5; }
.mention.me { background: var(--mustard); color: var(--ink); }
.inline-md a { color: var(--accent); }
.inline-md code { font-family: var(--font-mono); font-size: .88em; background: var(--hover); border-radius: 5px; padding: .05em .3em; }
.icon-btn.bell { position: relative; }
.icon-btn .badge { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; background: var(--dice); color: #fff; font-size: 10px; font-weight: 800; font-style: normal; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--bg); font-variant-numeric: tabular-nums; }
.tabs { display: flex; align-items: center; gap: 4px; margin: 4px 0 10px; border-bottom: 1px solid var(--line-soft); padding-bottom: 8px; }
.tabs > button:not(.btn) { padding: 5px 11px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); }
.tabs > button.on { background: var(--accent-bg); color: var(--accent); }
.notif-list { max-height: min(56vh, 460px); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; }
.notif { display: flex; gap: 10px; align-items: flex-start; padding: 9px 8px; border-radius: 10px; text-align: left; width: 100%; position: relative; }
.notif:hover { background: var(--hover); }
.notif.unread { background: var(--accent-bg); }
.notif-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-bg); color: var(--gold); flex: none; }
.notif-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; }
.notif-body .l1 { color: var(--muted); }
.notif-body .l1 b { color: var(--text); }
.notif-body .l2 { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-body .l3 { color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif-body .l4 { font-size: 11.5px; color: var(--faint); }
.notif .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mustard); margin-top: 7px; flex: none; }
.notif-set { display: flex; flex-direction: column; gap: 10px; }
.toggle-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.toggle-row .lbl { flex: 1; min-width: 0; }
.toggle-row .lbl b { display: block; font-size: 14px; font-weight: 600; }
.toggle-row .lbl small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.switch { appearance: none; -webkit-appearance: none; width: 40px; height: 23px; border-radius: 12px; background: var(--line); position: relative; flex: none; cursor: pointer; transition: background .15s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 2.5px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch:checked { background: var(--primary); }
.switch:checked::after { transform: translateX(16px); }
.switch:disabled { opacity: .55; cursor: default; }
.hintbox { font-size: 12.5px; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; line-height: 1.45; }
.pin-input { font-family: var(--font-mono); font-size: 20px !important; letter-spacing: .3em; text-align: center; }
.pin-show { font-family: var(--font-mono); font-size: 30px; letter-spacing: .28em; text-align: center; padding: 12px; border-radius: 12px; background: var(--gold-bg); border: 1.5px solid var(--gold-line); color: var(--text); user-select: all; }
.pin-gate { max-width: 380px; margin: 40px auto 0; padding: 26px 22px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.pin-gate h2 { font-size: 21px; font-weight: 800; }
.pin-gate p { margin: 0; color: var(--muted); font-size: 14px; }
.pin-gate .fine { font-size: 12.5px; color: var(--faint); }
.pin-ic { width: 48px; height: 48px; border-radius: 14px; margin: 0 auto; display: grid; place-items: center; background: var(--gold-bg); border: 1.5px solid var(--gold-line); color: var(--gold); }
.pin-err { color: var(--danger); font-size: 13.5px; font-weight: 600; }
.note-head .vis { gap: 3px; }
