:root {
  --bg: #fbf4f4;
  --bg-grad: linear-gradient(180deg, #fdf8f7 0%, #f8ecee 100%);
  --surface: #fffbfb;
  --surface-2: #f5e6e9;
  --glass: rgba(253, 248, 247, 0.8);
  --text: #3d1f27;
  --text-soft: #644550;
  --muted: #a08891;
  --accent: #8a1538;          /* Pantone 1955 C */
  --accent-2: #a3284d;
  --accent-deep: #8a1538;
  --accent-ink: #ffffff;
  --user: #f4dfe4;
  --line: rgba(138, 21, 56, 0.09);
  --code: #f6e9ec;
  --danger: #b0303f;
  --ring: rgba(138, 21, 56, 0.12);
  --shadow-sm: 0 1px 2px rgba(138, 21, 56, 0.05), 0 2px 8px rgba(138, 21, 56, 0.04);
  --shadow: 0 10px 40px rgba(138, 21, 56, 0.11);
  --btn-shadow: 0 6px 18px rgba(138, 21, 56, 0.28);
  --radius: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1013;
    --bg-grad: linear-gradient(180deg, #1e1316 0%, #170e11 100%);
    --surface: #24161a;
    --surface-2: #321e24;
    --glass: rgba(30, 19, 22, 0.82);
    --text: #f6e7ea;
    --text-soft: #dcc3c9;
    --muted: #a58a92;
    --accent: #8a1538;
    --accent-2: #a3284d;
    --accent-deep: #e48aa3;
    --accent-ink: #ffffff;
    --user: #3b2229;
    --line: rgba(255, 210, 220, 0.08);
    --code: #321e24;
    --ring: rgba(228, 138, 163, 0.18);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    --btn-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg-grad);
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; transition: transform .2s var(--ease), background-color .25s var(--ease), color .25s var(--ease), opacity .25s; }
button:active { transform: scale(0.96); }
::selection { background: var(--user); }
.muted { color: var(--muted); }
.error { color: var(--danger); min-height: 1.4em; margin: 6px 0 0; font-size: 14px; }

svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn {
  background: none; border: 0; width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center; color: var(--text-soft);
}
.icon-btn:hover { background: var(--surface-2); }

.wordmark { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; }
.wordmark em { font-style: italic; color: var(--accent-deep); }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Giriş ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 28px; animation: fade .6s var(--ease); }
.login-card { width: 100%; max-width: 330px; text-align: center; animation: rise .7s var(--ease); }
.login-logo { width: 132px; height: 132px; border-radius: 34px; box-shadow: var(--shadow); }
.login h1 { margin: 22px 0 2px; font-size: 32px; }
.login .muted { margin: 0; font-size: 15px; }
.login form { margin-top: 34px; display: grid; gap: 12px; }
.login input {
  font: inherit; font-size: 17px; padding: 15px 18px; border-radius: 16px; text-align: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); outline: none;
  box-shadow: var(--shadow-sm); transition: border-color .25s, box-shadow .25s;
}
.login input:focus { border-color: var(--accent-deep); box-shadow: 0 0 0 4px var(--ring); }
.btn-primary {
  border: 0; padding: 15px; border-radius: 16px; font-weight: 600; font-size: 16.5px; letter-spacing: 0.01em;
  background: linear-gradient(180deg, var(--accent-2) 0%, var(--accent) 100%); color: var(--accent-ink);
  box-shadow: var(--btn-shadow);
}

/* ---------- Yerleşim ---------- */
.app { height: 100%; display: flex; animation: fade .5s var(--ease); }
.main { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; position: relative; }
.topbar {
  display: flex; align-items: center; gap: 4px; position: relative; z-index: 5;
  padding: calc(env(safe-area-inset-top) + 6px) 8px 6px;
  background: var(--glass); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.title {
  flex: 1; text-align: center; font-family: var(--serif); font-size: 18px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px;
}

/* ---------- Çekmece ---------- */
.drawer {
  position: fixed; inset: 0 auto 0 0; width: min(84vw, 310px); z-index: 30;
  background: var(--surface); display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 10px) 12px calc(env(safe-area-inset-bottom) + 12px);
  transform: translateX(-104%); transition: transform .45s var(--ease); box-shadow: var(--shadow);
}
.drawer.open { transform: none; }
.scrim { position: fixed; inset: 0; background: rgba(45, 10, 22, 0.22); z-index: 20; animation: fade .3s var(--ease);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 12px 10px; }
.brand { font-size: 22px; }
.btn-new {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 2px 0 14px; padding: 13px 14px;
  border-radius: 16px; border: 0; font-weight: 600; font-size: 15.5px;
  background: linear-gradient(180deg, var(--accent-2) 0%, var(--accent) 100%); color: var(--accent-ink);
  box-shadow: var(--btn-shadow);
}
.btn-new svg { width: 18px; height: 18px; stroke-width: 2; }
.conv-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; margin: 0 -4px; padding: 0 4px; }
.conv { display: flex; align-items: center; border-radius: 13px; transition: background-color .25s var(--ease); }
.conv:hover { background: var(--surface-2); }
.conv.active { background: var(--surface-2); }
.conv.active .conv-open { color: var(--text); font-weight: 550; }
.conv-open {
  flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 10px 12px; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-soft);
}
.conv-open:active { transform: none; }
.conv-del { width: 34px; height: 34px; opacity: 0; color: var(--muted); }
.conv:hover .conv-del, .conv.active .conv-del { opacity: .8; }
@media (pointer: coarse) { .conv-del { opacity: .45; } }
.conv-del svg { width: 16px; height: 16px; }
.conv-group { font-size: 11.5px; color: var(--muted); padding: 14px 12px 5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.drawer-foot { display: flex; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.foot-btn { flex: 1; background: none; border: 0; border-radius: 12px; padding: 10px 2px; font-size: 13.5px; color: var(--text-soft); }
.foot-btn:hover { background: var(--surface-2); }

@media (min-width: 900px) {
  .drawer { position: static; transform: none; box-shadow: none; border-right: 1px solid var(--line); }
  #drawer-open, #drawer-close, .scrim { display: none !important; }
}

/* ---------- Mesajlar ---------- */
.messages { flex: 1; overflow-y: auto; padding: 22px 16px 12px; -webkit-overflow-scrolling: touch; }
.msg { max-width: 720px; margin: 0 auto 22px; animation: rise .45s var(--ease) both; }
.msg.user { display: flex; justify-content: flex-end; }
.msg.user .bubble {
  background: var(--user); color: var(--text); padding: 11px 16px; max-width: 84%;
  border-radius: 22px 22px 6px 22px; white-space: pre-wrap; word-wrap: break-word; box-shadow: var(--shadow-sm);
}
.msg.assistant .content { word-wrap: break-word; color: var(--text); }
.msg-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; min-height: 22px; }
.badge { font-size: 12px; color: var(--muted); letter-spacing: .01em; }
.badge::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-deep); margin-right: 7px; vertical-align: 1px; opacity: .8; }
.link-btn { background: none; border: 0; color: var(--accent-deep); font-size: 13px; padding: 2px; font-weight: 550; }
.retry { animation: fade .4s var(--ease); }
.status { color: var(--muted); font-size: 15px; }
.thinking { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-deep); opacity: .35; animation: pulse 1.2s var(--ease) infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(.85); } 40% { opacity: 1; transform: scale(1); } }
.msg .err { color: var(--danger); }

