/* Random Chat: açık, ferah, renkli ("pastel ve oyuncu, ama özenli").
   Koyu tema yok (patron kararı). Telefon önce: 375px'ten yukarı. */

/* ---------- Yazı tipleri (siteye gömülü, dışarıdan çekilmez) ---------- */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/bricolage-grotesque-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/bricolage-grotesque-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/fonts/figtree-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/fonts/figtree-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Renkler ---------- */

:root {
  --bg: #fff8f2;
  --bg-2: #fff1e6;
  --surface: #ffffff;
  --ink: #1d2140;
  --text: #1d2140;
  --muted: #6b6f8a;
  --line: #f1e4d8;

  --coral: #ff6b4a;
  --coral-deep: #e5512f;
  --coral-soft: #ffe4da;
  --sun: #ffc94a;
  --sun-soft: #fff1c9;
  --mint: #34c796;
  --mint-soft: #d8f6ea;
  --sky: #4aa8ff;
  --sky-soft: #dceeff;
  --rose: #ff6fa8;
  --rose-soft: #ffe1ee;

  --danger: #e0433f;
  --danger-soft: #ffe3e1;
  --ok: #22b07d;

  --radius: 20px;
  --shadow-sm: 0 1px 2px rgba(64, 38, 20, .06);
  --shadow: 0 1px 2px rgba(64, 38, 20, .05), 0 10px 30px rgba(120, 72, 40, .09);
  --shadow-lg: 0 2px 4px rgba(64, 38, 20, .05), 0 24px 60px rgba(120, 72, 40, .14);

  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.in-chat { overflow: hidden; }

[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
a { color: var(--coral-deep); }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Düğmeler ---------- */

.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .15s, opacity .15s, transform .12s, box-shadow .2s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; }

.btn.primary {
  background: linear-gradient(135deg, #ff7a52 0%, var(--coral) 45%, #ff4f6d 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 92, 70, .32);
}
.btn.primary:hover:not(:disabled) { box-shadow: 0 10px 26px rgba(255, 92, 70, .42); }
.btn.primary:disabled { box-shadow: none; background: #f3c7bb; opacity: 1; }
.btn.big {
  position: relative;
  width: 100%;
  padding: 16px 20px;
  font-size: 18px;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.01em;
  overflow: hidden;
}
.btn.big:not(:disabled)::after {
  /* Hafif ışık geçişi */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: shine 3.2s ease-in-out 1.2s infinite;
}
@keyframes shine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 42px; height: 42px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.icon-btn:hover:not(:disabled) { background: var(--bg-2); color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.muted { opacity: .4; }
.icon-btn.round { border-radius: 50%; }
.icon-btn.primary { background: var(--coral); color: #fff; box-shadow: 0 6px 14px rgba(255, 92, 70, .3); }
.icon-btn.primary:hover:not(:disabled) { background: var(--coral-deep); color: #fff; }
.icon-btn.danger { color: var(--danger); }

.icon-btn svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn.primary svg { fill: currentColor; stroke: none; }
.icon-btn .slash { display: none; }
#btn-images[aria-pressed="false"] { color: var(--danger); }
#btn-images[aria-pressed="false"] .slash { display: inline; }
#btn-sound[aria-pressed="false"] { color: var(--muted); }
#btn-sound[aria-pressed="false"] .slash { display: inline; }
#btn-sound[aria-pressed="false"] .wave { display: none; }

[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* ---------- Giriş ekranı ---------- */

.start {
  position: relative;
  min-height: 100dvh;
  padding: 28px 16px 40px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(60% 45% at 8% 0%, rgba(255, 201, 74, .38), transparent 70%),
    radial-gradient(55% 40% at 100% 8%, rgba(255, 111, 168, .26), transparent 70%),
    radial-gradient(70% 45% at 85% 70%, rgba(74, 168, 255, .20), transparent 70%),
    radial-gradient(60% 40% at 0% 85%, rgba(52, 199, 150, .20), transparent 70%),
    var(--bg);
}

/* Dünyanın dillerinden süzülen "merhaba" balonları */
.sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.float {
  position: absolute;
  padding: 7px 14px;
  border-radius: 18px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
  opacity: .9;
  animation: drift 9s ease-in-out infinite alternate;
}
.float::after {
  content: "";
  position: absolute;
  bottom: -6px; left: 16px;
  width: 12px; height: 12px;
  background: inherit;
  border-radius: 2px;
  transform: rotate(45deg);
}
/* Telefonda balonlar yalnız boş köşelerde (yazının üstüne binmez); geniş ekranda kartın iki yanında. */
.f1 { top: 18px;  right: 5%;  background: var(--sun-soft);  transform: rotate(6deg); }
.f2 { bottom: 4px; right: 4%; background: var(--sky-soft);  transform: rotate(-6deg); animation-delay: -2s; }
.f3, .f4, .f5, .f6 { display: none; }
.f3 { background: var(--rose-soft); transform: rotate(7deg); animation-delay: -4s; }
.f4 { background: var(--mint-soft); transform: rotate(-6deg); animation-delay: -6s; }
.f5 { background: var(--coral-soft); transform: rotate(-4deg); animation-delay: -1s; }
.f6 { background: var(--sun-soft);  transform: rotate(5deg); animation-delay: -3s; }
@media (min-width: 760px) {
  .f3, .f4, .f5, .f6 { display: block; }
  .f1 { top: 70px;  right: calc(50% - 360px); }
  .f3 { top: 46%;  right: calc(50% - 380px); }
  .f4 { top: 62%;  left: calc(50% - 360px); }
  .f5 { bottom: 120px; right: calc(50% - 350px); }
  .f6 { bottom: 70px;  left: calc(50% - 380px); }
}
@keyframes drift {
  from { translate: 0 0; }
  to { translate: 6px -14px; }
}

.hero {
  position: relative;
  max-width: 460px;
  margin: 0 auto 18px;
  padding: 0 4px;
  animation: rise .6s cubic-bezier(.2, .8, .2, 1) both;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 4px 8px rgba(120, 72, 40, .15)); }
.brand h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.tagline {
  margin: 18px 0 0;
  font-family: var(--display);
  font-size: clamp(31px, 9vw, 44px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.035em;
  color: var(--ink);
}
.tagline mark {
  color: inherit;
  background: linear-gradient(180deg, transparent 58%, rgba(255, 201, 74, .75) 58%, rgba(255, 201, 74, .75) 90%, transparent 90%);
  padding: 0 2px;
}

.lead { margin: 12px 0 0; color: var(--muted); font-size: 16px; }

.online {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 16px 0 0;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  box-shadow: var(--shadow-sm);
  font-size: 14px; font-weight: 700; color: var(--ink);
}
.faces { display: inline-flex; }
.faces i {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--sky);
}
.faces i + i { margin-inline-start: -7px; }
.faces i:nth-child(2) { background: var(--rose); }
.faces i:nth-child(3) { background: var(--sun); }
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(34, 176, 125, .45);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(34, 176, 125, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 176, 125, 0); }
}

.start-card {
  max-width: 460px;
  margin: 0 auto;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  padding: 22px 18px 20px;
  animation: rise .7s cubic-bezier(.2, .8, .2, 1) .08s both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.nick, .gender legend { font-family: var(--display); }
.nick { display: grid; gap: 8px; }
.nick label, .gender legend { font-weight: 700; font-size: 16px; }
.nick input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  color: var(--ink);
  font: 600 17px/1.4 var(--font);
  outline: none;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.nick input::placeholder { color: #b3a79c; font-weight: 500; }
.nick input:focus { border-color: var(--coral); background: #fff; box-shadow: 0 0 0 4px var(--coral-soft); }
.nick input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.nick small, .gender small { font-family: var(--font); color: var(--muted); font-size: 13px; line-height: 1.4; }
.nick small.error { color: var(--danger); font-weight: 600; }

.gender { margin: 20px 0 0; padding: 0; border: 0; min-width: 0; }
.gender legend { padding: 0; margin-bottom: 10px; }
.gender small { display: block; margin-top: 10px; }

/* Avatarlı cinsiyet kartları */
.gcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gcard {
  --c: var(--sky); --c-soft: var(--sky-soft);
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px 10px;
  border: 2px solid var(--line);
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background-color .15s, transform .15s, box-shadow .2s;
}
.g-f { --c: var(--rose); --c-soft: var(--rose-soft); }
.g-x { --c: #f0a800; --c-soft: var(--sun-soft); }
.gcard:hover { border-color: var(--c); transform: translateY(-2px); }
.gcard input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.gface {
  display: grid; place-items: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--c-soft);
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
}
.gface svg { width: 64px; height: 64px; }
.glabel {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.15;
  text-align: center;
  color: var(--ink);
}
.gcard:has(input:checked) {
  border-color: var(--c);
  background: var(--c-soft);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--c) 28%, transparent);
}
.gcard:has(input:checked) .gface { background: #fff; transform: scale(1.08) rotate(-4deg); }
.gcard:has(input:checked)::after {
  /* seçili işareti */
  content: "";
  position: absolute; top: 7px; inset-inline-end: 7px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--c) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
.gcard:has(input:focus-visible) { outline: 3px solid var(--c-soft); outline-offset: 2px; }

/* Boydan figürlü kartlar */
.gfig {
  display: grid;
  place-items: end center;
  width: 100%;
  aspect-ratio: 120 / 200;
  max-height: 190px;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(80% 50% at 50% 100%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%),
    linear-gradient(180deg, var(--c-soft), #fff 85%);
  transition: transform .3s cubic-bezier(.3, 1.5, .5, 1);
}
.gfig svg { width: 100%; height: 100%; }
.gcard:has(.gfig) { padding: 6px 6px 10px; gap: 8px; }
.gcard:has(input:checked) .gfig { background: linear-gradient(180deg, #fff, var(--c-soft)); transform: translateY(-3px); }
.gcard:hover .gfig { transform: translateY(-2px); }

.option {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
}
.option::before {
  /* resim simgesi */
  content: "";
  flex: none;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--mint-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322b07d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Ccircle cx='9' cy='10' r='1.6'/%3E%3Cpath d='M4 17l5-5 4 4 3-3 4 4'/%3E%3C/svg%3E") center/22px no-repeat;
}
.option-text { flex: 1; display: grid; gap: 2px; }
.option-text strong { font-family: var(--display); font-size: 15px; }
.option-text small { color: var(--muted); font-size: 13px; line-height: 1.4; }

.switch {
  appearance: none;
  flex: none;
  position: relative;
  width: 50px; height: 30px;
  margin: 0;
  border-radius: 999px;
  background: #e6d9cd;
  cursor: pointer;
  transition: background-color .2s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; inset-inline-start: 3px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(64, 38, 20, .2);
  transition: transform .25s cubic-bezier(.3, 1.5, .5, 1);
}
.switch:checked { background: var(--mint); }
.switch:checked::after { transform: translateX(20px); }
[dir="rtl"] .switch:checked::after { transform: translateX(-20px); }
.switch:focus-visible { outline: 3px solid var(--mint-soft); outline-offset: 2px; }

.rules {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--sky-soft), #f1eaff);
}
.rules h2 { margin: 0 0 8px; font-family: var(--display); font-size: 15px; font-weight: 800; }
.rules ul { margin: 0; padding: 0; list-style: none; color: #44486a; font-size: 14px; }
.rules li { position: relative; padding-inline-start: 22px; }
.rules li + li { margin-top: 6px; }
.rules li::before {
  content: "";
  position: absolute; top: .45em; inset-inline-start: 2px;
  width: 9px; height: 9px;
  border-radius: 3px;
  background: var(--sky);
  transform: rotate(45deg);
}
.rules li:nth-child(2)::before { background: var(--rose); }
.rules li:nth-child(3)::before { background: var(--sun); }
.rules li:nth-child(4)::before { background: var(--mint); }

.consent {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 18px 2px;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
}
.consent input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--coral); }

.fine { margin: 14px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

/* İnsan doğrulaması: görünmez modda hiç yer kaplamaz; zorlu durumda Cloudflare kutusu burada açılır. */
/* Turnstile kutusu gizli (display:none) bir kaba çizilmez; o yüzden yalnız [hidden] ile gizlenir, :empty ile DEĞİL.
   "interaction-only" görünümde çerçeve 0 yüksekliktedir, boşluk bırakmaz; kutu gerekirse kendi yerini açar. */
.captcha { display: flex; justify-content: center; margin: 0; min-height: 0; }
.captcha[hidden] { display: none; }
.captcha iframe { max-width: 100%; }
.captcha-msg { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--danger); text-align: center; }

.site-foot {
  max-width: 460px;
  margin: 26px auto 0;
  display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: center;
  font-size: 14px; font-weight: 600;
}
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--coral-deep); }

/* ---------- Sohbet ekranı ---------- */

.chat {
  position: relative;
  display: flex;
  flex-direction: column;
  height: var(--app-height, 100dvh);
  max-width: 760px;
  margin: 0 auto;
  background:
    radial-gradient(50% 30% at 100% 0%, rgba(255, 201, 74, .16), transparent 70%),
    radial-gradient(50% 30% at 0% 100%, rgba(74, 168, 255, .12), transparent 70%),
    var(--bg);
}

.chat-head {
  display: flex; align-items: center; gap: 2px;
  padding: 8px 8px 8px 12px;
  padding-top: max(8px, env(safe-area-inset-top));
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.status { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar-wrap { position: relative; flex: none; }
.avatar {
  --c: #b9a99b;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  text-transform: uppercase;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .08);
}
.avatar[data-g="m"] { --c: var(--sky); }
.avatar[data-g="f"] { --c: var(--rose); }
.avatar[data-g="x"] { --c: #f0a800; }
.status[data-state="waiting"] .avatar,
.status[data-state="offline"] .avatar,
.status[data-state="ended"] .avatar { --c: #d8cabd; }
.status-dot {
  position: absolute; bottom: -1px; inset-inline-end: -1px;
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  background: var(--muted);
}
.status[data-state="waiting"] .status-dot { background: var(--sun); animation: blink 1.2s infinite; }
.status[data-state="chatting"] .status-dot { background: var(--ok); }
.status[data-state="ended"] .status-dot { background: #c5b8ac; }
.status[data-state="offline"] .status-dot { background: var(--danger); }
@keyframes blink { 50% { opacity: .3; } }
.status-text { display: grid; min-width: 0; }
.status-text strong {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.status-text strong, .status-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-text small { color: var(--muted); font-size: 13px; }

.messages {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Beklerken boş ekran yerine dönen avatarlar */
.waiting-art {
  position: absolute;
  inset: 70px 0 120px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  pointer-events: none;
  text-align: center;
}
.waiting-art p { margin: 0; font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--muted); }
.orbit { position: relative; width: 132px; height: 132px; }
.orbit::before {
  content: "";
  position: absolute; inset: 10px;
  border: 2px dashed #ecdccd;
  border-radius: 50%;
}
.orbit b {
  position: absolute; inset: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow);
  font-family: var(--display);
  font-size: 26px; font-weight: 800; color: var(--coral);
  animation: bob 1.6s ease-in-out infinite;
}
.orbit i {
  position: absolute; top: 50%; left: 50%;
  width: 24px; height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: var(--shadow-sm);
  animation: orbit 3.6s linear infinite;
}
.orbit i:nth-child(1) { background: var(--sky); }
.orbit i:nth-child(2) { background: var(--rose); animation-delay: -1.2s; }
.orbit i:nth-child(3) { background: var(--sun); animation-delay: -2.4s; }
@keyframes orbit { from { transform: rotate(0) translateX(56px) rotate(0); } to { transform: rotate(360deg) translateX(56px) rotate(-360deg); } }
@keyframes bob { 50% { transform: translateY(-4px); } }

.sys {
  align-self: center;
  max-width: 90%;
  margin: 6px 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--sun-soft);
  color: #6a5212;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  animation: pop .3s ease-out both;
}
.sys.support {
  border-radius: 16px;
  background: #fff;
  border: 2px solid var(--sun);
  color: #5b4510;
  text-align: start;
  line-height: 1.45;
  font-weight: 500;
}
.sys.support a { color: var(--coral-deep); font-weight: 700; }

.msg { display: flex; flex-direction: column; max-width: 80%; animation: pop .22s ease-out both; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.them { align-self: flex-start; align-items: flex-start; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }

.bubble {
  padding: 10px 15px;
  border-radius: var(--radius);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.4;
  transition: opacity .2s;
}
.msg.me .bubble {
  background: linear-gradient(135deg, #ffe6d6, #ffd6e4);
  color: var(--ink);
  border-end-end-radius: 6px;
}
.msg.them .bubble {
  background: #fff;
  border-end-start-radius: 6px;
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line);
}

.msg.pending .bubble { opacity: .6; }
.msg.failed .bubble { opacity: .5; text-decoration: line-through; text-decoration-color: rgba(224, 67, 63, .5); }
.msg .note { margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--danger); text-align: end; }

/* Resim */
.bubble.photo { position: relative; padding: 4px; overflow: hidden; }
.bubble.photo img {
  display: block;
  max-width: min(260px, 100%);
  max-height: 340px;
  border-radius: 16px;
  object-fit: cover;
}
.bubble.photo canvas.thumb {
  display: block;
  max-width: min(260px, 100%);
  height: auto;
  border-radius: 16px;
}
.bubble.veiled img,
.bubble.veiled canvas.thumb { filter: blur(26px) saturate(.7); transform: scale(1.08); }

/* Kaydetmeyi zorlaştır: seçme, uzun basma menüsü, sürükleme kapalı. */
.protected, .viewer {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.protected canvas, .viewer canvas { -webkit-user-drag: none; }
.veil {
  position: absolute; inset: 4px;
  display: grid; place-content: center; gap: 6px;
  border: 0; border-radius: 16px;
  background: rgba(29, 33, 64, .22);
  color: #fff;
  font-size: 14px; font-weight: 700;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
  cursor: pointer;
}
.veil::before {
  content: "";
  justify-self: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d2140' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center/20px no-repeat;
}
.photo-hidden { display: none; padding: 8px 10px; font-size: 13px; color: var(--muted); }
.images-off .msg.them .bubble.photo img,
.images-off .msg.them .bubble.photo canvas,
.images-off .msg.them .veil { display: none; }
.images-off .msg.them .photo-hidden { display: block; }

/* Sesli mesaj */
.bubble.voice { display: flex; align-items: center; gap: 10px; min-width: 210px; padding: 8px 15px 8px 8px; }
.play {
  flex: none;
  position: relative;
  width: 38px; height: 38px;
  border: 0; border-radius: 50%;
  background: var(--coral);
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 92, 70, .28);
}
.play::before {
  content: "";
  position: absolute; top: 50%; left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent #fff;
}
.playing .play::before {
  left: 50%;
  width: 10px; height: 12px;
  border: 0;
  border-inline: 3px solid #fff;
}
.bar { flex: 1; height: 5px; border-radius: 5px; background: rgba(29, 33, 64, .12); overflow: hidden; }
.fill { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--coral), var(--rose)); }
.time { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }

/* ---------- Yazma alanı ---------- */

.composer {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 8px 10px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.typing {
  display: flex; align-items: center; gap: 3px;
  padding: 0 6px 6px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.typing em { font-style: normal; margin-inline-start: 4px; }
.typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--coral);
  animation: bounce 1.2s infinite;
}
.typing span:nth-child(2) { background: var(--sun); animation-delay: .15s; }
.typing span:nth-child(3) { background: var(--sky); animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: none; opacity: .6; } 30% { transform: translateY(-4px); opacity: 1; } }

.input-row { display: flex; align-items: flex-end; gap: 6px; }

.btn.next {
  flex: none;
  height: 42px;
  padding: 0 16px;
  background: var(--coral-soft);
  color: var(--coral-deep);
  font-family: var(--display);
  font-weight: 800;
}
.btn.next:hover:not(:disabled) { background: #ffd3c4; }
.btn.next.confirm { background: var(--danger); color: #fff; }

#input {
  flex: 1;
  min-width: 0;
  height: 42px;
  max-height: 120px;
  overflow-y: hidden;
  resize: none;
  padding: 9px 15px;
  border: 2px solid var(--line);
  border-radius: 21px;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.35 var(--font);
  outline: none;
  transition: border-color .15s, background-color .15s;
}
#input:focus { border-color: var(--coral); background: #fff; }
#input:disabled { opacity: .6; }

.recorder { display: flex; align-items: center; gap: 10px; min-height: 42px; }
.rec-info { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
.rec-max { color: var(--muted); font-weight: 500; }

/* ---------- Tam ekran resim ---------- */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.viewer[hidden] { display: none; }
/* Resim ekrana sığar (telefonda da), oranı bozulmaz; üstte kapat düğmesine yer kalır. */
.viewer canvas {
  flex: none;
  width: auto;
  height: auto;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 76px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  margin-top: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}
.viewer-shield { display: none; margin: 0; font-family: var(--display); font-weight: 700; color: var(--muted); font-size: 16px; text-align: center; }
.viewer.shielded canvas { display: none; }
.viewer.shielded .viewer-shield { display: block; }
.viewer-close {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  inset-inline-end: 10px;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border: 0; border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.viewer-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* ---------- Bildirim ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 11px 18px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow-lg);
  z-index: 30;
  animation: pop .2s ease-out both;
}

/* ---------- Bilgi sayfaları (FAQ, Terms, Privacy) ---------- */

.page {
  min-height: 100dvh;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
body:has(.page) {
  background:
    radial-gradient(50% 30% at 0% 0%, rgba(255, 201, 74, .28), transparent 70%),
    radial-gradient(45% 30% at 100% 10%, rgba(255, 111, 168, .18), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
.page header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.page header a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-family: var(--display);
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
}
.page article {
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 26px 22px;
}
.page h1 { margin-top: 0; font-family: var(--display); font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.page h2 { font-family: var(--display); font-size: 19px; font-weight: 800; margin: 26px 0 8px; letter-spacing: -.01em; }
.page p, .page li { color: #44486a; }
.page ul { padding-inline-start: 20px; }
.page li + li { margin-top: 6px; }

/* Geçici tasarım karşılaştırma sayfası (figures-preview.html); seçimden sonra silinecek. */
.preview-page { display: grid; gap: 18px; align-content: start; }
.preview-set { width: 100%; }
.preview-title { margin: 0 0 12px; font-family: var(--display); font-size: 18px; font-weight: 800; }

/* ---------- Daha geniş ekranlar ---------- */

@media (min-width: 700px) {
  .start { padding-top: 56px; }
  .hero { margin-bottom: 24px; }
  .start-card { padding: 28px 26px 24px; }
  .messages { padding-inline: 20px; }
  .msg { max-width: 70%; }
}

@media (max-width: 400px) {
  .float { font-size: 13px; padding: 5px 11px; }
}

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