/* gizli. — kâğıt & mürekkep. Dış font yok, gradyan yok, parıltı yok. */
:root {
  --paper: #f5f3ee;
  --surface: #fbfaf7;
  --surface-2: #ece9e2;
  --ink: #161514;
  --ink-2: #3b3936;
  --muted: #7a756d;
  --faint: #a8a39a;
  --line: #e0dcd3;
  --line-2: #cfcac0;
  --accent: #c2412a;
  --accent-ink: #fff;
  --ok: #2e6f4a;
  --mine: #1c1b1a;
  --mine-ink: #f3f1ec;
  --mine-muted: #a9a59d;
  --theirs: #fbfaf7;
  --shadow: 0 1px 0 rgba(0,0,0,.04), 0 8px 24px -12px rgba(0,0,0,.18);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --r: 14px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111110;
    --surface: #181817;
    --surface-2: #222120;
    --ink: #ecebe6;
    --ink-2: #cfccc5;
    --muted: #8e8a83;
    --faint: #5f5c57;
    --line: #2a2927;
    --line-2: #3a3936;
    --accent: #e0644a;
    --ok: #6bbf8a;
    --mine: #ecebe6;
    --mine-ink: #151514;
    --mine-muted: #6f6c66;
    --theirs: #1d1c1b;
    --shadow: 0 1px 0 rgba(0,0,0,.4), 0 10px 30px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111110; --surface: #181817; --surface-2: #222120;
  --ink: #ecebe6; --ink-2: #cfccc5; --muted: #8e8a83; --faint: #5f5c57;
  --line: #2a2927; --line-2: #3a3936; --accent: #e0644a; --ok: #6bbf8a;
  --mine: #ecebe6; --mine-ink: #151514; --mine-muted: #6f6c66; --theirs: #1d1c1b;
  --shadow: 0 1px 0 rgba(0,0,0,.4), 0 10px 30px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* Tarayıcıların alanlara eklediği otomatik doldurma / sayı oku / şifre göster simgelerini gizle */
input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button,
input::-webkit-strong-password-auto-fill-button { visibility: hidden; display: none !important; pointer-events: none; position: absolute; right: 0; }
input::-webkit-inner-spin-button, input::-webkit-outer-spin-button, input::-webkit-search-decoration, input::-webkit-search-cancel-button { -webkit-appearance: none; margin: 0; }
input::-ms-reveal, input::-ms-clear { display: none; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  background: var(--paper); color: var(--ink);
  font: 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }

#app {
  position: fixed; left: 0; right: 0; top: 0;
  height: var(--app-h, 100vh); height: var(--app-h, 100dvh);
  display: flex;
}
.screen { display: none; flex: 1; min-width: 0; }
.screen.active { display: flex; }

/* wordmark */
.wm { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -.02em; line-height: 1; }
.wm i { font-style: normal; color: var(--accent); }
.wm.big { font-size: 44px; }

/* ---------- boot ---------- */
#boot { align-items: center; justify-content: center; }
.boot-mark { opacity: .9; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }

/* ---------- buttons / inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-weight: 560; font-size: 15px; transition: background .15s, border-color .15s, transform .08s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.primary:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.danger { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn.block { width: 100%; }
.link-btn { color: var(--muted); font-size: 13px; padding: 4px 0; }
.link-btn:hover { color: var(--ink); }

.icon {
  width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2); flex: none;
}
.icon:hover { background: var(--surface-2); }
.icon.sm { width: 32px; height: 32px; }
.icon.sm svg { width: 18px; height: 18px; }

input[type=text], input[type=email], input[type=password], textarea {
  width: 100%; border: 1px solid var(--line-2); background: var(--surface); border-radius: 10px;
  padding: 11px 12px; font-size: 16px; /* iOS zoom'u engeller */ outline: none;
}
input:focus, textarea:focus { border-color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--faint); }