/* ---------- Markdown ---------- */
.content > :first-child { margin-top: 0; }
.content > :last-child { margin-bottom: 0; }
.content p { margin: 0 0 12px; }
.content strong { font-weight: 650; }
.content h1, .content h2, .content h3, .content h4 { font-family: var(--serif); font-weight: 600; margin: 20px 0 8px; line-height: 1.3; letter-spacing: -0.01em; }
.content h1 { font-size: 22px; } .content h2 { font-size: 20px; } .content h3, .content h4 { font-size: 17.5px; }
.content ul, .content ol { margin: 0 0 12px; padding-left: 22px; }
.content li { margin: 5px 0; padding-left: 2px; }
.content li::marker { color: var(--accent-deep); }
.content a { color: var(--accent-deep); text-decoration-color: rgba(138,21,56,.3); text-underline-offset: 3px; }
.content code { background: var(--code); padding: 2px 6px; border-radius: 7px; font-size: .88em; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.content pre { background: var(--code); padding: 14px 16px; border-radius: 16px; overflow-x: auto; margin: 0 0 12px; }
.content pre code { background: none; padding: 0; font-size: 13.5px; line-height: 1.55; }
.content blockquote { margin: 0 0 12px; padding: 4px 14px; border-left: 3px solid var(--accent-deep); color: var(--text-soft); font-style: italic; }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.table-wrap { overflow-x: auto; margin: 0 0 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.content table { border-collapse: collapse; font-size: 14.5px; min-width: 100%; }
.content th, .content td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.content tr:last-child td { border-bottom: 0; }
.content th { font-weight: 600; color: var(--text-soft); background: var(--surface-2); font-size: 13.5px; }

/* ---------- Boş durum ---------- */
.empty { text-align: center; padding: 13vh 16px 0; animation: rise .7s var(--ease); }
.empty-logo { width: 104px; height: 104px; border-radius: 28px; box-shadow: var(--shadow); }
.empty h2 { margin: 20px 0 4px; font-family: var(--serif); font-weight: 500; font-size: 27px; letter-spacing: -0.01em; }
.empty h2 em { color: var(--accent-deep); }
.empty .muted { margin: 0; }
.suggest { display: flex; flex-direction: column; gap: 9px; align-items: center; margin-top: 30px; }
.chip {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px;
  font-size: 14.5px; color: var(--text-soft); box-shadow: var(--shadow-sm);
}
.chip:hover { border-color: var(--accent-deep); color: var(--text); }

/* ---------- Yazma alanı ---------- */
.composer {
  padding: 8px 12px calc(env(safe-area-inset-bottom) + 12px);
  max-width: 760px; width: 100%; margin: 0 auto;
}
.options { display: flex; gap: 6px; margin: 0 4px 9px; overflow-x: auto; scrollbar-width: none; }
.options::-webkit-scrollbar { display: none; }
.opt {
  flex: none; font-size: 13px; padding: 6px 13px; border-radius: 999px; font-weight: 500;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
}
.opt[aria-pressed="true"], .opt[data-mode="anthropic"], .opt[data-mode="openai"] {
  background: var(--user); border-color: transparent; color: var(--accent-deep);
}
.input-row {
  display: flex; align-items: flex-end; gap: 8px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 26px; padding: 6px 6px 6px 18px;
  box-shadow: var(--shadow); transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.input-row:focus-within { border-color: rgba(138, 21, 56, 0.35); box-shadow: var(--shadow), 0 0 0 4px var(--ring); }
textarea {
  flex: 1; border: 0; outline: none; resize: none; background: none; color: var(--text);
  font: inherit; font-size: 16.5px; line-height: 1.5; padding: 9px 0; max-height: 160px;
}
textarea::placeholder { color: var(--muted); }
.send {
  flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: linear-gradient(180deg, var(--accent-2) 0%, var(--accent) 100%); color: var(--accent-ink);
  display: grid; place-items: center; box-shadow: var(--btn-shadow);
}
.send:disabled { opacity: .45; box-shadow: none; }
.send svg { width: 19px; height: 19px; stroke-width: 2.2; }

/* ---------- Alt sayfa ---------- */
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(45, 10, 22, 0.25); display: flex; align-items: flex-end; justify-content: center; animation: fade .3s var(--ease);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet-card {
  background: var(--surface); width: 100%; max-width: 540px; max-height: 80vh;
  border-radius: 26px 26px 0 0; display: flex; flex-direction: column; box-shadow: var(--shadow);
  padding-bottom: env(safe-area-inset-bottom); animation: rise .45s var(--ease);
}
@media (min-width: 600px) { .sheet { align-items: center; } .sheet-card { border-radius: 26px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 4px 22px; }
.sheet-head h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 21px; }
.sheet-body { overflow-y: auto; padding: 6px 22px 24px; }
.mem-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.mem-item span { flex: 1; }
.stat-big { font-family: var(--serif); font-size: 40px; font-weight: 500; margin: 2px 0; color: var(--accent-deep); }
.stat-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 14px; }
.stat-table td { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text-soft); }
.stat-table td:last-child { text-align: right; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Yazarken sondaki imleç: yumuşak nefes alan bir çizgi */
.content.streaming > :last-child::after {
  content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -0.15em;
  background: var(--accent-deep); border-radius: 2px; animation: caret 1.1s ease-in-out infinite;
}
.content.streaming > .table-wrap:last-child::after, .content.streaming > pre:last-child::after { display: none; }
@keyframes caret { 0%, 100% { opacity: .15; } 50% { opacity: .9; } }
.content { transition: opacity .3s var(--ease); }

/* ---------- Passkey / güvenlik ---------- */
.btn-passkey { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 34px; }
.btn-passkey svg { width: 22px; height: 22px; }
.btn-passkey + .error + form { margin-top: 10px; }
.or { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.btn-secondary {
  border: 1px solid var(--line); background: var(--surface); color: var(--accent-deep); border-radius: 14px;
  padding: 12px 14px; font-weight: 600; font-size: 15px; width: 100%; box-shadow: var(--shadow-sm);
}
.sec-section { margin: 6px 0 18px; }
.sec-section h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.dev-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dev-row .dev-ico { width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--accent-deep); flex: none; }
.dev-row .dev-ico svg { width: 18px; height: 18px; }
.dev-row .dev-text { flex: 1; min-width: 0; }
.dev-row .dev-name { font-weight: 550; font-size: 15px; }
.dev-row .dev-meta { font-size: 12.5px; color: var(--muted); }
.toggle-row { display: flex; align-items: center; gap: 12px; padding: 6px 0 10px; }
.toggle-row .txt { flex: 1; font-size: 15px; }
.toggle-row .txt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.switch { position: relative; width: 50px; height: 30px; flex: none; border: 0; border-radius: 999px; background: var(--surface-2); padding: 0; }
.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,.2); transition: transform .3s var(--ease); }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch:active { transform: none; }
.note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.ok-note { color: var(--accent-deep); font-weight: 550; }
.sheet-actions { display: grid; gap: 8px; margin-top: 16px; }

/* =================== Yeni menü ve başlangıç düzeni =================== */
.drawer { width: min(84vw, 288px); padding: calc(env(safe-area-inset-top) + 8px) 8px calc(env(safe-area-inset-bottom) + 8px); background: var(--surface); }
.drawer-head { padding: 2px 4px 10px 12px; }
.brand { font-size: 21px; }
.nav { display: flex; flex-direction: column; gap: 1px; margin-bottom: 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: 0; border-radius: 12px; padding: 9px 12px; font-size: 15px; color: var(--text);
}
.nav-item svg { width: 19px; height: 19px; color: var(--text-soft); }
.nav-item:hover, .nav-item.on { background: var(--surface-2); }
.nav-item:active { transform: none; background: var(--surface-2); }
.search-box {
  display: flex; align-items: center; gap: 8px; margin: 2px 4px 6px; padding: 8px 12px;
  border-radius: 12px; background: var(--bg); border: 1px solid var(--line); animation: rise .3s var(--ease);
}
.search-box svg { width: 16px; height: 16px; color: var(--muted); }
.search-box input { flex: 1; border: 0; outline: none; background: none; color: var(--text); font: inherit; font-size: 15px; }
.section-label { font-size: 12.5px; color: var(--muted); padding: 14px 12px 4px; font-weight: 500; }
.conv-group { font-size: 11.5px; color: var(--muted); padding: 12px 12px 4px; text-transform: none; letter-spacing: 0; font-weight: 500; opacity: .85; }
.conv-list { gap: 0; margin: 0; padding: 0; }
.conv { border-radius: 12px; position: relative; }
.conv-open { padding: 8px 12px; font-size: 14.5px; color: var(--text); }
.conv.active { background: var(--surface-2); }
.conv-more { width: 32px; height: 32px; margin-right: 2px; border-radius: 9px; opacity: 0; color: var(--text-soft); }
.conv-more svg { width: 18px; height: 18px; }
.conv:hover .conv-more, .conv.active .conv-more { opacity: 1; }
@media (pointer: coarse) { .conv-more { opacity: .7; } }
.conv-empty { padding: 8px 12px; font-size: 14px; color: var(--muted); }

