*{box-sizing:border-box}
:root{
  --bg:#f5f7fb;--panel:#ffffffdf;--text:#111827;--muted:#6b7280;--line:#e5e7eb;--line2:#d1d5db;
  --dark:#111827;--soft:#eef2f7;--shadow:0 24px 70px rgba(15,23,42,.10);--danger:#dc2626;--danger-soft:#fee2e2;
  --blue:#2563eb;--blue2:#60a5fa;--blue-soft:#eff6ff;--radius:26px
}
html,body{height:100%}
body{
  margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--text);
  background:radial-gradient(circle at 10% 0%,#fff 0,transparent 32rem),radial-gradient(circle at 100% 0%,#dbeafe 0,transparent 30rem),linear-gradient(135deg,#fff,var(--bg));
  overflow:hidden
}
.bg-grid{position:fixed;inset:0;pointer-events:none;background-image:linear-gradient(rgba(37,99,235,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(37,99,235,.035) 1px,transparent 1px);background-size:34px 34px;mask-image:radial-gradient(circle at center,#000,transparent 78%)}
button,textarea{font:inherit}button{border:0;cursor:pointer}a{text-decoration:none}
.layout{position:relative;z-index:1;display:grid;grid-template-columns:330px 1fr;gap:16px;width:min(1450px,calc(100% - 28px));height:calc(100dvh - 28px);margin:14px auto}
.sidebar,.chat{background:var(--panel);border:1px solid var(--line);box-shadow:var(--shadow);backdrop-filter:blur(20px)}
.sidebar{position:relative;border-radius:var(--radius);padding:18px;display:flex;flex-direction:column;min-width:0;min-height:0}
.sidebar-close{display:none}
.brand{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.logo{width:48px;height:48px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(135deg,var(--blue),var(--blue2));box-shadow:0 14px 30px rgba(37,99,235,.24);overflow:hidden}.logo img{width:48px;height:48px}
.robot-logo{animation:floatBot 3s ease-in-out infinite}.robot-logo img{animation:eyeMove 2.4s ease-in-out infinite}
.brand strong{display:block;font-size:19px;letter-spacing:-.03em}.brand span{display:block;color:var(--muted);font-size:13px;margin-top:2px}
.primary-btn{height:48px;border-radius:16px;background:linear-gradient(135deg,var(--blue),var(--blue2));color:#fff;display:flex;align-items:center;justify-content:center;gap:9px;font-weight:800;transition:.2s}.primary-btn:hover{transform:translateY(-2px);box-shadow:0 14px 28px rgba(37,99,235,.22)}
.history-head{display:flex;justify-content:space-between;align-items:center;margin:20px 2px 10px;color:var(--muted);font-size:13px;font-weight:900;text-transform:uppercase;letter-spacing:.07em;flex:0 0 auto}.history-head button{width:34px;height:34px;border-radius:12px;background:#fff;color:var(--muted);border:1px solid var(--line)}
.history-list{display:flex;flex-direction:column;gap:8px;overflow-y:auto;overflow-x:hidden;padding-right:5px;min-height:0;flex:1 1 auto;scrollbar-width:thin}.history-list::-webkit-scrollbar,.messages::-webkit-scrollbar{width:8px}.history-list::-webkit-scrollbar-thumb,.messages::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px}
.history-item{display:grid;grid-template-columns:1fr 34px;gap:8px;align-items:center;padding:9px;border-radius:16px;background:rgba(255,255,255,.66);border:1px solid transparent;transition:.18s;flex:0 0 auto}.history-item.active,.history-item:hover{background:#fff;border-color:#bfdbfe}
.history-main{text-align:left;background:transparent;color:var(--text);min-width:0}.history-main strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.history-main span{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.delete-chat{height:34px;border-radius:12px;background:var(--soft);color:var(--muted)}.delete-chat:hover{color:var(--danger);background:var(--danger-soft)}
.side-note{margin-top:14px;display:flex;gap:9px;align-items:center;color:var(--muted);font-size:13px;padding:13px;border-radius:16px;background:#fff;border:1px solid var(--line);flex:0 0 auto}
.chat{border-radius:var(--radius);display:grid;grid-template-rows:auto auto 1fr auto;overflow:hidden;min-width:0;min-height:0}
.topbar{height:72px;display:flex;align-items:center;gap:12px;padding:12px 18px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.68);flex:0 0 auto}.top-title strong{display:block;font-size:17px}.top-title span{display:block;color:var(--muted);font-size:13px;margin-top:2px}
.icon-btn{width:42px;height:42px;border-radius:14px;background:#fff;border:1px solid var(--line);color:var(--text)}.mobile-menu{display:none}
.hero-mini{display:flex;align-items:center;gap:16px;padding:18px 22px 10px;transition:.2s}.hero-mini.hide{display:none}.bot-face{width:58px;height:58px;border-radius:22px;display:grid;place-items:center;background:linear-gradient(135deg,var(--blue),var(--blue2));box-shadow:0 18px 40px rgba(37,99,235,.18);overflow:hidden}.bot-face img{width:58px;height:58px}
.hero-mini h1{margin:0;font-size:clamp(22px,2.4vw,34px);letter-spacing:-.05em;line-height:1.05}
.messages{padding:18px 22px 22px;overflow-y:auto;display:flex;flex-direction:column;gap:14px;min-height:0}
.message{display:flex;width:100%;animation:pop .22s ease both}.message.user{justify-content:flex-end}
.bubble{width:fit-content;max-width:min(820px,86%);padding:14px;border-radius:22px;line-height:1.62;box-shadow:0 12px 28px rgba(15,23,42,.06)}
.message.bot .bubble{background:#fff;border:1px solid var(--line)}.message.user .bubble{background:linear-gradient(135deg,var(--blue),var(--blue2));color:#fff}.message.error .bubble{background:#fff1f2;color:#991b1b;border:1px solid #fecdd3}
.message-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px;font-size:13px;font-weight:900}.message-actions{display:flex;gap:7px;margin-top:12px;justify-content:flex-end}
.copy-btn,.share-msg-btn{width:34px;height:34px;border-radius:12px;display:grid;place-items:center;background:rgba(37,99,235,.08);color:var(--blue);transition:.18s}.copy-btn:hover,.share-msg-btn:hover{transform:translateY(-1px);background:#dbeafe}
.bubble p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.composer{padding:16px 18px 18px;border-top:1px solid var(--line);background:rgba(255,255,255,.72);flex:0 0 auto}
.input-shell{display:grid;grid-template-columns:1fr 52px;gap:10px;align-items:end;background:#fff;border:1px solid #bfdbfe;border-radius:22px;padding:9px;box-shadow:0 18px 45px rgba(37,99,235,.10)}
textarea{width:100%;max-height:138px;resize:none;border:0;outline:0;background:transparent;padding:13px 12px;color:var(--text)}
#sendBtn{width:52px;height:52px;border-radius:18px;background:linear-gradient(135deg,var(--blue),var(--blue2));color:#fff;transition:.2s}#sendBtn:hover{transform:translateY(-2px)}#sendBtn:disabled{opacity:.55;cursor:not-allowed;transform:none}.composer small{display:block;text-align:center;color:var(--muted);font-size:12px;margin-top:9px}
.typing{display:inline-flex;gap:5px}.typing span{width:7px;height:7px;border-radius:50%;background:#60a5fa;animation:blink 1s infinite ease-in-out}.typing span:nth-child(2){animation-delay:.15s}.typing span:nth-child(3){animation-delay:.3s}
.modal-backdrop{position:fixed;inset:0;z-index:20;display:none;align-items:center;justify-content:center;background:rgba(17,24,39,.35);backdrop-filter:blur(8px);padding:18px}.modal-backdrop.show{display:flex}
.modal{position:relative;width:min(460px,100%);background:#fff;border:1px solid var(--line);border-radius:28px;box-shadow:0 35px 90px rgba(15,23,42,.25);padding:26px;text-align:center;animation:modalPop .18s ease both}.share-modal{width:min(560px,100%)}
.modal-close{position:absolute;top:14px;right:14px;width:38px;height:38px;border-radius:14px;background:#f3f4f6;color:#6b7280}.modal-icon{width:64px;height:64px;margin:0 auto 14px;display:grid;place-items:center;border-radius:22px;background:var(--danger-soft);color:var(--danger);font-size:26px}.share-icon{background:#dbeafe;color:var(--blue)}
.modal h2{margin:0;font-size:24px;letter-spacing:-.04em}.modal p{margin:8px 0 22px;color:var(--muted)}
.modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.cancel-btn,.danger-btn{height:48px;border-radius:16px;font-weight:900;display:flex;align-items:center;justify-content:center;gap:9px}.cancel-btn{background:#f3f4f6;color:#374151}.danger-btn{background:#fff1f2;color:var(--danger);border:1px solid #fecdd3}
.share-buttons{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:14px 0 18px}.share-btn{height:64px;border-radius:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#fff;font-size:13px;font-weight:800}.share-btn i{font-size:20px}.whatsapp{background:#22c55e}.x-twitter{background:#111827}.facebook{background:#2563eb}.instagram{background:linear-gradient(135deg,#f97316,#db2777)}
.share-label{display:block;text-align:left;font-size:13px;color:var(--muted);font-weight:800;margin-bottom:8px}.share-text{width:100%;min-height:140px;border:1px solid var(--line);border-radius:18px;padding:13px;background:#f8fafc}.copy-wide{margin-top:10px;width:100%;height:48px;border-radius:16px;background:linear-gradient(135deg,var(--blue),var(--blue2));color:#fff;font-weight:900;display:flex;align-items:center;justify-content:center;gap:9px}
@keyframes blink{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}@keyframes pop{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes modalPop{from{opacity:0;transform:translateY(12px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes floatBot{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}@keyframes eyeMove{0%,100%{transform:translateX(0)}35%{transform:translateX(2px)}70%{transform:translateX(-2px)}}
@media(max-width:900px){
  body{overflow:hidden}.layout{width:100%;height:100dvh;margin:0;grid-template-columns:1fr;gap:0}.chat{border-radius:0;border:0;height:100dvh}.sidebar{position:fixed;z-index:5;inset:0;width:100vw;height:100dvh;border-radius:0;transform:translateX(-105%);transition:.25s;padding:22px}.sidebar.open{transform:translateX(0)}.sidebar-close{display:grid;place-items:center;position:absolute;right:18px;top:18px;width:42px;height:42px;border-radius:14px;background:#f3f4f6;color:#111827}.mobile-menu{display:grid;place-items:center}.topbar{height:62px;padding:10px 12px}.hero-mini{padding:14px 14px 4px}.messages{padding:14px}.composer{padding:10px 10px calc(10px + env(safe-area-inset-bottom));}.bubble{max-width:94%}.hero-mini h1{font-size:23px}.history-list{max-height:none}.top-title strong{font-size:15px}.top-title span{font-size:12px}
}
@media(max-width:560px){
  .bot-face,.bot-face img{width:48px;height:48px}.bot-face{border-radius:18px}.hero-mini{gap:12px}.bubble{max-width:96%;padding:13px}.input-shell{grid-template-columns:1fr 48px}#sendBtn{width:48px;height:48px}.modal-actions,.share-buttons{grid-template-columns:1fr}.modal{padding:24px 18px}.composer small{font-size:11px}textarea{max-height:110px}
}

/* --- Gooy AI mobile pro fixes --- */
.brand span{display:inline-block}
.brand-cursor,.typing-cursor{display:inline-block;margin-left:2px;color:var(--blue);animation:cursorBlink .8s infinite}
@keyframes cursorBlink{0%,45%{opacity:1}46%,100%{opacity:0}}

.history-search{
  position:relative;
  flex:0 0 auto;
  margin:0 0 12px;
}
.history-search i{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  color:#94a3b8;
  font-size:13px;
}
.history-search input{
  width:100%;
  height:44px;
  border:1px solid var(--line);
  border-radius:15px;
  background:#fff;
  outline:none;
  padding:0 14px 0 38px;
  color:var(--text);
}
.history-search input:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 4px rgba(37,99,235,.08);
}
.history-main span{display:none!important}

.message.user .bubble{
  -webkit-touch-callout:none;
  user-select:none;
}
.message.user .bubble.show-select{
  user-select:text;
}
.message-meta{
  display:none;
}
.mini-popover{
  position:fixed;
  z-index:50;
  display:none;
  min-width:188px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 18px 50px rgba(15,23,42,.18);
  padding:8px;
  animation:modalPop .16s ease both;
}
.mini-popover.show{display:block}
.mini-popover button,.mini-popover span{
  width:100%;
  min-height:40px;
  border-radius:12px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 11px;
  background:#fff;
  color:#111827;
  font-size:14px;
}
.mini-popover span{
  color:var(--muted);
  border-top:1px solid var(--line);
  margin-top:4px;
  padding-top:7px;
}
.mini-popover button:hover{background:#eff6ff;color:var(--blue)}

@media(max-width:900px){
  html,body{
    height:100%;
    min-height:100%;
    overflow:hidden;
    overscroll-behavior:none;
  }
  .layout{
    width:100%;
    height:100dvh;
    height:100svh;
    margin:0;
    display:block;
  }
  .chat{
    width:100%;
    height:100dvh;
    height:100svh;
    border:0;
    border-radius:0;
    display:flex!important;
    flex-direction:column;
    overflow:hidden;
  }
  .topbar{
    height:62px;
    min-height:62px;
    flex:0 0 62px;
    padding:10px 12px;
  }
  .hero-mini{
    flex:0 0 auto;
    padding:14px 14px 4px;
  }
  .hero-mini.hide{display:none!important}
  .messages{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
    padding:14px 14px 18px;
    scroll-behavior:auto;
  }
  .composer{
    position:relative!important;
    bottom:auto!important;
    flex:0 0 auto;
    padding:10px 10px calc(10px + env(safe-area-inset-bottom));
    background:rgba(255,255,255,.98);
    border-top:1px solid var(--line);
  }
  .input-shell{
    grid-template-columns:1fr 48px;
  }
  textarea{
    max-height:92px!important;
    line-height:1.45;
  }
  #sendBtn{
    width:48px;
    height:48px;
  }
  .sidebar{
    position:fixed;
    z-index:10;
    inset:0;
    width:100vw;
    height:100dvh;
    height:100svh;
    border-radius:0;
    transform:translateX(-105%);
    transition:.25s;
    padding:22px;
    display:flex;
  }
  .sidebar.open{transform:translateX(0)}
  .sidebar-close{
    display:grid;
    place-items:center;
    position:absolute;
    right:18px;
    top:18px;
    width:42px;
    height:42px;
    border-radius:14px;
    background:#f3f4f6;
    color:#111827;
  }
  .mobile-menu{display:grid;place-items:center}
  .bubble{max-width:94%}
  .hero-mini h1{font-size:23px}
  .history-list{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
  }
  .top-title strong{font-size:15px}
  .top-title span{font-size:12px}
}

@media(max-width:560px){
  .composer small{font-size:11px}
  .modal-actions,.share-buttons{grid-template-columns:1fr}
}


/* --- Clean Gooy AI: sounds, code blocks, mobile fixes --- */
.top-actions,.auth-link,.premium-btn,.profile-btn,.quota-banner{display:none!important}
.topbar{gap:12px}
.top-title span{color:var(--muted)}

.brand span{display:inline-block}
.brand-cursor,.typing-cursor{display:inline-block;margin-left:2px;color:var(--blue);animation:cursorBlink .8s infinite}
@keyframes cursorBlink{0%,45%{opacity:1}46%,100%{opacity:0}}

.history-search{
  position:relative;
  flex:0 0 auto;
  margin:0 0 12px;
}
.history-search i{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  color:#94a3b8;
  font-size:13px;
}
.history-search input{
  width:100%;
  height:44px;
  border:1px solid var(--line);
  border-radius:15px;
  background:#fff;
  outline:none;
  padding:0 14px 0 38px;
  color:var(--text);
}
.history-search input:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 4px rgba(37,99,235,.08);
}
.history-main span{display:none!important}

.message.user .bubble{position:relative;-webkit-touch-callout:none;user-select:none}
.message.user .bubble.show-select{user-select:text}
.message.user .bubble::after{
  content:attr(data-time);
  position:absolute;
  right:8px;
  top:-28px;
  opacity:0;
  pointer-events:none;
  transform:translateY(4px);
  transition:.18s;
  background:#111827;
  color:#fff;
  font-size:12px;
  padding:5px 8px;
  border-radius:999px;
}
@media(hover:hover){
  .message.user .bubble:hover::after{opacity:1;transform:translateY(0)}
}

.mini-popover{
  position:fixed;
  z-index:50;
  display:none;
  min-width:188px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 18px 50px rgba(15,23,42,.18);
  padding:8px;
  animation:modalPop .16s ease both;
}
.mini-popover.show{display:block}
.mini-popover button,.mini-popover span{
  width:100%;
  min-height:40px;
  border-radius:12px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 11px;
  background:#fff;
  color:#111827;
  font-size:14px;
}
.mini-popover span{
  color:var(--muted);
  border-top:1px solid var(--line);
  margin-top:4px;
  padding-top:7px;
}
.mini-popover button:hover{background:#eff6ff;color:var(--blue)}

.code-card{
  margin:12px 0;
  border:1px solid #1f2937;
  border-radius:18px;
  overflow:hidden;
  background:#0b1020;
  box-shadow:0 14px 32px rgba(15,23,42,.16);
}
.code-head{
  height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:0 12px;
  background:#111827;
  color:#dbeafe;
  font-size:12px;
  font-weight:900;
}
.code-lang{
  display:inline-flex;
  align-items:center;
  gap:7px;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.code-copy{
  width:auto;
  height:30px;
  border-radius:10px;
  padding:0 10px;
  background:#2563eb;
  color:#fff;
  font-size:12px;
  font-weight:900;
}
.code-body{
  max-height:360px;
  overflow:auto;
  padding:0;
}
.code-body pre{
  margin:0;
  min-width:max-content;
  padding:16px;
}
.code-body code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  font-size:13px;
  line-height:1.65;
  color:#e5e7eb;
}
.tok-key{color:#93c5fd}.tok-str{color:#86efac}.tok-num{color:#fbbf24}.tok-com{color:#9ca3af;font-style:italic}.tok-tag{color:#fca5a5}.tok-attr{color:#c4b5fd}

.message .bubble p a{color:#2563eb}

@media(max-width:900px){
  html,body{height:100%;min-height:100%;overflow:hidden;overscroll-behavior:none}
  .layout{width:100%;height:100dvh;height:100svh;margin:0;display:block}
  .chat{width:100%;height:100dvh;height:100svh;border:0;border-radius:0;display:flex!important;flex-direction:column;overflow:hidden}
  .topbar{height:62px;min-height:62px;flex:0 0 62px;padding:10px 12px}
  .hero-mini{flex:0 0 auto;padding:14px 14px 4px}
  .hero-mini.hide{display:none!important}
  .messages{flex:1 1 auto;min-height:0;overflow-y:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:14px 14px 18px;scroll-behavior:auto}
  .composer{position:relative!important;bottom:auto!important;flex:0 0 auto;padding:10px 10px calc(10px + env(safe-area-inset-bottom));background:rgba(255,255,255,.98);border-top:1px solid var(--line)}
  .input-shell{grid-template-columns:1fr 48px}
  textarea{max-height:92px!important;line-height:1.45}
  #sendBtn{width:48px;height:48px}
  .sidebar{position:fixed;z-index:10;inset:0;width:100vw;height:100dvh;height:100svh;border-radius:0;transform:translateX(-105%);transition:.25s;padding:22px;display:flex}
  .sidebar.open{transform:translateX(0)}
  .sidebar-close{display:grid;place-items:center;position:absolute;right:18px;top:18px;width:42px;height:42px;border-radius:14px;background:#f3f4f6;color:#111827}
  .mobile-menu{display:grid;place-items:center}
  .bubble{max-width:94%}
  .hero-mini h1{font-size:23px}
  .history-list{flex:1 1 auto;min-height:0;overflow-y:auto}
  .top-title strong{font-size:15px}
  .top-title span{font-size:12px}
  .code-body{max-height:300px}
}


/* --- Ömer & Özlem dedication touches --- */
.status-hidden{
  display:none!important;
}

.love-dedication{
  position:relative;
  margin-top:12px;
  padding:15px 14px;
  border-radius:18px;
  overflow:hidden;
  background:
    radial-gradient(circle at 10% 0%, rgba(239,68,68,.20), transparent 7rem),
    radial-gradient(circle at 95% 30%, rgba(244,63,94,.16), transparent 8rem),
    #fff;
  border:1px solid #fecdd3;
  box-shadow:0 14px 32px rgba(244,63,94,.10);
  text-align:center;
  flex:0 0 auto;
}
.heart-orbit{
  position:relative;
  width:54px;
  height:54px;
  margin:0 auto 8px;
  display:grid;
  place-items:center;
  border-radius:20px;
  background:linear-gradient(135deg,#ef4444,#fb7185);
  color:#fff;
  box-shadow:0 14px 28px rgba(239,68,68,.22);
  animation:heartBeat 1.35s infinite ease-in-out;
}
.heart-orbit i{
  font-size:25px;
}
.love-dedication strong{
  display:block;
  color:#991b1b;
  font-size:14px;
  letter-spacing:-.02em;
}
.love-dedication p{
  margin:5px 0 0;
  color:#be123c;
  font-size:12.5px;
  line-height:1.45;
}
.floating-heart{
  position:absolute;
  color:#ef4444;
  opacity:.75;
  font-size:15px;
  animation:floatHeart 3s infinite ease-in-out;
}
.floating-heart.h1{left:-3px;top:5px;animation-delay:0s}
.floating-heart.h2{right:-2px;top:10px;animation-delay:.7s}
.floating-heart.h3{left:23px;bottom:-8px;animation-delay:1.25s}

@keyframes heartBeat{
  0%,100%{transform:scale(1)}
  12%{transform:scale(1.12)}
  24%{transform:scale(.98)}
  36%{transform:scale(1.09)}
  50%{transform:scale(1)}
}
@keyframes floatHeart{
  0%,100%{transform:translateY(0) scale(.9);opacity:.45}
  50%{transform:translateY(-12px) scale(1.15);opacity:1}
}

@media(max-width:900px){
  .love-dedication{
    margin-top:12px;
  }
}


/* --- Refined dedication layout --- */
.primary-btn{
  width:100%;
  min-height:52px;
  font-size:15px;
}

.love-dedication{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  text-align:left!important;
  margin-top:14px!important;
  padding:10px 11px!important;
  border-radius:16px!important;
  box-shadow:0 8px 22px rgba(244,63,94,.08)!important;
}
.heart-orbit{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  border-radius:14px!important;
  margin:0!important;
}
.heart-orbit i{
  font-size:17px!important;
}
.love-dedication strong{
  font-size:13px!important;
}
.love-dedication p{
  font-size:11.5px!important;
  margin:2px 0 0!important;
}
.floating-heart{
  font-size:11px!important;
}
.floating-heart.h1{left:-2px!important;top:2px!important}
.floating-heart.h2{right:-2px!important;top:5px!important}
.floating-heart.h3{left:17px!important;bottom:-7px!important}

.side-note{
  margin-top:10px!important;
}

@media(max-width:900px){
  .love-dedication{
    padding:9px 10px!important;
    margin-top:12px!important;
  }
  .heart-orbit{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    border-radius:12px!important;
  }
  .heart-orbit i{
    font-size:15px!important;
  }
}


/* --- Theme, voice and typing effect --- */
body.dark-mode{
  --bg:#0b1020;
  --panel:rgba(15,23,42,.86);
  --text:#f8fafc;
  --muted:#94a3b8;
  --line:rgba(148,163,184,.22);
  --line2:rgba(148,163,184,.34);
  --soft:#111827;
  background:
    radial-gradient(circle at 10% 0%,rgba(37,99,235,.24) 0,transparent 32rem),
    radial-gradient(circle at 100% 0%,rgba(96,165,250,.16) 0,transparent 30rem),
    linear-gradient(135deg,#020617,#0b1020);
}
body.dark-mode .sidebar,
body.dark-mode .chat{
  background:rgba(15,23,42,.82);
}
body.dark-mode .topbar,
body.dark-mode .composer{
  background:rgba(15,23,42,.76);
}
body.dark-mode .message.bot .bubble,
body.dark-mode .history-item,
body.dark-mode .side-note,
body.dark-mode .love-dedication,
body.dark-mode .history-search input,
body.dark-mode .input-shell,
body.dark-mode .modal,
body.dark-mode .share-text,
body.dark-mode .mini-popover,
body.dark-mode .mini-popover button,
body.dark-mode .mini-popover span{
  background:#111827!important;
  color:#f8fafc;
  border-color:rgba(148,163,184,.22);
}
body.dark-mode .message.bot .bubble p,
body.dark-mode .message-content p{
  color:#f8fafc;
}
body.dark-mode textarea,
body.dark-mode .history-search input{
  color:#f8fafc;
}
body.dark-mode .modal p,
body.dark-mode .side-note,
body.dark-mode .brand span,
body.dark-mode .top-title span{
  color:#94a3b8;
}
body.dark-mode .bg-grid{
  opacity:.35;
}
.theme-toggle{
  min-height:40px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 13px;
  color:#111827;
  background:#fff;
  border:1px solid var(--line);
  font-weight:900;
  white-space:nowrap;
}
body.dark-mode .theme-toggle{
  background:#0f172a;
  color:#f8fafc;
}
.header-theme{
  margin-left:auto;
}
.sidebar-theme{
  width:100%;
  margin-bottom:10px;
}
body:not(.dark-mode) .sidebar-theme,
body:not(.dark-mode) .header-theme{
  color:#111827;
}
.input-shell{
  grid-template-columns:1fr 52px 52px!important;
}
.mic-btn{
  width:52px;
  height:52px;
  border-radius:18px;
  color:#2563eb;
  background:#dbeafe;
  transition:.18s;
}
.mic-btn:hover{
  transform:translateY(-2px);
}
.mic-btn.listening{
  color:#fff;
  background:linear-gradient(135deg,#ef4444,#fb7185);
  animation:micPulse 1s infinite ease-in-out;
}
@keyframes micPulse{
  0%,100%{box-shadow:0 0 0 0 rgba(239,68,68,.28)}
  50%{box-shadow:0 0 0 9px rgba(239,68,68,0)}
}
.typing-caret-inline{
  display:inline-block;
  width:7px;
  height:1.15em;
  margin-left:2px;
  vertical-align:-2px;
  background:#2563eb;
  animation:cursorBlink .8s infinite;
}
.message-content p{
  margin:0;
}
@media(max-width:900px){
  .header-theme{
    width:42px;
    height:38px;
    min-height:38px;
    padding:0;
    font-size:0;
  }
  .header-theme i{
    font-size:16px;
  }
  .sidebar-theme{
    display:flex!important;
  }
  .input-shell{
    grid-template-columns:1fr 48px 48px!important;
  }
  .mic-btn{
    width:48px;
    height:48px;
  }
}


/* --- Fixed voice, menu-only theme switch, inline message actions --- */
.header-theme{display:none!important}
.theme-switch{
  position:relative;
  width:100%;
  height:48px;
  margin-bottom:10px;
  border-radius:16px;
  border:1px solid var(--line);
  background:#fff;
  display:grid;
  grid-template-columns:1fr 1fr;
  align-items:center;
  padding:4px;
  color:#64748b;
  overflow:hidden;
  font-weight:900;
}
.theme-switch .switch-label{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  font-size:13px;
  transition:.22s;
}
.theme-switch .switch-thumb{
  position:absolute;
  z-index:1;
  left:4px;
  top:4px;
  width:calc(50% - 4px);
  height:calc(100% - 8px);
  border-radius:13px;
  background:linear-gradient(135deg,#f59e0b,#fbbf24);
  transition:.25s cubic-bezier(.2,.8,.2,1);
  box-shadow:0 8px 18px rgba(245,158,11,.20);
}
body.dark-mode .theme-switch{
  background:#0f172a;
  color:#94a3b8;
}
body.dark-mode .theme-switch .switch-thumb{
  left:calc(50%);
  background:linear-gradient(135deg,#2563eb,#60a5fa);
  box-shadow:0 8px 18px rgba(37,99,235,.25);
}
body:not(.dark-mode) .theme-switch .day,
body.dark-mode .theme-switch .night{
  color:#fff;
}
.voice-status{
  margin:8px auto 0;
  width:fit-content;
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid #fecdd3;
  color:#be123c;
  background:#fff1f2;
  padding:8px 11px;
  border-radius:999px;
  font-size:13px;
  font-weight:900;
  animation:voicePulse 1s infinite ease-in-out;
}
.voice-status[hidden]{display:none!important}
@keyframes voicePulse{
  0%,100%{transform:scale(1);opacity:.86}
  50%{transform:scale(1.03);opacity:1}
}
.message.user .bubble{
  cursor:pointer;
}
.inline-user-actions{
  display:none;
  align-items:center;
  gap:8px;
  justify-content:flex-end;
  margin-top:10px;
}
.message.user .bubble.actions-open .inline-user-actions{
  display:flex;
}
.inline-user-actions button,
.inline-user-actions span{
  min-height:32px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:0 10px;
  font-size:12px;
  font-weight:900;
}
.inline-user-actions button{
  background:rgba(255,255,255,.16);
  color:#fff;
}
.inline-user-actions span{
  background:rgba(255,255,255,.12);
  color:rgba(255,255,255,.92);
}
body.dark-mode .theme-switch{border-color:rgba(148,163,184,.22)}
@media(max-width:900px){
  .sidebar-theme{display:grid!important}
}


/* --- Final working fixes for theme switch and microphone --- */
.header-theme{display:none!important}
.theme-switch{
  cursor:pointer!important;
  user-select:none;
  position:relative;
  width:100%;
  height:48px;
  margin-bottom:10px;
  border-radius:16px;
  border:1px solid var(--line);
  background:#fff;
  display:grid!important;
  grid-template-columns:1fr 1fr;
  align-items:center;
  padding:4px;
  color:#64748b;
  overflow:hidden;
  font-weight:900;
}
.theme-switch .switch-label{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  font-size:13px;
}
.theme-switch .switch-thumb{
  position:absolute;
  z-index:1;
  top:4px;
  width:calc(50% - 4px);
  height:calc(100% - 8px);
  border-radius:13px;
  transition:.25s cubic-bezier(.2,.8,.2,1);
}
.theme-switch:not(.is-dark) .switch-thumb{
  left:4px!important;
  background:linear-gradient(135deg,#f59e0b,#fbbf24)!important;
}
.theme-switch.is-dark .switch-thumb{
  left:calc(50%)!important;
  background:linear-gradient(135deg,#2563eb,#60a5fa)!important;
}
.theme-switch:not(.is-dark) .day,
.theme-switch.is-dark .night{color:#fff!important}
.theme-switch:not(.is-dark) .night{color:#64748b!important}
.theme-switch.is-dark .day{color:#94a3b8!important}
.voice-status{
  margin:8px auto 0;
  width:fit-content;
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid #fecdd3;
  color:#be123c;
  background:#fff1f2;
  padding:8px 11px;
  border-radius:999px;
  font-size:13px;
  font-weight:900;
  animation:voicePulse 1s infinite ease-in-out;
  z-index:4;
}
.voice-status[hidden]{display:none!important}
.mic-btn.listening{
  color:#fff!important;
  background:linear-gradient(135deg,#ef4444,#fb7185)!important;
  animation:micPulse 1s infinite ease-in-out;
}
@keyframes voicePulse{0%,100%{transform:scale(1);opacity:.86}50%{transform:scale(1.03);opacity:1}}
@keyframes micPulse{0%,100%{box-shadow:0 0 0 0 rgba(239,68,68,.28)}50%{box-shadow:0 0 0 9px rgba(239,68,68,0)}}


/* DEFINITIVE THEME CSS */
#sidebarThemeToggle.theme-switch{
  cursor:pointer!important;
  user-select:none!important;
  position:relative!important;
  width:100%!important;
  height:48px!important;
  min-height:48px!important;
  margin:0 0 10px!important;
  border-radius:16px!important;
  border:1px solid var(--line)!important;
  background:#ffffff!important;
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  align-items:center!important;
  padding:4px!important;
  color:#64748b!important;
  overflow:hidden!important;
  font-weight:900!important;
  pointer-events:auto!important;
}
#sidebarThemeToggle .switch-label{
  position:relative!important;
  z-index:3!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  font-size:13px!important;
  pointer-events:none!important;
}
#sidebarThemeToggle .switch-thumb{
  position:absolute!important;
  z-index:2!important;
  top:4px!important;
  left:4px!important;
  width:calc(50% - 4px)!important;
  height:calc(100% - 8px)!important;
  border-radius:13px!important;
  background:linear-gradient(135deg,#f59e0b,#fbbf24)!important;
  transition:left .25s cubic-bezier(.2,.8,.2,1), background .25s!important;
  pointer-events:none!important;
}
#sidebarThemeToggle:not(.is-dark) .day{color:#fff!important}
#sidebarThemeToggle:not(.is-dark) .night{color:#64748b!important}
#sidebarThemeToggle.is-dark{
  background:#0f172a!important;
  border-color:rgba(148,163,184,.22)!important;
}
#sidebarThemeToggle.is-dark .switch-thumb{
  left:calc(50%)!important;
  background:linear-gradient(135deg,#2563eb,#60a5fa)!important;
}
#sidebarThemeToggle.is-dark .night{color:#fff!important}
#sidebarThemeToggle.is-dark .day{color:#94a3b8!important}

html[data-theme="dark"] body,
body.dark-mode{
  --bg:#0b1020!important;
  --panel:rgba(15,23,42,.86)!important;
  --text:#f8fafc!important;
  --muted:#94a3b8!important;
  --line:rgba(148,163,184,.22)!important;
  --line2:rgba(148,163,184,.34)!important;
  --soft:#111827!important;
  background:
    radial-gradient(circle at 10% 0%,rgba(37,99,235,.24) 0,transparent 32rem),
    radial-gradient(circle at 100% 0%,rgba(96,165,250,.16) 0,transparent 30rem),
    linear-gradient(135deg,#020617,#0b1020)!important;
}
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .chat{
  background:rgba(15,23,42,.86)!important;
}
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .composer{
  background:rgba(15,23,42,.78)!important;
}
html[data-theme="dark"] .message.bot .bubble,
html[data-theme="dark"] .history-item,
html[data-theme="dark"] .side-note,
html[data-theme="dark"] .love-dedication,
html[data-theme="dark"] .history-search input,
html[data-theme="dark"] .input-shell,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .share-text,
html[data-theme="dark"] .mini-popover,
html[data-theme="dark"] .mini-popover button,
html[data-theme="dark"] .mini-popover span{
  background:#111827!important;
  color:#f8fafc!important;
  border-color:rgba(148,163,184,.22)!important;
}
html[data-theme="dark"] textarea,
html[data-theme="dark"] .history-search input{
  color:#f8fafc!important;
}
html[data-theme="dark"] .modal p,
html[data-theme="dark"] .side-note,
html[data-theme="dark"] .brand span,
html[data-theme="dark"] .top-title span{
  color:#94a3b8!important;
}


/* --- FINAL BLACK DARK MODE REFINEMENT --- */
html[data-theme="dark"] body,
body.dark-mode{
  --bg:#000000!important;
  --panel:#070707!important;
  --text:#f9fafb!important;
  --muted:#a1a1aa!important;
  --line:rgba(255,255,255,.10)!important;
  --line2:rgba(255,255,255,.16)!important;
  --soft:#111111!important;
  background:#000000!important;
  color:#f9fafb!important;
}
html[data-theme="dark"] .bg-grid{
  opacity:.18!important;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px)!important;
}
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .chat{
  background:#070707!important;
  border-color:rgba(255,255,255,.10)!important;
  box-shadow:0 28px 80px rgba(0,0,0,.55)!important;
}
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .composer{
  background:#050505!important;
  border-color:rgba(255,255,255,.10)!important;
}
html[data-theme="dark"] .brand strong,
html[data-theme="dark"] .top-title strong,
html[data-theme="dark"] .history-head span,
html[data-theme="dark"] .hero-mini h1{
  color:#ffffff!important;
}
html[data-theme="dark"] .brand span,
html[data-theme="dark"] .top-title span,
html[data-theme="dark"] .side-note,
html[data-theme="dark"] .composer small,
html[data-theme="dark"] .love-dedication p{
  color:#a1a1aa!important;
}
html[data-theme="dark"] .message.bot .bubble{
  background:#101010!important;
  color:#f9fafb!important;
  border-color:rgba(255,255,255,.10)!important;
}
html[data-theme="dark"] .message.user .bubble{
  background:linear-gradient(135deg,#2563eb,#1d4ed8)!important;
  color:#fff!important;
}
html[data-theme="dark"] .history-item,
html[data-theme="dark"] .side-note,
html[data-theme="dark"] .love-dedication,
html[data-theme="dark"] .history-search input,
html[data-theme="dark"] .input-shell,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .share-text,
html[data-theme="dark"] .mini-popover,
html[data-theme="dark"] .mini-popover button,
html[data-theme="dark"] .mini-popover span{
  background:#101010!important;
  color:#f9fafb!important;
  border-color:rgba(255,255,255,.10)!important;
}
html[data-theme="dark"] .history-item.active,
html[data-theme="dark"] .history-item:hover{
  background:#151515!important;
  border-color:rgba(96,165,250,.45)!important;
}
html[data-theme="dark"] textarea,
html[data-theme="dark"] .history-search input{
  color:#f9fafb!important;
}
html[data-theme="dark"] .history-search input::placeholder,
html[data-theme="dark"] textarea::placeholder{
  color:#71717a!important;
}
html[data-theme="dark"] .primary-btn,
html[data-theme="dark"] #sendBtn{
  background:linear-gradient(135deg,#2563eb,#60a5fa)!important;
  color:#fff!important;
}
html[data-theme="dark"] .mic-btn{
  background:#111827!important;
  color:#60a5fa!important;
  border:1px solid rgba(96,165,250,.25)!important;
}
html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .sidebar-close,
html[data-theme="dark"] #clearBtn,
html[data-theme="dark"] .delete-chat{
  background:#111111!important;
  color:#f9fafb!important;
  border-color:rgba(255,255,255,.10)!important;
}
html[data-theme="dark"] .bot-face,
html[data-theme="dark"] .logo{
  background:linear-gradient(135deg,#2563eb,#60a5fa)!important;
}
html[data-theme="dark"] .love-dedication{
  background:
    radial-gradient(circle at 0% 0%,rgba(239,68,68,.16),transparent 7rem),
    #101010!important;
  box-shadow:0 10px 25px rgba(0,0,0,.35)!important;
}
html[data-theme="dark"] .love-dedication strong{
  color:#fecaca!important;
}
html[data-theme="dark"] .heart-orbit{
  background:linear-gradient(135deg,#dc2626,#fb7185)!important;
}
html[data-theme="dark"] .theme-switch{
  background:#101010!important;
  border-color:rgba(255,255,255,.12)!important;
}
html[data-theme="dark"] .code-card{
  border-color:rgba(96,165,250,.25)!important;
}
html[data-theme="dark"] .voice-status{
  background:#1f0b0b!important;
  border-color:rgba(248,113,113,.35)!important;
  color:#fecaca!important;
}

/* mic button grid guarantee */
.input-shell{
  grid-template-columns:1fr 52px 52px!important;
}
@media(max-width:900px){
  .input-shell{
    grid-template-columns:1fr 48px 48px!important;
  }
}


/* --- Requested cleanup: no dark/light switch, empty hero hidden, desktop sidebar collapse --- */
.sidebar-theme, #sidebarThemeToggle{display:none!important}
.hero-mini#emptyHero{display:none!important}
.history-search[hidden], #deleteAllBtn[hidden]{display:none!important}
.desktop-sidebar-toggle{display:grid;place-items:center;flex:0 0 auto}
.layout.sidebar-collapsed{grid-template-columns:0 1fr}
.layout.sidebar-collapsed .sidebar{
  padding:0!important;
  border-width:0!important;
  opacity:0;
  overflow:hidden;
  pointer-events:none;
}
.layout.sidebar-collapsed .chat{min-width:0}
@media(max-width:900px){
  .desktop-sidebar-toggle{display:none!important}
  .layout.sidebar-collapsed{grid-template-columns:1fr}
}

/* --- User requested final UX fixes --- */
.chat{
  grid-template-rows:auto 1fr auto!important;
}
.hero-mini#emptyHero{display:none!important}
.messages{
  flex:1 1 auto!important;
  min-height:0!important;
}
.composer{
  position:sticky!important;
  bottom:0!important;
  z-index:3;
  background:rgba(255,255,255,.96)!important;
  backdrop-filter:blur(16px);
}
.form-alert{
  width:fit-content;
  max-width:100%;
  margin:9px auto 0;
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  background:linear-gradient(135deg,#fff7ed,#ffedd5);
  color:#9a3412;
  border:1px solid #fed7aa;
  box-shadow:0 16px 36px rgba(249,115,22,.16);
  font-size:13px;
  font-weight:900;
}
.form-alert[hidden]{display:none!important}
.form-alert.show{animation:alertPop .22s ease both, alertShake .34s ease .22s both}
@keyframes alertPop{from{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes alertShake{0%,100%{transform:translateX(0)}25%{transform:translateX(-4px)}50%{transform:translateX(4px)}75%{transform:translateX(-2px)}}
textarea::placeholder{transition:opacity .18s ease;color:#94a3b8}
@media(min-width:901px){
  .layout{height:calc(100dvh - 28px)!important}
  .chat{height:100%!important;display:grid!important}
  .messages:empty{min-height:0!important}
  .composer{margin-top:auto!important}
}
@media(max-width:900px){
  .chat{display:flex!important;flex-direction:column!important}
  .composer{position:relative!important;bottom:auto!important}
}

/* --- v3 requested interaction fixes --- */
@media(hover:hover) and (min-width:901px){
  .message.user .bubble::after{display:none!important}
}
.message.bot .message-actions{
  display:none!important;
  opacity:0;
  transform:translateY(4px);
  transition:.18s ease;
}
.message.bot .bubble.actions-open .message-actions{
  display:flex!important;
  opacity:1;
  transform:translateY(0);
}
.share-modal{
  width:min(430px,calc(100vw - 28px))!important;
  max-height:min(78vh,680px);
  overflow:auto;
  padding:20px!important;
  border-radius:24px!important;
}
.share-modal .modal-icon{
  width:48px!important;
  height:48px!important;
  border-radius:16px!important;
  font-size:18px!important;
  margin-bottom:8px!important;
}
.share-modal h2{font-size:20px!important;margin:6px 0!important}
.share-modal p{font-size:13px!important;margin:6px 0 12px!important}
.share-buttons{gap:8px!important}
.share-btn{min-height:42px!important;border-radius:14px!important;font-size:13px!important}
.share-text{min-height:104px!important;max-height:150px!important;font-size:13px!important}
.copy-wide{min-height:44px!important;border-radius:14px!important}
#sendBtn.stop-mode{
  background:linear-gradient(135deg,#ef4444,#f97316)!important;
  opacity:1!important;
  cursor:pointer!important;
}
#sendBtn.stop-mode:hover{transform:translateY(-2px)!important}
.ai-generating .mic-btn,
.mic-btn.disabled{
  opacity:.45!important;
  cursor:not-allowed!important;
  pointer-events:none!important;
}
@media(min-width:901px){
  #micBtn{display:none!important}
  .input-shell{grid-template-columns:1fr 52px!important}
}
@media(max-width:900px){
  .share-modal{
    width:min(390px,calc(100vw - 22px))!important;
    max-height:76svh!important;
    padding:18px 14px!important;
  }
  .share-buttons{grid-template-columns:1fr 1fr!important}
  .share-text{max-height:126px!important}
}

/* --- v4 message/composer refinements --- */
.message.user .bubble{
  background:#e5e7eb!important;
  color:#111827!important;
  border:1px solid #d1d5db!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .message.user .bubble,
body.dark-mode .message.user .bubble{
  background:#2f3542!important;
  color:#f8fafc!important;
  border-color:rgba(148,163,184,.24)!important;
}
.message.user .message-head{display:none!important}
.inline-user-actions button{
  width:32px!important;
  min-width:32px!important;
  padding:0!important;
  justify-content:center!important;
  background:rgba(17,24,39,.08)!important;
  color:#111827!important;
}
.message.user .bubble .inline-user-actions span{
  background:rgba(17,24,39,.07)!important;
  color:#475569!important;
}
html[data-theme="dark"] .inline-user-actions button,
body.dark-mode .inline-user-actions button{
  background:rgba(255,255,255,.12)!important;
  color:#fff!important;
}
html[data-theme="dark"] .message.user .bubble .inline-user-actions span,
body.dark-mode .message.user .bubble .inline-user-actions span{
  background:rgba(255,255,255,.10)!important;
  color:rgba(248,250,252,.88)!important;
}
#sendBtn.send-empty,
#sendBtn:disabled:not(.stop-mode){
  opacity:.34!important;
  filter:grayscale(.35)!important;
  cursor:not-allowed!important;
  transform:none!important;
  box-shadow:none!important;
}
#sendBtn:not(.send-empty):not(:disabled),
.composer-has-text #sendBtn{
  opacity:1!important;
  filter:none!important;
  cursor:pointer!important;
}
.input-shell.has-text .mic-btn,
.mic-btn.hide-while-typing{
  display:none!important;
}
.input-shell.has-text{
  grid-template-columns:1fr 52px!important;
}
@media(max-width:900px){
  .input-shell.has-text{grid-template-columns:1fr 48px!important}
}


/* --- v5 small UI refinements --- */
/* AI cevap balonlarında Gooy AI yazısı ve robot ikon alanı komple gizli */
.message.bot .message-head{display:none!important}

/* Yapay zeka cevap yazarken mikrofon tamamen gizlensin */
.ai-generating #micBtn,
.ai-generating .mic-btn,
.mic-btn.hide-during-generating{
  display:none!important;
}
.ai-generating .input-shell{
  grid-template-columns:1fr 52px!important;
}
@media(max-width:900px){
  .ai-generating .input-shell{grid-template-columns:1fr 48px!important}
}

/* Menüdeki Yeni sohbet butonu artık mavi değil, gri */
#newChatBtn.primary-btn,
.primary-btn#newChatBtn{
  background:#e5e7eb!important;
  color:#111827!important;
  border:1px solid #d1d5db!important;
  box-shadow:none!important;
}
#newChatBtn.primary-btn:hover,
.primary-btn#newChatBtn:hover{
  background:#d1d5db!important;
  transform:translateY(-1px)!important;
  box-shadow:none!important;
}
html[data-theme="dark"] #newChatBtn.primary-btn,
body.dark-mode #newChatBtn.primary-btn{
  background:#1f2937!important;
  color:#f8fafc!important;
  border-color:rgba(255,255,255,.12)!important;
}
html[data-theme="dark"] #newChatBtn.primary-btn:hover,
body.dark-mode #newChatBtn.primary-btn:hover{
  background:#374151!important;
}


/* --- v6 requested refinements --- */
/* Sesli yazma uyarısı artık altta ayrı görünmez; metin doğrudan textbox placeholder'ına yazılır. */
.voice-status{display:none!important}
.input-shell.voice-active textarea::placeholder{
  color:#334155!important;
  opacity:1!important;
  font-weight:800;
}
.input-shell.voice-active{
  border-color:#cbd5e1!important;
  box-shadow:0 16px 45px rgba(15,23,42,.08)!important;
}

/* Gönder butonu mavi yerine gri tonlarda kalsın. */
#sendBtn{
  background:#6b7280!important;
  color:#fff!important;
  box-shadow:0 12px 28px rgba(107,114,128,.20)!important;
}
#sendBtn:hover{background:#4b5563!important}
#sendBtn.stop-mode{
  background:#ef4444!important;
  box-shadow:0 12px 28px rgba(239,68,68,.22)!important;
}
#sendBtn.send-empty,
#sendBtn:disabled:not(.stop-mode){
  background:#9ca3af!important;
  color:#f8fafc!important;
  opacity:.38!important;
  box-shadow:none!important;
}

/* Yeni sohbette mesaj alanı ortada; ilk mesajdan sonra tekrar alta iner. */
.chat.empty-chat{
  display:flex!important;
  flex-direction:column!important;
}
.chat.empty-chat .messages{
  display:none!important;
}
.chat.empty-chat .composer{
  position:relative!important;
  bottom:auto!important;
  margin:auto 0!important;
  border-top:0!important;
  background:transparent!important;
  backdrop-filter:none!important;
  padding-left:min(18px,4vw)!important;
  padding-right:min(18px,4vw)!important;
}
.empty-prompt{
  text-align:center;
  font-size:clamp(22px,3.4vw,38px);
  line-height:1.15;
  font-weight:950;
  color:#111827;
  margin:0 auto 18px;
  letter-spacing:-.04em;
  max-width:760px;
}
.empty-prompt[hidden]{display:none!important}
.chat:not(.empty-chat) .empty-prompt{display:none!important}
.chat.empty-chat .composer small{
  opacity:.72;
}
@media(max-width:900px){
  .chat.empty-chat .composer{
    margin:auto 0!important;
    padding-bottom:calc(16px + env(safe-area-inset-bottom))!important;
  }
  .empty-prompt{
    font-size:25px;
    margin-bottom:14px;
    padding:0 8px;
  }
}

/* --- v7 sadeleştirme ve popup düzenlemeleri --- */
.dedication-trigger{
  border:0;
  padding:0;
  cursor:pointer;
}
.dedication-trigger:hover{
  transform:translateY(-1px) scale(1.02);
}
.dedication-modal{
  width:min(360px,calc(100vw - 28px))!important;
  padding:24px 20px!important;
}
.dedication-modal h2{
  margin:8px 0 4px!important;
  font-size:24px!important;
  letter-spacing:-.03em;
}
.dedication-modal p{
  margin:0!important;
  color:#64748b!important;
  font-weight:800;
}
.dedication-heart{
  margin:0 auto 10px!important;
}

/* AI cevap üstündeki kopyala/paylaş ikonları sade gri-beyaz */
.message.bot .message-actions{
  gap:8px!important;
}
.message.bot .tts-msg-btn,
.message.bot .copy-btn,
.message.bot .share-msg-btn{
  background:#fff!important;
  color:#6b7280!important;
  border:1px solid #e5e7eb!important;
  box-shadow:0 8px 18px rgba(15,23,42,.06)!important;
}
.message.bot .tts-msg-btn:hover,
.message.bot .copy-btn:hover,
.message.bot .share-msg-btn:hover{
  background:#f9fafb!important;
  color:#374151!important;
  transform:translateY(-1px)!important;
}

/* Paylaş popup renkleri daha sade */
.share-modal .share-icon,
.share-modal .modal-icon{
  background:#f3f4f6!important;
  color:#6b7280!important;
}
.share-modal .share-btn{
  background:#f3f4f6!important;
  color:#374151!important;
  border:1px solid #e5e7eb!important;
}
.share-modal .share-btn:hover{
  background:#e5e7eb!important;
}
.share-modal .share-btn i{
  color:#6b7280!important;
}
.copy-wide{
  background:#f3f4f6!important;
  color:#374151!important;
  border:1px solid #e5e7eb!important;
  box-shadow:none!important;
}
.copy-wide i{color:#6b7280!important}
.copy-wide:hover{background:#e5e7eb!important}

/* Kod blokları gri arka plan */
.code-card{
  background:#f3f4f6!important;
  border-color:#e5e7eb!important;
  box-shadow:none!important;
}
.code-head{
  background:#e5e7eb!important;
  color:#374151!important;
  border-bottom:1px solid #d1d5db!important;
}
.code-body,
.code-body pre,
.code-body code{
  background:#f3f4f6!important;
  color:#1f2937!important;
}
.code-copy{
  background:#fff!important;
  color:#374151!important;
  border:1px solid #d1d5db!important;
}
.tok-key,.tok-tag,.tok-str,.tok-num,.tok-com{
  color:inherit!important;
  font-weight:inherit!important;
}

/* Yeni sohbet butonu tamamen gri kalsın */
#newChatBtn.primary-btn,
.primary-btn#newChatBtn{
  background:#f3f4f6!important;
  color:#374151!important;
  border-color:#e5e7eb!important;
}
#newChatBtn.primary-btn:hover,
.primary-btn#newChatBtn:hover{
  background:#e5e7eb!important;
}

/* --- v8 gri seçim ve dil uyumlu son dokunuşlar --- */
::selection{
  background:#d1d5db;
  color:#111827;
}
::-moz-selection{
  background:#d1d5db;
  color:#111827;
}
.message-content ::selection,
textarea::selection,
.share-text::selection{
  background:#cbd5e1;
  color:#111827;
}
#sendBtn,
#sendBtn:not(.send-empty):not(:disabled),
.composer-has-text #sendBtn{
  background:#6b7280!important;
  color:#fff!important;
  box-shadow:none!important;
}
#sendBtn:hover{background:#4b5563!important}
#sendBtn.stop-mode{
  background:#6b7280!important;
  color:#fff!important;
}

/* ElevenLabs TTS card */
.tts-card{
  margin-top:14px;
  padding:14px;
  border:1px solid #e5e7eb;
  border-radius:18px;
  background:#f3f4f6;
  color:#111827;
}
.tts-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:14px;
  font-weight:800;
  color:#374151;
  margin-bottom:9px;
}
.tts-card-head i{color:#6b7280}
.tts-preview{
  margin:0 0 12px!important;
  color:#4b5563;
  font-size:14px;
  line-height:1.5;
}
.tts-controls{
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:8px;
  align-items:center;
}
.tts-voice,
.tts-create,
.tts-download{
  min-height:42px;
  border-radius:13px;
  border:1px solid #e5e7eb;
  font-size:13px;
}
.tts-voice{
  background:#fff;
  color:#111827;
  padding:0 12px;
  outline:none;
}
.tts-create,
.tts-download{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 13px;
  background:#fff;
  color:#374151;
  text-decoration:none;
  cursor:pointer;
  font-weight:800;
  white-space:nowrap;
}
.tts-create:hover,
.tts-download:hover{background:#f9fafb}
.tts-create:disabled,
.tts-download.disabled{opacity:.5;pointer-events:none;cursor:not-allowed}
.tts-audio{width:100%;margin-top:12px;display:block}
.tts-audio[hidden]{display:none}
.tts-status{
  margin-top:10px;
  padding:10px 11px;
  border-radius:13px;
  background:#fff;
  color:#6b7280;
  font-size:13px;
}
@media (max-width: 700px){
  .tts-controls{grid-template-columns:1fr}
  .tts-create,.tts-download{width:100%}
}


/* v10: AI cevaplarında seslendir butonu */
.message.bot .tts-msg-btn{
  background:#fff!important;
  color:#6b7280!important;
  border:1px solid #e5e7eb!important;
  box-shadow:0 8px 18px rgba(15,23,42,.06)!important;
}
.message.bot .tts-msg-btn:hover{
  background:#f9fafb!important;
  color:#374151!important;
  transform:translateY(-1px)!important;
}
.message.bot .tts-card{cursor:default}
@media(max-width:700px){
  .message.bot .message-actions{gap:6px!important}
}

/* v11: + araç menüsü ve metin seslendirme modu */
.input-shell{grid-template-columns:46px 1fr 52px 52px!important;position:relative}
.plus-btn{
  width:46px;height:46px;border-radius:16px;background:#f3f4f6;color:#374151;border:1px solid #e5e7eb;
  display:grid;place-items:center;align-self:end;transition:.18s;font-weight:900
}
.plus-btn:hover{background:#e5e7eb;transform:translateY(-1px)}
.tool-popover{
  position:absolute;left:18px;bottom:96px;z-index:20;width:min(280px,calc(100vw - 36px));
  padding:10px;border-radius:18px;background:#fff;border:1px solid #e5e7eb;box-shadow:0 20px 55px rgba(15,23,42,.14)
}
.tool-popover.show{display:block!important}
.tool-option{width:100%;display:flex;align-items:center;gap:12px;padding:12px;border-radius:14px;background:#f9fafb;color:#111827;text-align:left;border:1px solid #f1f5f9}
.tool-option:hover{background:#f3f4f6}.tool-option span{width:38px;height:38px;border-radius:13px;background:#e5e7eb;color:#4b5563;display:grid;place-items:center}.tool-option strong{font-size:14px}
.tts-mode-badge{display:inline-flex;align-items:center;gap:7px;margin-bottom:8px;padding:7px 10px;border-radius:999px;background:#f3f4f6;color:#4b5563;font-size:12px;font-weight:800}
.tts-choice-card{margin-top:12px;display:grid;grid-template-columns:1fr 1fr;gap:8px}.tts-choice-card button{min-height:46px;border-radius:14px;background:#f3f4f6;color:#374151;border:1px solid #e5e7eb;font-weight:800}.tts-choice-card button:hover{background:#e5e7eb}
.tts-result-card{margin-top:12px;padding:14px;border-radius:18px;background:#f3f4f6;border:1px solid #e5e7eb;color:#111827}.tts-result-head{display:flex;align-items:center;justify-content:space-between;gap:10px;font-weight:900;color:#374151;margin-bottom:10px}.tts-result-text{font-size:13px;color:#4b5563;line-height:1.5;margin:0 0 12px}.tts-result-card audio{width:100%;display:block;margin:10px 0}.tts-result-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.tts-result-actions a,.tts-result-actions button{min-height:42px;border-radius:13px;border:1px solid #e5e7eb;background:#fff;color:#374151;font-weight:800;text-decoration:none;display:flex;align-items:center;justify-content:center;gap:7px}.tts-result-actions a.disabled{opacity:.45;pointer-events:none}.tts-loading{display:flex;align-items:center;gap:9px;color:#6b7280;font-size:13px;margin-top:8px}.tts-generated-title{margin:10px 0 0;color:#6b7280;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}
.tts-mode-active .input-shell{border-color:#cbd5e1;box-shadow:0 18px 45px rgba(107,114,128,.10)}
.tts-mode-active #messageInput::placeholder{color:#6b7280}
@media(min-width:901px){.input-shell{grid-template-columns:46px 1fr 52px!important}.input-shell.has-text{grid-template-columns:46px 1fr 52px!important}.ai-generating .input-shell{grid-template-columns:46px 1fr 52px!important}}
@media(max-width:900px){.input-shell{grid-template-columns:44px 1fr 48px 48px!important}.plus-btn{width:44px;height:44px;border-radius:15px}.input-shell.has-text{grid-template-columns:44px 1fr 48px!important}.input-shell.has-text .plus-btn{display:grid!important}.ai-generating .input-shell{grid-template-columns:44px 1fr 48px!important}.tts-choice-card{grid-template-columns:1fr}.tts-result-actions{grid-template-columns:1fr}.tool-popover{left:10px;bottom:84px}}

/* --- v12 fixes: aktif TTS modu, mobil giriş satırı ve + menüsü --- */
.plus-btn.active,
.tool-popover-open .plus-btn{
  background:#e5e7eb!important;
  border-color:#cbd5e1!important;
  color:#111827!important;
  box-shadow:0 8px 20px rgba(15,23,42,.10), inset 0 0 0 1px rgba(255,255,255,.65)!important;
  transform:translateY(-1px) rotate(45deg)!important;
}
.tool-popover::after{
  content:"";
  position:absolute;
  left:20px;
  bottom:-7px;
  width:14px;
  height:14px;
  background:#fff;
  border-right:1px solid #e5e7eb;
  border-bottom:1px solid #e5e7eb;
  transform:rotate(45deg);
}
#messageInput{
  overflow:hidden!important;
  scrollbar-width:none!important;
  -ms-overflow-style:none!important;
  min-width:0!important;
}
#messageInput::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
.input-shell{overflow:visible!important}
@media(max-width:900px){
  .input-shell{grid-template-columns:38px minmax(0,1fr) 44px 44px!important;gap:6px!important;padding:7px!important;border-radius:20px!important;align-items:center!important}
  .plus-btn{width:38px!important;height:38px!important;border-radius:13px!important;font-size:14px!important;align-self:center!important}
  .mic-btn,#sendBtn{width:44px!important;height:44px!important;border-radius:15px!important;align-self:center!important}
  #messageInput{height:44px!important;min-height:44px!important;max-height:44px!important;line-height:22px!important;padding:11px 4px!important;white-space:nowrap!important;overflow:hidden!important;resize:none!important;font-size:15px!important}
  #messageInput::placeholder{white-space:nowrap!important;font-size:14px!important;opacity:.9!important}
  .input-shell.has-text{grid-template-columns:38px minmax(0,1fr) 44px!important}
  .input-shell.has-text #messageInput{padding-right:6px!important}
  .ai-generating .input-shell{grid-template-columns:38px minmax(0,1fr) 44px!important}
  .tool-popover{left:10px!important;bottom:76px!important;width:min(260px,calc(100vw - 24px))!important}
  .tool-popover::after{left:20px!important}
}
@media(max-width:390px){
  .input-shell{grid-template-columns:34px minmax(0,1fr) 40px 40px!important;gap:5px!important}
  .plus-btn{width:34px!important;height:34px!important;border-radius:12px!important}
  .mic-btn,#sendBtn{width:40px!important;height:40px!important;border-radius:14px!important}
  #messageInput{height:40px!important;min-height:40px!important;max-height:40px!important;font-size:14px!important;padding-left:2px!important;padding-right:2px!important}
  #messageInput::placeholder{font-size:13px!important}
  .input-shell.has-text{grid-template-columns:34px minmax(0,1fr) 40px!important}
  .ai-generating .input-shell{grid-template-columns:34px minmax(0,1fr) 40px!important}
}

/* --- v13 TTS hız, tarz ve çoklu yeniden oluşturma --- */
.tts-settings-card{
  margin-top:12px;
  padding:14px;
  border-radius:18px;
  background:#f3f4f6;
  border:1px solid #e5e7eb;
}
.tts-settings-summary{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border-radius:999px;
  background:#fff;
  color:#374151;
  font-size:12px;
  font-weight:900;
  margin-bottom:12px;
}
.tts-range-label,
.tts-tone-label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color:#374151;
  font-size:13px;
  font-weight:900;
  margin:8px 0;
}
.tts-speed-value{
  background:#fff;
  color:#111827;
  border:1px solid #e5e7eb;
  border-radius:999px;
  padding:5px 9px;
  font-size:12px;
}
.tts-range-wrap{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:10px;
  color:#6b7280;
  font-size:12px;
  font-weight:800;
  margin-bottom:12px;
}
.tts-speed-range{
  width:100%;
  accent-color:#6b7280;
}
.tts-tone-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:8px;
}
.tts-tone-grid button,
.tts-create-now{
  min-height:42px;
  border-radius:13px;
  border:1px solid #e5e7eb;
  background:#fff;
  color:#374151;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
}
.tts-tone-grid button.active,
.tts-tone-grid button:hover{
  background:#e5e7eb;
  border-color:#d1d5db;
}
.tts-create-now{
  width:100%;
  margin-top:12px;
  background:#111827;
  color:#fff;
  border-color:#111827;
}
.tts-create-now:hover{filter:brightness(.95)}
.tts-result-meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:-4px 0 10px;
}
.tts-result-meta span{
  display:inline-flex;
  align-items:center;
  padding:5px 8px;
  border-radius:999px;
  background:#fff;
  border:1px solid #e5e7eb;
  color:#6b7280;
  font-size:12px;
  font-weight:800;
}
@media(max-width:640px){
  .tts-tone-grid{grid-template-columns:1fr}
  .tts-range-wrap{grid-template-columns:auto 1fr auto;gap:7px}
}

/* --- v14 TTS ayrıştırma, geçmiş ve ses kartı düzeni --- */
body:not(.plus-available) .plus-btn{display:none!important}
body:not(.plus-available) .input-shell{grid-template-columns:minmax(0,1fr) 52px 52px!important}
body:not(.plus-available) .input-shell.has-text{grid-template-columns:minmax(0,1fr) 52px!important}
@media(min-width:901px){
  body.plus-available .input-shell{grid-template-columns:46px minmax(0,1fr) 52px!important}
  body:not(.plus-available) .input-shell{grid-template-columns:minmax(0,1fr) 52px!important}
  body:not(.plus-available) .input-shell.has-text{grid-template-columns:minmax(0,1fr) 52px!important}
}
@media(max-width:900px){
  body.plus-available .input-shell{grid-template-columns:38px minmax(0,1fr) 44px 44px!important}
  body:not(.plus-available) .input-shell{grid-template-columns:minmax(0,1fr) 44px 44px!important}
  body:not(.plus-available) .input-shell.has-text{grid-template-columns:minmax(0,1fr) 44px!important}
  body:not(.plus-available).ai-generating .input-shell{grid-template-columns:minmax(0,1fr) 44px!important}
}
@media(max-width:390px){
  body.plus-available .input-shell{grid-template-columns:34px minmax(0,1fr) 40px 40px!important}
  body:not(.plus-available) .input-shell{grid-template-columns:minmax(0,1fr) 40px 40px!important}
  body:not(.plus-available) .input-shell.has-text{grid-template-columns:minmax(0,1fr) 40px!important}
}
.tts-counter{
  width:max-content;
  margin:7px 6px 0 auto;
  padding:4px 9px;
  border-radius:999px;
  background:#f3f4f6;
  border:1px solid #e5e7eb;
  color:#6b7280;
  font-size:12px;
  font-weight:800;
}
.tts-flow-message .bubble{cursor:default!important}
.tts-flow-message .message-actions{display:none!important}
.tts-history-block{margin-top:12px;border-top:1px solid var(--line);padding-top:10px}
.tts-history-head{margin-top:0!important}
.tts-history-list{display:grid;gap:7px}
.tts-history-item{display:grid;grid-template-columns:minmax(0,1fr) 36px;gap:6px;align-items:center}
.tts-history-main{min-width:0;display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:13px;background:#f3f4f6;color:#374151;text-align:left;border:1px solid #e5e7eb;font-size:13px;font-weight:800}
.tts-history-main span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tts-history-download{width:36px;height:36px;border-radius:12px;background:#f3f4f6;border:1px solid #e5e7eb;color:#6b7280;display:grid;place-items:center;text-decoration:none}
.tts-result-card.compact{background:#f3f4f6;border:1px solid #e5e7eb;border-radius:18px;padding:13px;box-shadow:0 10px 24px rgba(15,23,42,.05)}
.tts-result-top{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:8px}
.tts-pill{display:inline-flex;align-items:center;gap:6px;padding:5px 8px;border-radius:999px;background:#fff;border:1px solid #e5e7eb;color:#4b5563;font-size:12px;font-weight:900}
.tts-player-line{display:grid;grid-template-columns:38px minmax(0,1fr) 38px;align-items:center;gap:10px;margin-top:10px;padding:9px;border-radius:16px;background:#fff;border:1px solid #e5e7eb}
.tts-play-toggle,.tts-download-link{width:38px;height:38px;border-radius:13px;border:1px solid #e5e7eb;background:#f9fafb;color:#374151;display:grid;place-items:center;text-decoration:none}
.tts-download-link.disabled{opacity:.45;pointer-events:none}
.tts-wave{height:38px;display:flex;align-items:center;gap:3px;overflow:hidden}
.tts-wave span{display:block;width:4px;height:12px;border-radius:999px;background:#d1d5db;animation:ttsWave 1.1s ease-in-out infinite;animation-play-state:paused;animation-delay:calc(var(--i) * -0.06s)}
.tts-player-line.playing .tts-wave span{animation-play-state:running;background:#9ca3af}
.tts-wave span:nth-child(3n){height:22px}.tts-wave span:nth-child(4n){height:28px}.tts-wave span:nth-child(5n){height:16px}
@keyframes ttsWave{0%,100%{transform:scaleY(.55)}50%{transform:scaleY(1.35)}}
.tts-result-actions,.tts-regenerate{display:none!important}
@media(max-width:520px){
  .tts-player-line{grid-template-columns:34px minmax(0,1fr) 34px;gap:7px;padding:8px}
  .tts-play-toggle,.tts-download-link{width:34px;height:34px;border-radius:12px}
  .tts-wave{gap:2px}.tts-wave span{width:3px}
}

/* --- v15 TTS mode bug fixes and mobile composer polish --- */
.tts-mode-active .composer small{display:none!important}
.tts-mode-active .plus-btn{display:none!important}
.tts-mode-active .input-shell,
body:not(.plus-available).tts-mode-active .input-shell,
.tts-mode-active .input-shell.has-text{
  grid-template-columns:minmax(0,1fr) 52px!important;
  align-items:end!important;
}
.tts-mode-active .mic-btn{display:none!important}
.input-shell.has-text .mic-btn.hide-while-typing{
  display:grid!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
body.plus-available .input-shell.has-text{
  grid-template-columns:46px minmax(0,1fr) 52px 52px!important;
}
body:not(.plus-available):not(.tts-mode-active) .input-shell.has-text{
  grid-template-columns:minmax(0,1fr) 52px 52px!important;
}
body:not(.plus-available):not(.tts-mode-active) .input-shell.has-text .mic-btn{display:grid!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important}
#messageInput{
  min-width:0!important;
  line-height:1.45!important;
  padding-top:14px!important;
  padding-bottom:14px!important;
  overflow-y:auto!important;
}
.tts-mode-active #messageInput::placeholder{color:#6b7280!important}
.tts-history-item{grid-template-columns:minmax(0,1fr) 36px 36px!important}
.tts-history-delete{width:36px;height:36px;border-radius:12px;background:#f3f4f6;border:1px solid #e5e7eb;color:#6b7280;display:grid;place-items:center;text-decoration:none}
.tts-history-delete:hover,.tts-history-download:hover{background:#e5e7eb;color:#374151}
.tts-result-card.compact{background:linear-gradient(180deg,#f9fafb,#f3f4f6)!important}
.tts-player-line{grid-template-columns:38px minmax(0,1fr) 38px!important;white-space:nowrap!important}
@media(max-width:900px){
  body.plus-available .input-shell.has-text{grid-template-columns:38px minmax(0,1fr) 44px 44px!important}
  body:not(.plus-available):not(.tts-mode-active) .input-shell.has-text{grid-template-columns:minmax(0,1fr) 44px 44px!important}
  .tts-mode-active .input-shell,.tts-mode-active .input-shell.has-text{grid-template-columns:minmax(0,1fr) 44px!important}
  .tts-mode-active #messageInput{max-height:108px!important;font-size:15px!important}
}
@media(max-width:390px){
  body.plus-available .input-shell.has-text{grid-template-columns:34px minmax(0,1fr) 40px 40px!important}
  body:not(.plus-available):not(.tts-mode-active) .input-shell.has-text{grid-template-columns:minmax(0,1fr) 40px 40px!important}
  .tts-mode-active .input-shell,.tts-mode-active .input-shell.has-text{grid-template-columns:minmax(0,1fr) 40px!important}
}


/* --- v16 fixed composer columns / stop button / TTS placeholder polish --- */
.input-shell{
  align-items:center!important;
}
#sendBtn,
.mic-btn,
.plus-btn{
  flex:0 0 auto!important;
  align-self:center!important;
  transform:none!important;
}
#sendBtn:hover{transform:none!important}
#sendBtn.stop-mode{
  background:#ef4444!important;
  color:#fff!important;
  opacity:1!important;
  box-shadow:0 12px 28px rgba(239,68,68,.25)!important;
}
#sendBtn.stop-mode:hover{background:#dc2626!important;transform:none!important}

/* Normal sohbette yazı yazınca mikrofon gizlenir ama kolon yerinde kalır; gönder butonu kaymaz. */
body:not(.tts-mode-active) .input-shell.has-text .mic-btn,
body:not(.tts-mode-active) .mic-btn.hide-while-typing,
body:not(.tts-mode-active).ai-generating .mic-btn,
body:not(.tts-mode-active) .mic-btn.hide-during-generating{
  display:grid!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
body:not(.tts-mode-active):not(.plus-available) .input-shell,
body:not(.tts-mode-active):not(.plus-available) .input-shell.has-text,
body:not(.tts-mode-active):not(.plus-available).ai-generating .input-shell{
  grid-template-columns:minmax(0,1fr) 52px 52px!important;
}
body:not(.tts-mode-active).plus-available .input-shell,
body:not(.tts-mode-active).plus-available .input-shell.has-text,
body:not(.tts-mode-active).plus-available.ai-generating .input-shell{
  grid-template-columns:46px minmax(0,1fr) 52px 52px!important;
}

/* Metin seslendirme içinde + ve mikrofon hiç görünmez; gönder butonu sabit kalır. */
.tts-mode-active .plus-btn,
.tts-mode-active .mic-btn{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
.tts-mode-active .input-shell,
.tts-mode-active .input-shell.has-text,
body.tts-mode-active.ai-generating .input-shell{
  grid-template-columns:minmax(0,1fr) 52px!important;
  align-items:center!important;
}
.tts-mode-active #messageInput::placeholder{content:"Seslendirilecek metni yazın.";color:#6b7280!important}
#messageInput{
  min-width:0!important;
  box-sizing:border-box!important;
  display:block!important;
  line-height:20px!important;
  padding-top:12px!important;
  padding-bottom:12px!important;
  margin:0!important;
}

@media(max-width:900px){
  body:not(.tts-mode-active):not(.plus-available) .input-shell,
  body:not(.tts-mode-active):not(.plus-available) .input-shell.has-text,
  body:not(.tts-mode-active):not(.plus-available).ai-generating .input-shell{
    grid-template-columns:minmax(0,1fr) 44px 44px!important;
  }
  body:not(.tts-mode-active).plus-available .input-shell,
  body:not(.tts-mode-active).plus-available .input-shell.has-text,
  body:not(.tts-mode-active).plus-available.ai-generating .input-shell{
    grid-template-columns:38px minmax(0,1fr) 44px 44px!important;
  }
  .tts-mode-active .input-shell,
  .tts-mode-active .input-shell.has-text,
  body.tts-mode-active.ai-generating .input-shell{
    grid-template-columns:minmax(0,1fr) 44px!important;
  }
  #messageInput{
    height:44px!important;
    min-height:44px!important;
    max-height:88px!important;
    line-height:20px!important;
    padding:12px 6px!important;
    white-space:normal!important;
    overflow-y:auto!important;
  }
  #sendBtn,.mic-btn{width:44px!important;height:44px!important;border-radius:15px!important}
}
@media(max-width:390px){
  body:not(.tts-mode-active):not(.plus-available) .input-shell,
  body:not(.tts-mode-active):not(.plus-available) .input-shell.has-text,
  body:not(.tts-mode-active):not(.plus-available).ai-generating .input-shell{
    grid-template-columns:minmax(0,1fr) 40px 40px!important;
  }
  body:not(.tts-mode-active).plus-available .input-shell,
  body:not(.tts-mode-active).plus-available .input-shell.has-text,
  body:not(.tts-mode-active).plus-available.ai-generating .input-shell{
    grid-template-columns:34px minmax(0,1fr) 40px 40px!important;
  }
  .tts-mode-active .input-shell,
  .tts-mode-active .input-shell.has-text,
  body.tts-mode-active.ai-generating .input-shell{
    grid-template-columns:minmax(0,1fr) 40px!important;
  }
  #sendBtn,.mic-btn{width:40px!important;height:40px!important;border-radius:14px!important}
  #messageInput{height:40px!important;min-height:40px!important;max-height:80px!important;padding:10px 5px!important}
}


/* --- v17 composer fixed-send / instant-plus-hide patch --- */
.input-shell{
  align-items:end!important;
}
#sendBtn,
.mic-btn,
.plus-btn{
  align-self:end!important;
  flex:0 0 auto!important;
  transform:none!important;
}
#sendBtn:hover,
.mic-btn:hover,
.plus-btn:hover{transform:none!important}
body:not(.plus-available) .plus-btn,
.input-shell.has-text .plus-btn,
body.ai-generating .plus-btn,
.tts-mode-active .plus-btn{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
body:not(.tts-mode-active).plus-available .input-shell.has-text,
body:not(.tts-mode-active):not(.plus-available) .input-shell.has-text,
body:not(.tts-mode-active).ai-generating .input-shell{
  grid-template-columns:minmax(0,1fr) 52px 52px!important;
}
#messageInput{
  vertical-align:top!important;
  overflow-y:auto!important;
  resize:none!important;
  padding-top:10px!important;
  padding-bottom:10px!important;
}
@media(max-width:900px){
  body:not(.tts-mode-active).plus-available .input-shell.has-text,
  body:not(.tts-mode-active):not(.plus-available) .input-shell.has-text,
  body:not(.tts-mode-active).ai-generating .input-shell{
    grid-template-columns:minmax(0,1fr) 44px 44px!important;
  }
  #messageInput{padding-top:10px!important;padding-bottom:10px!important}
}
@media(max-width:390px){
  body:not(.tts-mode-active).plus-available .input-shell.has-text,
  body:not(.tts-mode-active):not(.plus-available) .input-shell.has-text,
  body:not(.tts-mode-active).ai-generating .input-shell{
    grid-template-columns:minmax(0,1fr) 40px 40px!important;
  }
  #messageInput{padding-top:9px!important;padding-bottom:9px!important}
}

/* --- v18 stop-button fixed-right / desktop-mobile composer hard lock --- */
.composer .input-shell{
  display:grid!important;
  align-items:end!important;
  gap:8px!important;
}
.composer #messageInput{
  height:52px!important;
  min-height:52px!important;
  max-height:52px!important;
  line-height:20px!important;
  padding:16px 10px!important;
  overflow-y:auto!important;
  align-self:end!important;
  box-sizing:border-box!important;
}
.composer #sendBtn,
.composer .mic-btn,
.composer .plus-btn{
  width:52px!important;
  height:52px!important;
  min-width:52px!important;
  min-height:52px!important;
  align-self:end!important;
  justify-self:end!important;
  flex:0 0 auto!important;
  transform:none!important;
}
.composer #sendBtn.stop-mode{
  grid-column:auto!important;
  justify-self:end!important;
  margin-left:0!important;
  margin-right:0!important;
  position:relative!important;
  right:auto!important;
  left:auto!important;
  bottom:auto!important;
  background:#ef4444!important;
}
body.ai-generating .composer .plus-btn,
.composer .input-shell.has-text .plus-btn,
body:not(.plus-available) .composer .plus-btn{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
body:not(.tts-mode-active).ai-generating.plus-available .composer .input-shell,
body:not(.tts-mode-active).ai-generating:not(.plus-available) .composer .input-shell,
body:not(.tts-mode-active).plus-available .composer .input-shell.has-text,
body:not(.tts-mode-active):not(.plus-available) .composer .input-shell.has-text{
  grid-template-columns:minmax(0,1fr) 52px 52px!important;
}
body:not(.tts-mode-active).ai-generating .composer .mic-btn,
body:not(.tts-mode-active) .composer .input-shell.has-text .mic-btn{
  display:grid!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
body:not(.tts-mode-active).plus-available .composer .input-shell:not(.has-text):not(.voice-active){
  grid-template-columns:46px minmax(0,1fr) 52px 52px!important;
}
body:not(.tts-mode-active):not(.plus-available) .composer .input-shell:not(.has-text):not(.voice-active){
  grid-template-columns:minmax(0,1fr) 52px 52px!important;
}
/* Metin seslendirme sohbetinde seslendirme ikonu gönderin hemen solunda kalır. */
body.tts-mode-active .composer .plus-btn,
.tts-mode-active .composer .plus-btn{
  display:none!important;
}
body.tts-mode-active .composer .mic-btn,
.tts-mode-active .composer .mic-btn{
  display:grid!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}
body.tts-mode-active .composer .input-shell,
body.tts-mode-active .composer .input-shell.has-text,
.tts-mode-active .composer .input-shell,
.tts-mode-active .composer .input-shell.has-text{
  grid-template-columns:minmax(0,1fr) 52px 52px!important;
}
body.tts-mode-active .composer #messageInput,
.tts-mode-active .composer #messageInput{
  height:52px!important;
  min-height:52px!important;
  max-height:52px!important;
}
@media(max-width:900px){
  .composer #messageInput{
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    padding:12px 7px!important;
  }
  .composer #sendBtn,
  .composer .mic-btn,
  .composer .plus-btn{
    width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
  }
  body:not(.tts-mode-active).ai-generating.plus-available .composer .input-shell,
  body:not(.tts-mode-active).ai-generating:not(.plus-available) .composer .input-shell,
  body:not(.tts-mode-active).plus-available .composer .input-shell.has-text,
  body:not(.tts-mode-active):not(.plus-available) .composer .input-shell.has-text{
    grid-template-columns:minmax(0,1fr) 44px 44px!important;
  }
  body:not(.tts-mode-active).plus-available .composer .input-shell:not(.has-text):not(.voice-active){
    grid-template-columns:38px minmax(0,1fr) 44px 44px!important;
  }
  body:not(.tts-mode-active):not(.plus-available) .composer .input-shell:not(.has-text):not(.voice-active){
    grid-template-columns:minmax(0,1fr) 44px 44px!important;
  }
  body.tts-mode-active .composer .input-shell,
  body.tts-mode-active .composer .input-shell.has-text,
  .tts-mode-active .composer .input-shell,
  .tts-mode-active .composer .input-shell.has-text{
    grid-template-columns:minmax(0,1fr) 44px 44px!important;
  }
}
@media(max-width:390px){
  .composer #messageInput{
    height:40px!important;
    min-height:40px!important;
    max-height:40px!important;
    padding:10px 6px!important;
  }
  .composer #sendBtn,
  .composer .mic-btn,
  .composer .plus-btn{
    width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;
  }
  body:not(.tts-mode-active).ai-generating.plus-available .composer .input-shell,
  body:not(.tts-mode-active).ai-generating:not(.plus-available) .composer .input-shell,
  body:not(.tts-mode-active).plus-available .composer .input-shell.has-text,
  body:not(.tts-mode-active):not(.plus-available) .composer .input-shell.has-text{
    grid-template-columns:minmax(0,1fr) 40px 40px!important;
  }
  body:not(.tts-mode-active).plus-available .composer .input-shell:not(.has-text):not(.voice-active){
    grid-template-columns:34px minmax(0,1fr) 40px 40px!important;
  }
  body:not(.tts-mode-active):not(.plus-available) .composer .input-shell:not(.has-text):not(.voice-active){
    grid-template-columns:minmax(0,1fr) 40px 40px!important;
  }
  body.tts-mode-active .composer .input-shell,
  body.tts-mode-active .composer .input-shell.has-text,
  .tts-mode-active .composer .input-shell,
  .tts-mode-active .composer .input-shell.has-text{
    grid-template-columns:minmax(0,1fr) 40px 40px!important;
  }
}

/* --- v19 unified chat + TTS, no plus button/history --- */
.plus-btn,
.tool-popover,
.tts-history-block{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
.composer .input-shell{
  grid-template-columns:minmax(0,1fr) 44px 44px!important;
}
body.tts-mode-active .composer .input-shell,
body.tts-mode-active .composer .input-shell.has-text{
  grid-template-columns:minmax(0,1fr) 44px 44px!important;
}
@media (max-width:640px){
  .composer .input-shell,
  body.tts-mode-active .composer .input-shell,
  body.tts-mode-active .composer .input-shell.has-text{
    grid-template-columns:minmax(0,1fr) 40px 40px!important;
  }
}
.tts-result-card.embedded{margin-top:10px}

/* --- v20 final composer alignment / unified TTS flow --- */
.composer .input-shell{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 52px 52px!important;
  align-items:end!important;
  gap:8px!important;
}
.composer #messageInput{
  height:52px!important;
  min-height:52px!important;
  max-height:52px!important;
  line-height:20px!important;
  padding:16px 12px!important;
  resize:none!important;
  overflow-y:auto!important;
  align-self:end!important;
  box-sizing:border-box!important;
}
.composer #sendBtn,
.composer #sendBtn.stop-mode,
.composer .mic-btn{
  width:52px!important;
  height:52px!important;
  min-width:52px!important;
  min-height:52px!important;
  align-self:end!important;
  justify-self:end!important;
  grid-column:auto!important;
  position:relative!important;
  inset:auto!important;
  margin:0!important;
  transform:none!important;
  flex:0 0 auto!important;
}
.composer #sendBtn{grid-column:3!important;}
.composer .mic-btn{grid-column:2!important;}
.composer #sendBtn.stop-mode{grid-column:3!important;background:#ef4444!important;color:#fff!important;}
.plus-btn,.tool-popover,.tts-history-block{display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;}
body:not(.tts-mode-active) .composer .input-shell.has-text .mic-btn,
body:not(.tts-mode-active).ai-generating .composer .mic-btn{
  display:grid!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
body.tts-mode-active .composer .mic-btn,
.tts-mode-active .composer .mic-btn{
  display:grid!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}
.tts-flow-message .bubble:empty{display:none!important;}
@media(max-width:900px){
  .composer .input-shell{grid-template-columns:minmax(0,1fr) 44px 44px!important;gap:7px!important;}
  .composer #messageInput{height:44px!important;min-height:44px!important;max-height:44px!important;padding:12px 9px!important;line-height:20px!important;}
  .composer #sendBtn,.composer #sendBtn.stop-mode,.composer .mic-btn{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;}
}
@media(max-width:390px){
  .composer .input-shell{grid-template-columns:minmax(0,1fr) 40px 40px!important;gap:6px!important;}
  .composer #messageInput{height:40px!important;min-height:40px!important;max-height:40px!important;padding:10px 8px!important;line-height:20px!important;}
  .composer #sendBtn,.composer #sendBtn.stop-mode,.composer .mic-btn{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;}
}

/* --- v21 final TTS intent + composer hard alignment --- */
.composer .input-shell{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 52px 52px!important;
  align-items:center!important;
  justify-items:stretch!important;
}
.composer #messageInput{
  grid-column:1!important;
  align-self:center!important;
  height:52px!important;
  min-height:52px!important;
  max-height:52px!important;
  line-height:20px!important;
  padding:16px 12px!important;
  margin:0!important;
  resize:none!important;
  overflow-y:auto!important;
}
.composer .mic-btn{
  grid-column:2!important;
}
.composer #sendBtn,
.composer #sendBtn.stop-mode{
  grid-column:3!important;
}
.composer #sendBtn,
.composer #sendBtn.stop-mode,
.composer .mic-btn{
  display:grid!important;
  place-items:center!important;
  align-self:center!important;
  justify-self:end!important;
  width:52px!important;
  height:52px!important;
  min-width:52px!important;
  min-height:52px!important;
  padding:0!important;
  margin:0!important;
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  line-height:1!important;
}
.composer #sendBtn i,
.composer .mic-btn i{
  display:block!important;
  width:1em!important;
  height:1em!important;
  line-height:1!important;
  margin:0!important;
  text-align:center!important;
}
body:not(.tts-mode-active) .composer .input-shell.has-text .mic-btn,
body:not(.tts-mode-active).ai-generating .composer .mic-btn{
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
body.tts-mode-active .composer .mic-btn{
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}
body.tts-mode-active #messageInput::placeholder{
  color:#6b7280!important;
}
@media(max-width:900px){
  .composer .input-shell{grid-template-columns:minmax(0,1fr) 44px 44px!important;gap:7px!important;}
  .composer #messageInput{height:44px!important;min-height:44px!important;max-height:44px!important;padding:12px 9px!important;}
  .composer #sendBtn,.composer #sendBtn.stop-mode,.composer .mic-btn{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;}
}
@media(max-width:390px){
  .composer .input-shell{grid-template-columns:minmax(0,1fr) 40px 40px!important;gap:6px!important;}
  .composer #messageInput{height:40px!important;min-height:40px!important;max-height:40px!important;padding:10px 8px!important;}
  .composer #sendBtn,.composer #sendBtn.stop-mode,.composer .mic-btn{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;}
}