/* ---------- auth ---------- */
#auth {
  overflow-y: auto; -webkit-overflow-scrolling: touch; position: relative;
  align-items: center; justify-content: center;
  padding: calc(56px + var(--sat)) 16px calc(32px + var(--sab));
  background-color: var(--paper);
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
}
.theme-btn { position: absolute; top: calc(12px + var(--sat)); right: calc(12px + var(--sar)); }
.auth-card {
  width: 100%; max-width: 400px; margin: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: 36px 32px 28px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  animation: rise .35s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.mark { width: 44px; height: 44px; border-radius: 13px; background: var(--ink); position: relative; margin-bottom: 26px; flex: none; }
.mark i { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); right: 9px; bottom: 9px; }
.boot-mark .mark { margin: 0; }
.auth-title { margin: 0 0 6px; font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: -.02em; line-height: 1.1; }
.auth-sub { margin: 0 0 26px; color: var(--muted); font-size: 15px; }
.auth-sub b { color: var(--ink); font-weight: 600; }
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .row-lbl { display: flex; justify-content: space-between; align-items: baseline; }
.field .row-lbl .link-btn { font-weight: 500; padding: 0; }
.field small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
#auth input[type=text], #auth input[type=email], #auth input[type=password] { height: 48px; background: var(--paper); border-color: var(--line); transition: border-color .15s, background .15s; }
#auth input:focus { background: var(--surface); border-color: var(--ink); }
.prefix { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); height: 48px; }
.prefix:focus-within { border-color: var(--ink); background: var(--surface); }
.prefix b { padding-left: 13px; color: var(--muted); font-weight: 500; }
#auth .prefix input { border: 0; background: transparent; padding-left: 3px; height: 46px; }
.pw { position: relative; }
#auth .pw input { padding-right: 46px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.pw-eye:hover { color: var(--ink); }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.meter i { height: 3px; border-radius: 2px; background: var(--line); transition: background .2s; }
.meter[data-s="1"] i:nth-child(-n+1) { background: var(--accent); }
.meter[data-s="2"] i:nth-child(-n+2) { background: #c99a14; }
.meter[data-s="3"] i:nth-child(-n+3) { background: var(--ok); }
.meter[data-s="4"] i { background: var(--ok); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#auth .btn.primary { height: 50px; margin-top: 4px; position: relative; overflow: hidden; border-radius: 12px; }
.btn .lbl { position: relative; z-index: 1; }
.btn.busy::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 0%); background: color-mix(in srgb, var(--paper) 22%, transparent); transition: width .2s; }
.form-msg { margin: 0; min-height: 1.2em; font-size: 13.5px; color: var(--accent); line-height: 1.4; }
.form-msg:empty { display: none; }
.form-msg.ok { color: var(--ok); }
.code-input { font-family: var(--mono); font-size: 26px !important; letter-spacing: .55em; text-align: center; padding: 10px 0 10px .55em !important; height: 58px !important; }
.auth-switch { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; font-size: 14px; color: var(--muted); }
.auth-switch button { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
@media (max-width: 480px) {
  #auth { background-image: none; padding-top: calc(64px + var(--sat)); align-items: flex-start; }
  .auth-card { border: 0; box-shadow: none; padding: 8px 8px 20px; background: transparent; margin-top: 0; }
  .auth-title { font-size: 28px; }
}

/* ---------- panel layout ---------- */
#panel { min-height: 0; }
.side {
  width: 340px; flex: none; display: flex; flex-direction: column; min-height: 0;
  border-right: 1px solid var(--line); background: var(--paper);
  padding-top: var(--sat); padding-left: var(--sal);
}
.pane { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; background: var(--surface); padding-right: var(--sar); }

.side-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 18px; }
.side-actions { display: flex; align-items: center; gap: 4px; }
.me-btn { border-radius: 50%; padding: 2px; }

.search { display: flex; align-items: center; gap: 6px; margin: 4px 14px 8px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); padding: 3px 3px 3px 12px; }
.search:focus-within { border-color: var(--ink); }
.search-at { color: var(--muted); }
.search input { border: 0; background: transparent; padding: 8px 2px; min-width: 0; }
.search-result { margin: 0 14px 8px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; align-items: center; gap: 12px; background: var(--surface); }
.search-result .grow { flex: 1; min-width: 0; }
.search-result .sub { color: var(--muted); font-size: 12.5px; }