.profile-wrap { position: relative; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 6px; }
.profile {
  display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0;
  border-radius: 14px; padding: 8px 10px; text-align: left;
}
.profile:hover { background: var(--surface-2); }
.profile:active { transform: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.profile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.profile-name { font-weight: 600; font-size: 14.5px; }
.profile-sub { font-size: 12.5px; color: var(--muted); }
.chev { width: 16px; height: 16px; color: var(--muted); }

/* Açılır menüler */
.popover {
  position: absolute; z-index: 50; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 6px; min-width: 220px; animation: pop .18s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.98); } to { opacity: 1; transform: none; } }
.profile-menu { bottom: calc(100% + 6px); left: 4px; right: 4px; }
.conv-menu { position: fixed; min-width: 190px; }
.pop-item {
  display: flex; align-items: center; gap: 11px; width: 100%; background: none; border: 0; text-align: left;
  padding: 9px 11px; border-radius: 10px; font-size: 14.5px; color: var(--text);
}
.pop-item svg { width: 17px; height: 17px; color: var(--text-soft); }
.pop-item:hover { background: var(--surface-2); }
.pop-item:active { transform: none; }
.pop-item.danger, .pop-item.danger svg { color: var(--danger); }
.pop-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.pop-label { font-size: 12px; color: var(--muted); padding: 4px 10px 6px; }
.pop-row { display: flex; align-items: center; gap: 11px; padding: 7px 8px 7px 11px; font-size: 14.5px; }
.pop-row svg { width: 17px; height: 17px; color: var(--text-soft); }
.pop-row span { flex: 1; }
.switch.sm { width: 40px; height: 24px; }
.switch.sm::after { width: 18px; height: 18px; }
.switch.sm[aria-checked="true"]::after { transform: translateX(16px); }
.seg { display: flex; gap: 3px; background: var(--bg); border-radius: 11px; padding: 3px; margin: 0 4px 4px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 9px; padding: 7px 6px; font-size: 13.5px; color: var(--text-soft); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
.seg button:active { transform: none; }

/* Yazma kutusu */
.composer { padding: 6px 12px calc(env(safe-area-inset-bottom) + 12px); max-width: 780px; }
.input-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 10px 10px 8px 16px;
  box-shadow: var(--shadow); transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.input-box:focus-within { border-color: rgba(138, 21, 56, 0.3); box-shadow: var(--shadow), 0 0 0 4px var(--ring); }
.input-box textarea { width: 100%; padding: 4px 2px 6px; display: block; }
.input-tools { display: flex; align-items: center; gap: 6px; margin-left: -6px; }
.tools-wrap { position: relative; }
.tool-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: none;
  display: grid; place-items: center; color: var(--text-soft);
}
.tool-btn svg { width: 18px; height: 18px; }
.tool-btn:hover { background: var(--surface-2); }
.tools-menu { bottom: calc(100% + 8px); left: 0; width: 250px; }
.active-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.active-chips::-webkit-scrollbar { display: none; }
.achip {
  display: inline-flex; align-items: center; gap: 6px; flex: none; border: 0; border-radius: 999px;
  background: var(--user); color: var(--accent-deep); font-size: 13px; font-weight: 550; padding: 6px 10px 6px 11px;
}
.achip svg { width: 13px; height: 13px; stroke-width: 2.2; }
.spacer { flex: 1; }
.tool-pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none; border: 1px solid var(--line); background: none;
  border-radius: 999px; padding: 7px 12px; font-size: 13.5px; color: var(--text-soft);
}
.tool-pill svg { width: 16px; height: 16px; }
.tool-pill[aria-pressed="true"] { background: var(--user); border-color: transparent; color: var(--accent-deep); font-weight: 550; }
.send { width: 38px; height: 38px; }
.options { display: none; }

/* Başlangıç ekranı: başlık ve yazma kutusu ortada */
.main .suggest { display: none; }
.main.home .messages { display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 18px; }
.main.home .suggest {
  flex: 1; display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  width: 100%; max-width: 780px; margin: 0 auto; padding: 10px 26px 0;
}
.empty { padding: 0 16px; animation: rise .6s var(--ease); }
.empty h2 { font-family: var(--serif); font-weight: 500; font-size: 27px; line-height: 1.3; margin: 0; letter-spacing: -0.01em; }
.empty h2 em { color: var(--accent-deep); }
.sug {
  display: flex; align-items: center; gap: 12px; background: none; border: 0; text-align: left;
  padding: 10px 6px; border-radius: 12px; font-size: 15px; color: var(--text-soft);
  animation: rise .6s var(--ease) both;
}
.sug:nth-child(2) { animation-delay: .05s; } .sug:nth-child(3) { animation-delay: .1s; } .sug:nth-child(4) { animation-delay: .15s; }
.sug svg { width: 18px; height: 18px; color: var(--muted); }
.sug:hover { background: var(--surface-2); color: var(--text); }
@media (min-width: 900px) {
  .drawer { width: 272px; }
  .empty h2 { font-size: 32px; }
}
@media (max-width: 480px) {
  .tool-pill { padding: 8px; }
  .tool-pill span { display: none; }
}

/* ---------- Ekler ---------- */
.attach-list { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.attach-list::-webkit-scrollbar { display: none; }
.att {
  position: relative; flex: none; display: flex; align-items: center; gap: 10px; max-width: 220px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 6px 30px 6px 6px;
  animation: pop .2s var(--ease);
}
.att.img { padding: 0; width: 64px; height: 64px; overflow: hidden; }
.att.img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.att-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.att-name { font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.att-meta { font-size: 12px; color: var(--muted); }
.att-x {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0;
  background: rgba(30, 10, 18, .65); color: #fff; display: grid; place-items: center; padding: 0;
}
.att-x svg { width: 12px; height: 12px; stroke-width: 2.4; }
.att.uploading::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.att.error { border-color: var(--danger); }
.att.error .att-meta { color: var(--danger); }
.msg.user { flex-direction: column; align-items: flex-end; gap: 6px; }
.msg-atts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 85%; }
.msg-atts .att { padding-right: 10px; background: var(--surface); }
.msg-atts .att.img { width: 120px; height: 120px; border-radius: 16px; padding: 0; }
.drop-hint {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none;
  background: rgba(138, 21, 56, .12); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  font-family: var(--serif); font-size: 24px; color: var(--accent-deep); animation: fade .2s var(--ease);
}

/* ---------- Kaynaklar, versiyonlar, durdur, bütçe ---------- */
.sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.src {
  display: inline-flex; align-items: center; max-width: 180px; padding: 4px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-soft); font-size: 12.5px;
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.src::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-deep); opacity: .6; margin-right: 6px; flex: none; }
.src:hover { color: var(--text); border-color: var(--accent-deep); }
.vnav { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; color: var(--muted); }
.vnav button { background: none; border: 0; width: 26px; height: 26px; border-radius: 8px; font-size: 18px; line-height: 1; color: var(--text-soft); padding: 0; }
.vnav button:disabled { opacity: .3; }
.vnav button:not(:disabled):hover { background: var(--surface-2); }
.send.stop { background: var(--text); color: var(--bg); box-shadow: none; }
.budget-bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 8px 0 10px; }
.budget-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: inherit; }

/* =====================================================================
   BalBadem tasarım sistemi v2 — Pantone 1955 C (#8A1538) ailesi
   Tüm renkler 1955 C'nin açık tonları (tint) ve koyu tonlarından (shade) türetildi.
   ===================================================================== */
@font-face {
  font-family: "Jakarta";
  src: url("/fonts/jakarta.woff") format("woff");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
:root {
  --c950: #2a0712; --c900: #4a0b1e; --c800: #5e0e26; --c700: #74122f; --c600: #8a1538;
  --c500: #a33a58; --c400: #bc6079; --c300: #d4919f; --c200: #e8c1ca; --c100: #f5e3e7; --c50: #fcf6f7;

  --bg: #fcf7f8;
  --bg-grad: none;
  --surface: #ffffff;
  --surface-2: #f7ebee;
  --glass: rgba(252, 247, 248, 0.72);
  --text: #2a0712;
  --text-soft: #5b3842;
  --muted: #9a7c85;
  --accent: var(--c600);
  --accent-2: var(--c500);
  --accent-deep: var(--c600);
  --accent-ink: #ffffff;
  --user: var(--c100);
  --line: rgba(138, 21, 56, 0.085);
  --code: #f8eef0;
  --danger: var(--c700);
  --ring: rgba(138, 21, 56, 0.12);
  --shadow-sm: 0 1px 2px rgba(74, 11, 30, 0.04), 0 2px 6px rgba(74, 11, 30, 0.04);
  --shadow: 0 12px 40px -12px rgba(74, 11, 30, 0.18), 0 2px 6px rgba(74, 11, 30, 0.04);
  --btn-shadow: 0 8px 20px -6px rgba(138, 21, 56, 0.45);
  --sans: "Jakarta", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: var(--sans);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12080b;
    --surface: #1c0f13;
    --surface-2: #29161c;
    --glass: rgba(18, 8, 11, 0.72);
    --text: #f8ecef;
    --text-soft: #d9bfc6;
    --muted: #9c7f88;
    --accent: var(--c600);
    --accent-2: var(--c500);
    --accent-deep: var(--c300);
    --user: #2f1820;
    --line: rgba(232, 193, 202, 0.08);
    --code: #261419;
    --danger: var(--c300);
    --ring: rgba(212, 145, 159, 0.18);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(232, 193, 202, 0.05);
    --btn-shadow: 0 8px 22px -6px rgba(138, 21, 56, 0.7);
  }
}

body {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.62;
  letter-spacing: -0.006em;
  background: var(--bg);
  font-feature-settings: "ss01", "cv11";
}
/* Arka planda yumuşak bordo ışık (mesh) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 40% at 15% 0%, rgba(212, 145, 159, 0.22), transparent 70%),
    radial-gradient(50% 35% at 90% 5%, rgba(138, 21, 56, 0.10), transparent 70%),
    radial-gradient(70% 50% at 50% 110%, rgba(232, 193, 202, 0.25), transparent 70%);
}
@media (prefers-color-scheme: dark) {
  body::before {
    background:
      radial-gradient(60% 40% at 15% 0%, rgba(138, 21, 56, 0.28), transparent 70%),
      radial-gradient(50% 35% at 90% 5%, rgba(116, 18, 47, 0.25), transparent 70%),
      radial-gradient(70% 50% at 50% 115%, rgba(94, 14, 38, 0.35), transparent 70%);
  }
}
.app, .main { background: transparent; }

/* ---------- Logo yazısı ---------- */
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-style: normal; }
.wm-mark {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: url("/icons/icon-192.png") center / cover; box-shadow: 0 0 0 1px var(--line), 0 4px 10px -4px rgba(74, 11, 30, 0.4);
}
.wm-text { font-weight: 800; font-size: 18px; letter-spacing: -0.04em; color: var(--text); }
.wm-ai {
  font-size: 10px; font-weight: 800; letter-spacing: 0.04em; color: #fff; padding: 2px 6px 2px; border-radius: 6px;
  background: linear-gradient(135deg, var(--c500), var(--c700)); margin-left: -3px; transform: translateY(-5px);
  box-shadow: 0 3px 8px -3px rgba(138, 21, 56, 0.6);
}
.title { font-family: var(--sans); font-size: 15.5px; font-weight: 650; letter-spacing: -0.02em; }
.title.wordmark { justify-content: center; }
.brand .wm-text { font-size: 19px; }

/* ---------- Giriş ---------- */
.login-logo { width: 116px; height: 116px; border-radius: 32px; box-shadow: 0 24px 50px -16px rgba(138, 21, 56, 0.55), 0 0 0 1px var(--line); }
.wm-lg { margin: 26px 0 4px; justify-content: center; gap: 4px; }
.wm-lg .wm-text { font-size: 36px; letter-spacing: -0.05em; }
.wm-lg .wm-ai { font-size: 12px; padding: 3px 7px; transform: translateY(-12px); margin-left: 2px; }
.tagline { font-size: 15px; letter-spacing: -0.01em; }
.login input { border-radius: 16px; font-family: var(--sans); }
.btn-primary, .btn-new, .send {
  background: linear-gradient(180deg, var(--c500) 0%, var(--c600) 55%, var(--c700) 100%);
  box-shadow: var(--btn-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary { font-weight: 700; letter-spacing: -0.01em; }

/* ---------- Başlangıç: ışıyan küre + karşılama ---------- */
.empty { text-align: center; padding: 0 20px; }
.orb {
  position: relative; width: 88px; height: 88px; margin: 0 auto 26px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 32% 28%, #fdf0f3 0%, var(--c200) 22%, var(--c400) 45%, var(--c600) 70%, var(--c900) 100%);
  box-shadow: 0 22px 50px -12px rgba(138, 21, 56, 0.6), inset 0 -8px 18px rgba(42, 7, 18, 0.35), inset 0 6px 14px rgba(255, 255, 255, 0.35);
  animation: breathe 5s ease-in-out infinite;
}
.orb i { position: absolute; border-radius: 50%; filter: blur(10px); mix-blend-mode: screen; opacity: .7; }
.orb i:nth-child(1) { width: 60%; height: 60%; left: 10%; top: 5%; background: var(--c200); animation: drift1 7s ease-in-out infinite; }
.orb i:nth-child(2) { width: 55%; height: 55%; right: 0; bottom: 5%; background: var(--c400); animation: drift2 9s ease-in-out infinite; }
.orb i:nth-child(3) { width: 40%; height: 40%; left: 30%; bottom: 0; background: var(--c500); animation: drift1 11s ease-in-out infinite reverse; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@keyframes drift1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(18%, 22%); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-22%, -16%); } }
.hello { margin: 0 0 6px; font-size: 15px; color: var(--muted); font-weight: 500; }
.hello strong { color: var(--accent-deep); font-weight: 700; }
.empty h2 {
  font-family: var(--sans); font-size: 28px; font-weight: 750; letter-spacing: -0.045em; line-height: 1.18; margin: 0 auto; max-width: 15ch;
  background: linear-gradient(135deg, var(--text) 30%, var(--c600) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (prefers-color-scheme: dark) {
  .empty h2 { background-image: linear-gradient(135deg, #fff 30%, var(--c300) 100%); }
}
@media (min-width: 900px) { .empty h2 { font-size: 36px; max-width: 18ch; } .orb { width: 140px; height: 140px; } }

/* Öneri kartları (2x2) */
.main.home .suggest {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start;
  padding: 14px 12px 0; max-width: 760px;
}
.sug {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 13px 14px 14px;
  box-shadow: var(--shadow-sm); color: var(--text); transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.sug:hover { border-color: rgba(138, 21, 56, 0.25); box-shadow: var(--shadow); background: var(--surface); }
.sug-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--c100); color: var(--c600); margin-bottom: 8px; }
@media (prefers-color-scheme: dark) { .sug-ico { background: rgba(138, 21, 56, 0.28); color: var(--c200); } }
.sug-ico svg { width: 17px; height: 17px; color: inherit; stroke-width: 1.9; }
.sug-t { font-size: 14px; font-weight: 650; letter-spacing: -0.015em; }
.sug-s { font-size: 12.5px; color: var(--muted); line-height: 1.35; }

/* ---------- Yazma kutusu ---------- */
.input-box { border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); border-color: var(--line); }
.input-box textarea { font-family: var(--sans); font-size: 15.5px; }
.input-box textarea::placeholder { color: var(--muted); }
.send { color: #fff; }
.send.stop { background: var(--text); color: var(--bg); box-shadow: none; }
.tool-btn, .tool-pill { border-color: var(--line); }

/* ---------- Mesajlar ---------- */
.msg.user .bubble { background: var(--user); border-radius: 20px 20px 6px 20px; padding: 10px 15px; box-shadow: none; font-size: 15px; }
.content h1, .content h2, .content h3, .content h4 { font-family: var(--sans); font-weight: 750; letter-spacing: -0.03em; }
.content strong { font-weight: 700; }
.badge { font-weight: 500; }

/* ---------- Menü ve sayfalar ---------- */
.nav-item { font-weight: 500; font-size: 14.5px; }
.conv-open { font-size: 14px; }
.section-label { font-weight: 600; font-size: 12px; letter-spacing: .01em; }
.profile-name { font-weight: 700; letter-spacing: -0.02em; }
.sheet-head h3 { font-family: var(--sans); font-weight: 750; letter-spacing: -0.03em; font-size: 20px; }
.stat-big { font-family: var(--sans); font-weight: 800; letter-spacing: -0.05em; color: var(--accent-deep); }
.drawer { background: var(--surface); }
.login-logo { display: block; margin: 0 auto; }
.wm-lg { display: flex; }
.wm-text { letter-spacing: -0.03em; }
.wm-lg .wm-text { letter-spacing: -0.035em; }
.empty h2 { letter-spacing: -0.032em; }
.sug-t { letter-spacing: -0.01em; }

/* ---------- Hafıza etiketi ve gizli sohbet ---------- */
.mem-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mem-chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface);
  color: var(--accent-deep); font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 4px 10px 4px 8px;
}
.mem-chip svg { width: 14px; height: 14px; }
.mem-item .link-btn { flex: none; }
.inc-note { display: none; margin: 14px auto 0; max-width: 30ch; font-size: 13.5px; color: var(--muted); }
.main.incognito .inc-note { display: block; }
.main.incognito .orb {
  background: radial-gradient(circle at 32% 28%, #f1e6e9 0%, #b9a5ab 30%, #5b3842 70%, #2a0712 100%);
}
#incognito-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.main:not(.home):not(.incognito) #incognito-btn { display: none; }
.main.incognito .topbar { box-shadow: inset 0 -1px 0 var(--line); }

/* ---------- Güncelleme bildirimi ---------- */
.update-toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 64px); transform: translateX(-50%); z-index: 70;
  display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 9px 16px 9px 12px;
  background: linear-gradient(180deg, var(--c500), var(--c700)); color: #fff; font-weight: 650; font-size: 13.5px;
  box-shadow: var(--btn-shadow); animation: rise .4s var(--ease);
}
.update-toast svg { width: 16px; height: 16px; stroke-width: 2.2; }
.update-toast:active { transform: translateX(-50%) scale(.97); }