.invites { display: flex; flex-direction: column; gap: 8px; margin: 0 14px; }
.invites:not(:empty) { margin-bottom: 10px; }
.invite { border: 1px solid var(--ink); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); animation: slideIn .25s ease; }
.invite-top { display: flex; align-items: center; gap: 10px; }
.invite-top .grow { flex: 1; min-width: 0; }
.invite-top .sub { font-size: 12.5px; color: var(--muted); }
.invite .warn { font-size: 12.5px; color: var(--accent); }
.invite-actions { display: flex; gap: 8px; }
.invite-actions .btn { flex: 1; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-4px); } }

.list-head { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 18px 6px; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.list-head .link-btn { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12.5px; }
.list { list-style: none; margin: 0; padding: 0 6px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; min-height: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.list li:hover { background: var(--surface-2); }
.list li.on { background: var(--surface-2); }
.list .grow { flex: 1; min-width: 0; }
.list .nm { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.list .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.list .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ink); color: var(--paper); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.list-empty { padding: 6px 18px; color: var(--faint); font-size: 13.5px; }
.list:not(:empty) + .list-empty { display: none; }
.side-foot { display: flex; gap: 18px; padding: 10px 18px calc(12px + var(--sab)); border-top: 1px solid var(--line); }

.ava {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--paper); background: var(--ink); text-transform: lowercase;
}
.ava.sm { width: 32px; height: 32px; font-size: 15px; }
.ava.t1 { background: #2f4a5c; } .ava.t2 { background: #5a3d2b; } .ava.t3 { background: #3f5a3a; }
.ava.t4 { background: #5b2f3f; } .ava.t5 { background: #4b4560; } .ava.t6 { background: #6a5531; }
.ava.t1, .ava.t2, .ava.t3, .ava.t4, .ava.t5, .ava.t6 { color: #f5f3ee; }

/* ---------- welcome / tanıtım ---------- */
.welcome { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: calc(48px + var(--sat)) 48px 48px; }
.wl { max-width: 640px; }
.wl h1 { font-family: var(--serif); font-weight: 600; font-size: 34px; letter-spacing: -.02em; line-height: 1.12; margin: 0 0 10px; }
.wl .lede { color: var(--muted); font-size: 16px; margin: 0 0 36px; max-width: 520px; }
.wl h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 36px 0 14px; font-weight: 650; }
.steps { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.steps .n { font-family: var(--serif); font-size: 22px; color: var(--accent); line-height: 1.1; }
.steps b { display: block; margin-bottom: 3px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 14px; }
.sees { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sees > div { padding: 14px 16px; }
.sees > div + div { border-left: 1px solid var(--line); }
.sees h4 { margin: 0 0 8px; font-size: 13px; }
.sees ul { margin: 0; padding-left: 16px; color: var(--ink-2); font-size: 13.5px; }
.sees li { margin: 4px 0; }
.tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.tip { border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 13.5px; color: var(--ink-2); }
.tip b { display: block; color: var(--ink); margin-bottom: 4px; font-size: 14px; }
kbd { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--surface); }
.spec { font-family: var(--mono); font-size: 12.5px; color: var(--muted); line-height: 1.8; }

/* ---------- chat ---------- */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.chat-head {
  display: flex; align-items: center; gap: 4px; padding: calc(8px + var(--sat)) 10px 8px 12px;
  border-bottom: 1px solid var(--line); background: var(--surface); z-index: 2;
}
.chat-head .back { display: none; }
.peer { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.peer-meta { min-width: 0; }
.peer-name { font-weight: 650; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peer-status { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peer-status.ok { color: var(--ok); }
.peer-status.typing { color: var(--ink); }
.ttl-badge { font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--accent); color: var(--accent); }

.scroller { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.messages { display: flex; flex-direction: column; padding: 16px 14px 10px; gap: 2px; max-width: 820px; margin: 0 auto; min-height: 100%; justify-content: flex-end; }

.sys { align-self: center; text-align: center; max-width: 90%; margin: 10px 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.sys.warn { color: var(--accent); }
.sys.ok { color: var(--ok); }
.sys .emo { display: block; font-size: 20px; letter-spacing: 4px; margin: 4px 0; }
.sys button { margin-top: 6px; text-decoration: underline; text-underline-offset: 3px; color: var(--ink-2); font-size: 12.5px; }

.invite-card { align-self: center; width: 100%; max-width: 440px; border: 1px dashed var(--line-2); border-radius: 14px; padding: 16px; margin: 10px 0 20px; display: flex; flex-direction: column; gap: 10px; }
.invite-card b { font-size: 15px; }
.invite-card p { margin: 0; color: var(--muted); font-size: 13px; }
.linkbox { font-family: var(--mono); font-size: 12px; padding: 10px; border-radius: 8px; background: var(--surface-2); word-break: break-all; user-select: all; -webkit-user-select: all; max-height: 74px; overflow: hidden; }
.invite-card .row { display: flex; gap: 8px; }
.invite-card .row .btn { flex: 1; }

.msg { display: flex; flex-direction: column; max-width: min(78%, 560px); margin-top: 6px; position: relative; }
.msg.cont { margin-top: 1px; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.msg.in { align-self: flex-start; align-items: flex-start; }
.bubble {
  position: relative; padding: 8px 11px 6px; border-radius: 16px; font-size: 15px; line-height: 1.4;
  overflow-wrap: anywhere; white-space: pre-wrap; touch-action: pan-y;
  -webkit-touch-callout: none; transition: transform .18s ease;
}
.msg.out .bubble { background: var(--mine); color: var(--mine-ink); border-bottom-right-radius: 5px; }
.msg.in .bubble { background: var(--theirs); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.out.cont-next .bubble { border-bottom-right-radius: 16px; border-top-right-radius: 5px; }
.msg.out.cont .bubble { border-top-right-radius: 5px; }
.msg.in.cont .bubble { border-top-left-radius: 5px; }
.msg.flash .bubble { animation: flash 1s ease; }
@keyframes flash { 30% { box-shadow: 0 0 0 3px var(--accent); } }
.msg.burn { animation: burn .45s ease forwards; }
@keyframes burn { to { opacity: 0; transform: scale(.94); filter: blur(6px); } }

.text { display: inline; }
.meta { float: right; display: inline-flex; align-items: center; gap: 4px; margin: 6px 0 -2px 10px; font-size: 11px; line-height: 1; white-space: nowrap; color: var(--muted); user-select: none; -webkit-user-select: none; }
.msg.out .meta { color: var(--mine-muted); }
.meta svg { width: 15px; height: 15px; stroke-width: 2; }
.meta .read { color: var(--accent); }
.meta .cd { font-family: var(--mono); color: var(--accent); }
.meta .ed { font-style: italic; }

.quote { display: block; border-left: 2px solid var(--accent); padding: 2px 0 2px 8px; margin: 1px 0 6px; font-size: 13px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.quote b { display: block; font-size: 12px; color: var(--accent); }
.quote span { opacity: .75; }

.mimg { display: block; max-width: 100%; width: 300px; height: auto; border-radius: 10px; margin: -3px -6px 4px; max-height: 380px; object-fit: cover; cursor: zoom-in; background: var(--surface-2); user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.hold { position: relative; overflow: hidden; border-radius: 10px; margin: -3px -6px 4px; cursor: pointer; }
.hold .mimg { filter: blur(26px) saturate(.6); transform: scale(1.15); margin: 0; }
.hold span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px; font-size: 13px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5); }

.voice { display: flex; align-items: center; gap: 10px; min-width: 210px; padding: 2px 0; }
.vplay { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: currentColor; flex: none; }
.vplay svg { color: var(--mine); width: 16px; height: 16px; fill: currentColor; stroke: none; }
.msg.in .vplay svg { color: var(--theirs); }
.vbars { flex: 1; display: flex; align-items: center; gap: 2px; height: 28px; }
.vbars i { flex: 1; min-width: 2px; border-radius: 2px; background: currentColor; opacity: .3; }
.vbars i.on { opacity: 1; }
.vdur { font-family: var(--mono); font-size: 11.5px; opacity: .7; }

.reacts { display: flex; gap: 4px; margin-top: -4px; z-index: 1; }
.reacts:empty { display: none; }
.react { font-size: 13px; padding: 1px 6px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); line-height: 1.5; }
.react.mine { border-color: var(--ink); }

.swipe-ico { position: absolute; top: 50%; margin-top: -14px; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-2); opacity: 0; transition: opacity .1s; }
.msg.in .swipe-ico { right: -36px; } .msg.out .swipe-ico { left: -36px; }

.jump { position: absolute; right: 16px; bottom: 86px; width: 42px; height: 42px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; z-index: 3; }
.jump b { position: absolute; top: -6px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; background: var(--accent); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; }

.ctx-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.ctx-bar-ico { color: var(--accent); }
.ctx-bar-body { flex: 1; min-width: 0; border-left: 2px solid var(--accent); padding-left: 10px; }
.ctx-bar-body b { display: block; font-size: 12.5px; color: var(--accent); }
.ctx-bar-body span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.composer { display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px calc(8px + var(--sab)); border-top: 1px solid var(--line); background: var(--surface); }
.composer textarea { resize: none; max-height: 160px; min-height: 42px; line-height: 1.35; border-radius: 21px; padding: 10px 14px; background: var(--paper); }
.composer .icon { width: 42px; height: 42px; border-radius: 50%; }
.composer .send.has-text { background: var(--ink); color: var(--paper); }
.composer.disabled { opacity: .55; pointer-events: none; }
.rec-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px calc(10px + var(--sab)); border-top: 1px solid var(--line); background: var(--surface); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: breathe 1s infinite; }
#recTime { font-family: var(--mono); font-weight: 600; }
.rec-hint { flex: 1; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

body.nocopy .messages { user-select: none; -webkit-user-select: none; }

/* ---------- context menu ---------- */
.ctx { position: fixed; z-index: 40; min-width: 220px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; animation: pop .14s ease; }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
.ctx .reacts-row { display: flex; justify-content: space-between; padding: 4px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ctx .reacts-row button { font-size: 22px; width: 36px; height: 36px; border-radius: 50%; }
.ctx .reacts-row button:hover, .ctx .reacts-row button.on { background: var(--surface-2); }
.ctx .ci { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 8px; text-align: left; font-size: 14.5px; }
.ctx .ci:hover { background: var(--surface-2); }
.ctx .ci.danger { color: var(--accent); }

/* ---------- sheet ---------- */
.sheet-bd { position: fixed; inset: 0; z-index: 30; background: rgba(15,14,13,.42); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .18s; }
.sheet-bd.open { opacity: 1; }
.sheet {
  width: 100%; max-width: 520px; max-height: calc(var(--app-h, 100vh) - 40px - var(--sat));
  background: var(--surface); border-radius: 18px 18px 0 0; display: flex; flex-direction: column;
  transform: translateY(16px); transition: transform .2s ease; padding-bottom: var(--sab);
}
.sheet-bd.open .sheet { transform: none; }
@media (min-width: 720px) { .sheet-bd { align-items: center; } .sheet { border-radius: 18px; padding-bottom: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 8px 20px; }
.sheet-head h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: -.01em; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.sheet-body p { margin: 0; color: var(--ink-2); font-size: 14px; }
.sheet-body .muted { color: var(--muted); font-size: 13px; }
.opt-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.opt-list button { display: flex; justify-content: space-between; align-items: center; padding: 13px 14px; text-align: left; font-size: 15px; }
.opt-list button + button { border-top: 1px solid var(--line); }
.opt-list button.on { font-weight: 650; }
.opt-list button.on::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.opt-list button:hover { background: var(--surface-2); }
.row-set { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row-set .grow { flex: 1; min-width: 0; }
.row-set b { display: block; font-size: 14.5px; font-weight: 600; }
.row-set small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.4; margin-top: 2px; }
.sw { position: relative; width: 44px; height: 26px; flex: none; }
.sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sw i { position: absolute; inset: 0; border-radius: 13px; background: var(--line-2); transition: background .15s; pointer-events: none; }
.sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.sw input:checked + i { background: var(--ink); }
.sw input:checked + i::after { transform: translateX(18px); }
.profile { display: flex; align-items: center; gap: 14px; padding: 4px 0 8px; }
.profile .ava { width: 54px; height: 54px; font-size: 24px; }
.profile b { font-size: 18px; }
.code { font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.btn-col { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }

.verify { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.verify .emojis { font-size: 30px; letter-spacing: 6px; line-height: 1.3; }
.kgrid { display: grid; grid-template-columns: repeat(8, 18px); gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.kgrid i { width: 18px; height: 18px; border-radius: 2px; }
.kgrid .c0 { background: var(--paper); } .kgrid .c1 { background: var(--faint); } .kgrid .c2 { background: var(--accent); } .kgrid .c3 { background: var(--ink); }
.hex { font-family: var(--mono); font-size: 12.5px; color: var(--muted); word-break: break-all; line-height: 1.6; max-width: 300px; }
.verify .vstate { font-weight: 650; }

/* ---------- viewer / shield / toast ---------- */
.viewer { position: fixed; inset: 0; z-index: 50; background: #0b0b0a; display: flex; align-items: center; justify-content: center; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.shield { position: fixed; inset: 0; z-index: 60; background: var(--paper); display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; }
.shield small { color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--sab)); transform: translateX(-50%); z-index: 70; max-width: calc(100% - 32px); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow); animation: pop .15s ease; }

/* ---------- mobil ---------- */
@media (max-width: 760px) {
  .side { width: 100%; border-right: 0; padding-left: 0; }
  .pane { display: none; padding-right: 0; }
  body.in-pane .side { display: none; }
  body.in-pane .pane { display: flex; }
  .chat-head .back { display: inline-flex; }
  .welcome { padding: calc(20px + var(--sat)) 20px 40px; }
  .welcome .wl-back { display: inline-flex; }
  .wl h1 { font-size: 28px; }
  .sees { grid-template-columns: 1fr; }
  .sees > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .msg { max-width: 86%; }
  .jump { bottom: 80px; }
}
.wl-back { display: none; margin: 0 0 12px -8px; }
@media (hover: none) { .icon:hover, .list li:hover, .ctx .ci:hover { background: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- güvenlik kodu, tepkiler, kilit notu ---------- */
.sys.lock { display: flex; gap: 8px; align-items: flex-start; text-align: left; max-width: 420px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink-2); }
.sys.lock .lock-ico { color: var(--muted); flex: none; margin-top: 1px; }
.sys.lock .lock-ico svg { width: 16px; height: 16px; }
.sys.lock button { margin: 0; color: var(--ink); font-weight: 600; }
.verify .vstate { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--ink-2); }
.verify .vstate.ok { color: var(--ok); }
.syms { display: grid; grid-template-columns: repeat(4, 52px); gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.sym { width: 52px; height: 52px; padding: 10px; border-radius: 12px; background: var(--surface); stroke-width: 1.2; }
.digits { font-family: var(--mono); font-size: 15px; letter-spacing: .06em; color: var(--ink-2); max-width: 260px; line-height: 1.7; word-spacing: .3em; }
.icon.ok { color: var(--ok); }
.react { display: inline-flex; align-items: center; padding: 2px 6px; }
.react svg, .ctx .reacts-row svg { width: 18px; height: 18px; }
.ctx .reacts-row button { display: inline-flex; align-items: center; justify-content: center; }
.ctx .reacts-row svg { width: 22px; height: 22px; }
svg.r_heart path { fill: #d9423a; stroke: #d9423a; }
svg.r_fire path { fill: #e8792d; stroke: #e8792d; }
svg.r_like, svg.r_haha, svg.r_wow, svg.r_sad { color: #c99a14; }
.theme-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; padding: 2px; flex: none; }
.theme-seg button { padding: 5px 10px; border-radius: 7px; font-size: 13px; color: var(--muted); }
.theme-seg button.on { background: var(--ink); color: var(--paper); }
.composer textarea { overflow-y: hidden; scrollbar-width: thin; }
.composer textarea::-webkit-scrollbar { width: 6px; }
.composer textarea::-webkit-scrollbar-button { display: none; height: 0; }
.composer textarea::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