/* ---------- Formüller (KaTeX) ---------- */
.content .katex { font-size: 1.08em; }
.content .katex-display { margin: 10px 0 14px; padding: 12px 10px; overflow-x: auto; overflow-y: hidden; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.content .katex-display > .katex { font-size: 1.15em; }

/* ---------- Kod blokları ---------- */
.code-wrap { margin: 0 0 12px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--code); }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.copy-code { border: 0; background: none; color: var(--accent-deep); font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 8px; }
.copy-code:hover { background: var(--surface-2); }
.code-wrap pre { margin: 0; border-radius: 0; background: none; }
.tk-k { color: var(--c600); font-weight: 600; }
.tk-s { color: #8a5a1f; }
.tk-c { color: var(--muted); font-style: italic; }
.tk-n { color: var(--c500); }
.tk-f { color: var(--c700); }
@media (prefers-color-scheme: dark) {
  .tk-k { color: var(--c300); } .tk-s { color: #e3c08f; } .tk-n { color: var(--c200); } .tk-f { color: #f0c9d2; }
}
.copy-msg { width: 30px; height: 30px; border-radius: 9px; color: var(--muted); }
.copy-msg svg { width: 16px; height: 16px; }

/* ---------- Projeler ---------- */
.project-head { display: none; text-align: center; padding: 0 20px; animation: rise .5s var(--ease); }
.main.home.project .project-head { display: block; }
.main.project #empty { display: none; }
.main.project .suggest { display: none !important; }
.project-panel { display: none; }
.main.home.project .project-panel {
  display: flex; flex-direction: column; gap: 10px; flex: 1; width: 100%; max-width: 760px; margin: 0 auto;
  padding: 12px 12px calc(env(safe-area-inset-bottom) + 16px); overflow-y: auto;
}
.ph-ico { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--c500), var(--c700)); box-shadow: var(--btn-shadow); }
.ph-ico svg { width: 26px; height: 26px; }
.project-head h2 { margin: 0 0 4px; font-size: 26px; font-weight: 800; letter-spacing: -0.035em; }
.project-head .muted { margin: 0 auto; max-width: 34ch; font-size: 13.5px; }
.pp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.pp-title { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--text-soft); margin-bottom: 6px; }
.pp-instr { margin: 0; font-size: 14px; white-space: pre-wrap; }
.pp-files { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-empty { margin: 0; font-size: 13.5px; }
.pp-chats { display: flex; flex-direction: column; }
.pp-chat { text-align: left; background: none; border: 0; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--text); }
.pp-chat:last-child { border-bottom: 0; }
.pp-chat:active { transform: none; }
.pp-actions { display: flex; justify-content: space-between; padding: 2px 4px; }
.link-btn.danger { color: var(--danger); }
.conv-tag { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 600; color: var(--accent-deep); background: var(--user); padding: 1px 7px; border-radius: 999px; vertical-align: 1px; }
.proj-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 0; }
.proj-row:active { transform: none; }
.proj-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--c100); color: var(--c600); flex: none; }
@media (prefers-color-scheme: dark) { .proj-ico { background: rgba(138, 21, 56, 0.28); color: var(--c200); } }
.proj-ico svg { width: 19px; height: 19px; }
.proj-text { display: flex; flex-direction: column; min-width: 0; }
.proj-name { font-weight: 700; font-size: 15px; letter-spacing: -0.02em; }
.proj-meta { font-size: 12.5px; color: var(--muted); }
.main.home.project .messages { flex: 0 0 auto; padding-top: 28px; }
.conv-open { display: flex; align-items: center; gap: 8px; }
.conv-title { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-tag { flex: none; margin-left: 0; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Dikte ---------- */
.mic[aria-pressed="true"] { background: var(--c600); color: #fff; border-color: transparent; animation: micpulse 1.4s ease-in-out infinite; }
@keyframes micpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(138, 21, 56, 0.45); } 50% { box-shadow: 0 0 0 8px rgba(138, 21, 56, 0); } }

/* ---------- Yazdırma / PDF ---------- */
#print-root { display: none; }
@media print {
  @page { margin: 16mm 14mm; }
  body { background: #fff !important; color: #1a0a10 !important; }
  body::before { display: none !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; font-family: var(--sans); color: #1a0a10; }
  .pr-head { border-bottom: 2px solid #8a1538; padding-bottom: 10px; margin-bottom: 18px; }
  .pr-brand { font-weight: 800; color: #8a1538; letter-spacing: -0.03em; font-size: 13px; }
  .pr-head h1 { margin: 4px 0 2px; font-size: 22px; letter-spacing: -0.03em; }
  .pr-date { font-size: 11px; color: #7a5a63; }
  .pr-label { margin: 18px 0 6px; font-size: 12px; font-weight: 700; color: #8a1538; text-transform: uppercase; letter-spacing: .06em; }
  .pr-body { font-size: 12pt; line-height: 1.55; }
  .pr-body .code-head .copy-code { display: none; }
  .pr-body .code-wrap, .pr-body .table-wrap, .pr-body .katex-display { break-inside: avoid; border-color: #e8c1ca; background: #fff; }
  .pr-body pre { white-space: pre-wrap; }
  .pr-body a { color: #8a1538; }
}

/* ---------- Çalışma setleri ---------- */
.study { margin: 14px 0 4px; }
.st-loading { padding: 16px; border-radius: 18px; border: 1px dashed var(--line); color: var(--muted); font-size: 14px; text-align: center; }
.st-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.st-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px; }
.st-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(135deg, var(--c500), var(--c700)); box-shadow: var(--btn-shadow); }
.st-ico svg { width: 21px; height: 21px; }
.st-htext { min-width: 0; }
.st-title { font-weight: 750; font-size: 15.5px; letter-spacing: -0.02em; }
.st-meta { font-size: 12.5px; color: var(--muted); }
.st-tabs { display: flex; gap: 4px; margin: 0 12px 4px; padding: 4px; background: var(--bg); border-radius: 13px; }
.st-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; border-radius: 10px; padding: 8px 6px; font-size: 13px; font-weight: 600; color: var(--text-soft); }
.st-tab svg { width: 15px; height: 15px; }
.st-tab[aria-pressed="true"] { background: var(--surface); color: var(--accent-deep); box-shadow: var(--shadow-sm); }
.st-tab:active { transform: none; }
.st-body { padding: 10px 16px 16px; }
.st-progress { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.st-progress i { flex: 1; height: 5px; border-radius: 99px; background: var(--surface-2); position: relative; overflow: hidden; }
.st-progress i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, var(--c400), var(--c600)); transition: width .4s var(--ease); }
.st-q { font-weight: 650; font-size: 15.5px; margin-bottom: 12px; }
.st-opts { display: flex; flex-direction: column; gap: 8px; }
.st-opt {
  display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 11px 12px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 14.5px;
}
.st-opt:not(:disabled):hover { border-color: rgba(138, 21, 56, 0.35); }
.st-opt:disabled { cursor: default; opacity: 1; }
.st-letter { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; font-size: 12.5px; font-weight: 750; background: var(--surface-2); color: var(--accent-deep); }
.st-otext { flex: 1; min-width: 0; }
.st-mark { width: 20px; height: 20px; flex: none; }
.st-mark svg { width: 20px; height: 20px; stroke-width: 2.4; }
.st-opt.right { background: var(--c600); border-color: var(--c600); color: #fff; }
.st-opt.right .st-letter { background: rgba(255, 255, 255, 0.2); color: #fff; }
.st-opt.wrong { border-color: var(--c300); color: var(--muted); text-decoration: line-through; text-decoration-color: var(--c300); }
.st-opt.wrong .st-mark { color: var(--c400); }
.st-explain { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--user); font-size: 14px; }
.st-explain strong { color: var(--accent-deep); }
.st-actions { display: flex; gap: 8px; margin-top: 12px; }
.st-btn { flex: 1; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 14px; padding: 11px 12px; font-weight: 650; font-size: 14px; }
.st-btn.primary { border: 0; color: #fff; background: linear-gradient(180deg, var(--c500), var(--c700)); box-shadow: var(--btn-shadow); }
.st-next { width: 100%; margin-top: 12px; }
.st-flip { position: relative; width: 100%; min-height: 170px; border: 0; padding: 0; background: none; perspective: 1000px; display: block; }
.st-flip:active { transform: none; }
.st-face {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  padding: 18px; border-radius: 18px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .55s var(--ease);
  border: 1px solid var(--line); background: var(--bg); font-size: 16px; font-weight: 600;
}
.st-face.back { transform: rotateY(180deg); background: linear-gradient(160deg, var(--c600), var(--c800)); color: #fff; border-color: transparent; font-weight: 500; }
.st-flip.flipped .front { transform: rotateY(-180deg); }
.st-flip.flipped .back { transform: rotateY(0); }
.st-hint { font-size: 11.5px; font-weight: 600; opacity: .65; text-transform: uppercase; letter-spacing: .06em; }
.st-answer { width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 14px; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--text); resize: vertical; outline: none; }
.st-answer:focus { border-color: rgba(138, 21, 56, 0.35); box-shadow: 0 0 0 4px var(--ring); }
.st-feedback { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; padding: 12px; border-radius: 14px; background: var(--user); font-size: 14px; }
.st-pill { flex: none; font-weight: 800; font-size: 20px; color: var(--accent-deep); letter-spacing: -0.03em; }
.st-pill small, .st-score small { font-size: .55em; color: var(--muted); font-weight: 600; }
.st-summary { text-align: center; padding: 8px 0 2px; }
.st-score { font-size: 44px; font-weight: 800; letter-spacing: -0.05em; color: var(--accent-deep); }
.st-msg { font-size: 14.5px; color: var(--text-soft); margin-top: 2px; }
.sug-review { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 12px; background: linear-gradient(135deg, var(--c50), var(--surface)); border-color: rgba(138, 21, 56, 0.18); }
.sug-review .sug-ico { margin-bottom: 0; flex: none; }
.sug-review .sug-t { flex: 1; }
.sug-review .sug-s { display: none; }
@media (prefers-color-scheme: dark) { .sug-review { background: linear-gradient(135deg, rgba(138, 21, 56, 0.22), var(--surface)); } }
.st-face.back .content, .st-face.back .content * { color: #fff; }
.st-face .content { color: inherit; }

.quality-box { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 12px; padding: 12px; border-radius: 14px; background: var(--user); }
.quality-box strong { display: block; font-size: 14px; color: var(--text); }
.quality-box small { display: block; font-size: 12.5px; color: var(--text-soft); margin-top: 2px; line-height: 1.45; }
.q-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--c600); box-shadow: 0 0 0 4px rgba(138, 21, 56, 0.15); }
.q-dot.q-balanced { background: var(--c500); } .q-dot.q-eco { background: var(--c400); } .q-dot.q-saver, .q-dot.q-over { background: var(--c300); }

/* ---------- Seçenek satırı alt yazısı ---------- */
.pop-row span small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; line-height: 1.3; }

/* ---------- Kodun ürettiği grafikler ve dosyalar ---------- */
.gfile { margin: 14px 0 4px; }
.gimg { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.gimg-zoom { display: block; width: 100%; padding: 0; border: 0; background: #fff; cursor: zoom-in; }
.gimg-zoom:active { transform: none; }
.gimg img { display: block; width: 100%; height: auto; }
.gfile-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface); border-top: 1px solid var(--line); font-size: 13px; color: var(--text-soft); }
.gfile-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gfile .link-btn { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; font-weight: 650; }
.gfile .link-btn svg { width: 15px; height: 15px; }
.gchip { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.gchip-ico, .docref-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--c100); color: var(--c600); }
.gchip-ico svg, .docref-ico svg { width: 19px; height: 19px; }
.gchip-t, .docref-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gchip-t span, .docref-t span { font-weight: 650; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.gchip-t small, .docref-t small { color: var(--muted); font-size: 12.5px; }
.img-viewer { position: fixed; inset: 0; z-index: 60; background: rgba(26, 6, 12, 0.88); display: grid; place-items: center; padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 16px); animation: fade .25s var(--ease); cursor: zoom-out; }
.img-viewer img { max-width: 100%; max-height: 100%; border-radius: 12px; background: #fff; }
@media (prefers-color-scheme: dark) {
  .gchip-ico, .docref-ico { background: rgba(138, 21, 56, 0.28); color: var(--c200); }
  .gimg { background: #fff; }
}

/* ---------- Belge kartı (sohbet içinde) ---------- */
.docref { margin: 14px 0 4px; }
.docref-card { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; border: 1px solid rgba(138, 21, 56, 0.18); border-radius: 18px;
  background: linear-gradient(135deg, var(--c50), var(--surface)); color: var(--text); box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; }
.docref-card:hover { border-color: rgba(138, 21, 56, 0.35); box-shadow: var(--shadow); }
.docref-go { width: 18px; height: 18px; color: var(--muted); flex: none; }
@media (prefers-color-scheme: dark) { .docref-card { background: linear-gradient(135deg, rgba(138, 21, 56, 0.2), var(--surface)); border-color: rgba(232, 193, 202, 0.12); } }

/* ---------- Belge alanı ---------- */
.canvas { position: fixed; inset: 0; z-index: 35; display: flex; flex-direction: column; background: var(--surface);
  padding-top: env(safe-area-inset-top); animation: cv-in .35s var(--ease); }
.canvas[hidden] { display: none; }
@keyframes cv-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (min-width: 900px) {
  .canvas { position: relative; inset: auto; z-index: auto; flex: 0 0 min(52vw, 760px); height: 100%; border-left: 1px solid var(--line); box-shadow: -12px 0 40px -24px rgba(74, 11, 30, 0.25); animation: cv-side .35s var(--ease); }
  @keyframes cv-side { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
}
.cv-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px 4px; }
.cv-title { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 750; font-size: 17px; letter-spacing: -0.02em;
  padding: 6px 8px; border-radius: 10px; outline: none; text-overflow: ellipsis; }
.cv-title:focus { background: var(--surface-2); }
.cv-status { font-size: 12px; color: var(--muted); white-space: nowrap; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
.cv-head .icon-btn:disabled { opacity: .35; }
.cv-tabs { margin: 2px 16px 8px; align-self: flex-start; width: 230px; }
.cv-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; }
.cv-preview { width: 100%; max-width: 720px; margin: 0 auto; padding: 8px 22px 120px; font-size: 16px; line-height: 1.7; user-select: text; -webkit-user-select: text; }
.cv-preview h1 { font-size: 26px; letter-spacing: -0.03em; margin-top: 6px; }
.cv-editor { width: 100%; max-width: 760px; margin: 0 auto; min-height: 100%; border: 0; outline: none; resize: none; background: transparent; color: var(--text);
  padding: 8px 22px 140px; font: inherit; font-size: 15.5px; line-height: 1.7; tab-size: 2; }
.cv-sel { position: absolute; left: 10px; right: 10px; bottom: calc(env(safe-area-inset-bottom) + 10px); z-index: 2; padding: 10px; border-radius: 20px;
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid var(--line); box-shadow: var(--shadow); animation: cv-in .25s var(--ease); }
.cv-sel-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
.cv-sel-row::-webkit-scrollbar { display: none; }
.cv-sel-row button { flex: none; border: 1px solid rgba(138, 21, 56, 0.18); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 13px; font-size: 13.5px; font-weight: 650; }
.cv-sel-row button:hover { border-color: var(--accent); color: var(--accent-deep); }
.cv-ask { display: flex; gap: 8px; align-items: center; }
.cv-ask input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 14px; padding: 10px 12px; font: inherit; font-size: 15px; outline: none; }
.cv-ask input:focus { border-color: rgba(138, 21, 56, 0.35); box-shadow: 0 0 0 4px var(--ring); }
.send.sm { width: 38px; height: 38px; flex: none; }
.cv-sel.busy { pointer-events: none; opacity: .65; }
.cv-sel.busy::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 4px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--c600), transparent); background-size: 200% 100%; animation: cv-load 1.1s linear infinite; }
@keyframes cv-load { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.canvas.selecting .cv-preview, .canvas.selecting .cv-editor { padding-bottom: 200px; }

/* ---------- Hatırlatıcılar ---------- */
.notif-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; background: var(--user); margin: 4px 0 6px; }
.notif-card strong { font-size: 15px; }
.notif-card small { color: var(--text-soft); font-size: 13px; line-height: 1.45; }
.notif-card .btn-primary { margin-top: 10px; }
.notif-card.on strong::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c600); box-shadow: 0 0 0 4px rgba(138, 21, 56, 0.15); margin-right: 9px; vertical-align: 2px; }
.notif-actions { display: flex; gap: 16px; margin-top: 6px; }
.rem-item { align-items: center; }
.rem-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rem-t small { color: var(--muted); font-size: 12.5px; }
.rem-form { display: grid; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.rem-form input, .rem-form select { width: 100%; min-width: 0; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 14px; padding: 11px 12px; font: inherit; font-size: 15px; outline: none; -webkit-appearance: none; appearance: none; }
.rem-form input:focus, .rem-form select:focus { border-color: rgba(138, 21, 56, 0.35); box-shadow: 0 0 0 4px var(--ring); }
.rem-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.rem-row select { width: auto; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }

@media print { .canvas, .cv-sel { display: none !important; } }

/* ---------- Fıstık (küredeki kedi) ---------- */
.orb { width: 120px; height: 120px; padding: 0; border: 0; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.orb:active { transform: none; }
.kitty { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; overflow: visible; fill: #000; stroke: none; stroke-width: 1; stroke-linecap: butt; stroke-linejoin: miter; }
.kitty * { transform-box: view-box; }
.k-tail { transform-origin: 140px 182px; animation: k-tail 2.6s ease-in-out infinite; }
.k-head { transform-origin: 100px 140px; animation: k-head 7s ease-in-out infinite; }
.k-eye { transform-box: fill-box; transform-origin: center; animation: k-blink 5.5s infinite; }
.k-ear-r { transform-origin: 126px 72px; animation: k-ear 6.5s ease-in-out infinite; }
.k-tag { transform-origin: 100px 141px; animation: k-tag 3.2s ease-in-out infinite; }
@keyframes k-tail { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(9deg); } }
@keyframes k-head { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-3deg); } 65% { transform: rotate(2.5deg); } }
@keyframes k-blink { 0%, 44%, 49%, 100% { transform: scaleY(1); } 46.5% { transform: scaleY(0.08); } }
@keyframes k-ear { 0%, 80%, 90%, 100% { transform: rotate(0); } 84% { transform: rotate(10deg); } 87% { transform: rotate(-3deg); } }
@keyframes k-tag { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
/* ---------- Fıstık ile etkileşim ---------- */
.orb-wrap { position: relative; width: max-content; margin: 0 auto 26px; }
.orb-wrap .orb { margin: 0; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.k-happy { opacity: 0; }
.k-eyes, .k-happy, .k-sit, .k-belly { transition: opacity .2s; }
.k-belly { opacity: 0; }
.orb.happy .k-eyes, .orb.purr .k-eyes { opacity: 0; }
.orb.happy .k-happy, .orb.purr .k-happy { opacity: 1; }
.orb.hop .kitty { animation: k-hop .7s cubic-bezier(.3, 1.6, .5, 1); }
.orb.ears .k-ear-r { animation: k-wig .18s ease-in-out 4 alternate; }
.orb.ears .k-ear-l { transform-origin: 74px 72px; animation: k-wig .18s ease-in-out 4 alternate-reverse; }
.orb.tilt .k-head { animation: k-tilt 1.4s ease-in-out; }
.orb.purr .kitty { animation: k-purr .14s linear infinite; }
.orb.purr .k-tail { animation-duration: 1.2s; }
/* Yuvarlanıp karnını açma */
.k-sit { transform-origin: 100px 175px; }
.k-belly { transform-origin: 110px 140px; }
.orb.belly .k-sit { animation: k-sit-out .5s ease-in forwards; }
.orb.belly .k-belly { animation: k-belly-in .55s .32s cubic-bezier(.3, 1.4, .5, 1) both; }
.orb.belly .k-legs-f { transform-origin: 97px 112px; animation: k-paw .42s ease-in-out infinite alternate; }
.orb.belly .k-legs-b { transform-origin: 150px 118px; animation: k-paw .5s ease-in-out infinite alternate-reverse; }
.orb.belly .k-btail { transform-origin: 162px 138px; animation: k-tail .6s ease-in-out infinite; }
.orb.back .k-sit { animation: k-sit-in .5s cubic-bezier(.3, 1.4, .5, 1) both; }
.orb.back .k-belly { animation: k-belly-out .3s ease-in both; }
@keyframes k-hop { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-7%); } 60% { transform: translateY(1%); } }
@keyframes k-wig { from { transform: rotate(-6deg); } to { transform: rotate(10deg); } }
@keyframes k-tilt { 0%, 100% { transform: rotate(0); } 30%, 70% { transform: rotate(11deg); } }
@keyframes k-purr { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(.5px, -.3px); } 75% { transform: translate(-.5px, .3px); } }
@keyframes k-sit-out { to { opacity: 0; transform: rotate(-70deg) scale(.85) translateY(10px); } }
@keyframes k-sit-in { from { opacity: 0; transform: rotate(-70deg) scale(.85) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes k-belly-in { from { opacity: 0; transform: rotate(60deg) translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes k-belly-out { from { opacity: 1; } to { opacity: 0; transform: rotate(60deg) translateY(-10px); } }
@keyframes k-paw { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
/* Uçuşan kalpler ve konuşma balonu */
.pp { position: absolute; left: 50%; top: 34%; pointer-events: none; z-index: 3; animation: pp-up 1.5s cubic-bezier(.2, .7, .3, 1) forwards; }
.pp svg { width: 20px; height: 20px; fill: currentColor; stroke: none; display: block; filter: drop-shadow(0 3px 6px rgba(138, 21, 56, 0.35)); }
.pp-heart { color: var(--c400); }
.pp-heart.c2 { color: var(--c600); }
.pp-heart.c3 { color: var(--c300); }
.pp-spark { color: var(--c200); }
.pp-spark svg { width: 14px; height: 14px; }
@keyframes pp-up {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.3) rotate(0); }
  15% { opacity: 1; transform: translate(calc(-50% + var(--dx) * .3), -12px) scale(1.1) rotate(calc(var(--rot) * .3)); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), -95px) scale(.8) rotate(var(--rot)); }
}
.pp-say { position: absolute; top: -4px; left: calc(100% - 22px); z-index: 3; pointer-events: none; white-space: nowrap;
  font-size: 13px; font-weight: 800; letter-spacing: -0.01em; color: var(--accent-deep); background: var(--surface); padding: 4px 10px; border-radius: 12px 12px 12px 3px;
  box-shadow: var(--shadow); border: 1px solid var(--line); animation: pp-say 1.7s var(--ease) forwards; }
@keyframes pp-say { 0% { opacity: 0; transform: translateY(6px) scale(.8); } 12%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-6px); } }
/* ---------- Aşkıfonki: yeni hareketler ---------- */
.k-look { transition: transform .35s cubic-bezier(.3, 1.3, .5, 1); }
.k-yawn { opacity: 0; transform-origin: 100px 122px; }
.k-wave { opacity: 0; transform-origin: 141px 174px; }
.kitty { transform-origin: 50% 100%; }
.orb.yawn .k-yawn { animation: k-yawn 1.5s ease-in-out; }
.orb.yawn .k-eyes, .orb.sleepy .k-eyes { opacity: 0; }
.orb.yawn .k-happy, .orb.sleepy .k-happy { opacity: 1; }
.orb.slow .k-eye { animation: k-slowblink 1.7s ease-in-out; }
.orb.look .k-look { animation: k-look 2.3s ease-in-out; }
.orb.wave .k-wave { animation: k-wave 1.7s ease-in-out; }
.orb.stretch .kitty { animation: k-stretch 1.3s ease-in-out; }
.orb.hug .kitty { animation: k-hug 1.6s cubic-bezier(.3, 1.4, .5, 1); }
.orb.sleepy .k-head { animation: k-doze 4.5s ease-in-out infinite; }
.orb.sleepy .k-tail { animation-duration: 6s; }
.orb.sleepy .k-ear-r { animation: none; }
@keyframes k-yawn { 0%, 100% { opacity: 0; transform: scale(.3); } 25%, 70% { opacity: 1; transform: scale(1); } }
@keyframes k-slowblink { 0%, 100% { transform: scaleY(1); } 30%, 62% { transform: scaleY(.1); } }
@keyframes k-look { 0%, 100% { transform: translate(0, 0); } 20%, 40% { transform: translate(-2.6px, -.6px); } 60%, 80% { transform: translate(2.6px, -.6px); } }
@keyframes k-wave {
  0% { opacity: 0; transform: rotate(45deg) translateY(10px); }
  12% { opacity: 1; transform: rotate(0); }
  27% { transform: rotate(-16deg); } 42% { transform: rotate(8deg); } 57% { transform: rotate(-16deg); } 72% { transform: rotate(8deg); }
  86% { opacity: 1; transform: rotate(0); }
  100% { opacity: 0; transform: rotate(45deg) translateY(10px); }
}
@keyframes k-stretch { 0%, 100% { transform: none; } 35% { transform: scale(.97, 1.06); } 60% { transform: scale(1.03, .97); } }
@keyframes k-hug { 0%, 100% { transform: none; } 25% { transform: scale(1.08, .94); } 50% { transform: scale(.96, 1.04); } 70% { transform: scale(1.02); } }
@keyframes k-doze { 0%, 100% { transform: rotate(-2deg) translateY(1px); } 50% { transform: rotate(3deg) translateY(3px); } }
.pp-zzz { color: var(--c200); left: 66%; top: 18%; animation-duration: 2.4s; }
.pp-zzz svg { width: 16px; height: 16px; }
@media (prefers-color-scheme: light) { .pp-zzz { color: var(--c500); } }
.pp-say.long { left: 50%; top: -40px; white-space: normal; width: max-content; max-width: min(250px, 80vw); text-align: center; border-radius: 14px; animation-name: pp-say-c; line-height: 1.3; padding: 6px 12px; }
@keyframes pp-say-c { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.85); } 10%, 82% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -6px); } }
.pet-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.pet-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pet-t strong { font-size: 14.5px; }
.pet-t small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
/* ---------- Aşkıfonki: kuyruk sallama, dans, popo sallama ---------- */
.orb.wag .k-tail { animation: k-wag .2s ease-in-out infinite alternate; }
@keyframes k-wag { from { transform: rotate(-16deg); } to { transform: rotate(18deg); } }

.orb.dance .kitty { animation: k-dance 1s ease-in-out 3; }
.orb.dance .k-head { animation: k-bob .25s ease-in-out infinite alternate; }
.orb.dance .k-tail { animation: k-wag .25s ease-in-out infinite alternate; }
.orb.dance .k-wave { animation: k-dance-paw .5s ease-in-out infinite alternate; opacity: 1; }
.orb.dance .k-tag { animation: k-tag .25s ease-in-out infinite alternate; }
@keyframes k-dance {
  0%, 100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-5%) rotate(-7deg) translateY(-2%); }
  50% { transform: translateX(0) rotate(0) translateY(1%); }
  75% { transform: translateX(5%) rotate(7deg) translateY(-2%); }
}
@keyframes k-bob { from { transform: translateY(-1.5px) rotate(-4deg); } to { transform: translateY(2px) rotate(4deg); } }
@keyframes k-dance-paw { from { transform: rotate(-22deg); } to { transform: rotate(10deg); } }

/* Popo sallama: gövde alttan sağa sola, kafa yerinde kalır */
.orb.booty .k-sit { animation: k-booty .18s ease-in-out 12 alternate; }
.orb.booty .k-head { transform-origin: 100px 140px; animation: k-booty-head .18s ease-in-out 12 alternate; }
.orb.booty .k-tail { animation: k-wag .18s ease-in-out infinite alternate; }
@keyframes k-booty { from { transform: translateX(-7px) rotate(-9deg); } to { transform: translateX(7px) rotate(9deg); } }
@keyframes k-booty-head { from { transform: translateX(5px) rotate(8deg); } to { transform: translateX(-5px) rotate(-8deg); } }

.pp-note { color: var(--c400); }
.pp-note.c2 { color: var(--c600); }
.pp-note svg { width: 18px; height: 18px; }
/* ---------- OIIA dansı: kendi ekseninde dönme ---------- */
.orb { perspective: 420px; }
.orb.oiia .kitty { animation: k-oiia var(--oiia-dur, .85s) linear var(--oiia-n, 2); }
.orb.oiia .k-yawn { animation: k-oiia-mouth var(--oiia-dur, .85s) linear var(--oiia-n, 2); }
.orb.oiia .k-tail { animation: k-wag .12s linear infinite alternate; }
.orb.oiia .k-tag { animation: k-tag .15s linear infinite alternate; }
/* "o-i-i" boyunca hızla döner, "a"da yüzü öne dönük durur ve ağzını açar */
@keyframes k-oiia {
  0% { transform: rotateY(0) translateY(0); }
  52% { transform: rotateY(1080deg) translateY(-4%); }
  58%, 100% { transform: rotateY(1080deg) translateY(0) scale(1.04); }
}
@keyframes k-oiia-mouth { 0%, 54% { opacity: 0; transform: scale(.3); } 62%, 92% { opacity: 1; transform: scale(1.15); } 100% { opacity: 0; } }
.orb.oiia .k-eyes { opacity: 0; }
.orb.oiia .k-happy { opacity: 1; }
