/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
  --bg:       #0c0d12;
  --surface:  #13151f;
  --surface2: #1a1d2a;
  --border:   #252836;
  --accent:   #e84393;
  --accent2:  #ffd166;
  --green:    #06d6a0;
  --text:     #e8eaf2;
  --muted:    #5c6080;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%; width: 100%;
  font-family: 'Nunito', sans-serif;
  background: var(--bg); color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== SETUP ===== */
#setup {
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 24px 16px;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, #2a1040 0%, transparent 70%);
}

.logo {
  font-family: 'Unbounded', sans-serif; font-size: 1.7rem; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -1px;
  text-align: center;
}
.tagline { color: var(--muted); font-size: .82rem; text-align: center; max-width: 320px; line-height: 1.6; }

/* ───── Табы ───── */
.setup-tabs {
  display: flex; gap: 4px; width: 100%; max-width: 500px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 4px;
}
.stab {
  flex: 1; padding: 8px 6px; border-radius: 10px; border: none;
  background: transparent; color: var(--muted);
  font-family: 'Nunito', sans-serif; font-size: .75rem; font-weight: 700;
  cursor: pointer; transition: all .2s; white-space: nowrap; text-align: center;
}
.stab.active { background: var(--surface2); color: var(--text); }

.tab-panel { display: none; width: 100%; max-width: 500px; }
.tab-panel.active { display: flex; flex-direction: column; }

/* ───── Карточка ───── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 20px; width: 100%;
  display: flex; flex-direction: column; gap: 14px;
}

/* ───── Инпуты ───── */
.inp-group { display: flex; flex-direction: column; gap: 5px; }
.inp-group label { font-size: .68rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }

input[type=text] {
  background: var(--bg); border: 1.5px solid var(--border); border-radius: 10px;
  padding: 12px 14px; color: var(--text);
  font-family: 'Nunito', sans-serif; font-size: 1rem;
  outline: none; transition: border-color .2s; width: 100%;
  -webkit-appearance: none; appearance: none;
}
input[type=text]:focus { border-color: var(--accent); }
input::placeholder { color: var(--muted); }

.invite-wrap { position: relative; }
.invite-wrap input {
  font-family: 'Unbounded', sans-serif; font-size: 1.1rem;
  letter-spacing: 4px; padding: 13px 44px 13px 14px; text-transform: uppercase;
}
.invite-paste-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--muted);
}
.invite-hint   { font-size: .7rem; color: var(--muted); }
.invite-hint b { color: var(--accent2); }

/* ───── Платформы ───── */
.platform-grid { display: flex; gap: 8px; }
.platform-opt {
  flex: 1; padding: 12px 6px; border: 1.5px solid var(--border); border-radius: 12px;
  cursor: pointer; transition: all .2s;
  display: flex; align-items: center; justify-content: center;
}
.platform-opt:active { transform: scale(.97); }
.platform-opt.active { border-color: var(--accent); background: rgba(232,67,147,.06); }
.platform-logo { font-size: .75rem; font-weight: 800; letter-spacing: .5px; text-align: center; }
.rutube-logo  { color: #ff4040; }
.youtube-logo { color: #ff0000; }
.vk-logo      { color: #4c75a3; }
.platform-hint { font-size: .68rem; color: var(--muted); margin-top: 2px; }

/* ───── Тип комнаты ───── */
.room-type-row { display: flex; gap: 10px; }
.room-type-opt {
  flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px;
  border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer;
  transition: all .2s; position: relative;
}
.room-type-opt.active { border-color: var(--accent); background: rgba(232,67,147,.06); }
.rtype-icon { font-size: 1.3rem; line-height: 1; flex-shrink: 0; }
.rtype-name { font-size: .82rem; font-weight: 700; }
.rtype-desc { font-size: .68rem; color: var(--muted); margin-top: 2px; }
.rtype-check { position: absolute; top: 8px; right: 8px; font-size: .7rem; color: var(--accent); opacity: 0; }
.room-type-opt.active .rtype-check { opacity: 1; }

/* ───── Список комнат ───── */
.rooms-list-wrap { display: flex; flex-direction: column; gap: 8px; }
.rooms-list-hdr { display: flex; justify-content: space-between; align-items: center; font-size: .75rem; color: var(--muted); font-weight: 700; }
.refresh-btn { background: none; border: none; cursor: pointer; font-size: 1.1rem; color: var(--muted); padding: 4px; }
.rooms-list { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; }
.rooms-empty { text-align: center; color: var(--muted); font-size: .82rem; padding: 24px; }
.room-item {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
}
.room-item-icon  { font-size: 1.4rem; flex-shrink: 0; }
.room-item-info  { flex: 1; min-width: 0; }
.room-item-title { font-size: .85rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-item-meta  { font-size: .7rem; color: var(--muted); margin-top: 2px; }
.room-item-join  { padding: 8px 14px; border-radius: 8px; border: none; background: var(--green); color: #0c0d12; font-family: 'Nunito', sans-serif; font-size: .8rem; font-weight: 700; cursor: pointer; flex-shrink: 0; }

/* ───── Кнопки ───── */
.btn {
  padding: 14px 18px; border-radius: 12px; border: none;
  font-family: 'Nunito', sans-serif; font-size: .95rem; font-weight: 700;
  cursor: pointer; transition: all .18s; text-align: center;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), #c0306d); color: #fff; }
.btn-primary:active { transform: scale(.98); }
.btn-yellow  { background: linear-gradient(135deg, #ffd166, #f4a500); color: #0c0d12; }
.btn-yellow:active { transform: scale(.98); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn-copy  { background: var(--surface2); color: var(--text); border: 1.5px solid var(--border); }
.btn-watch { background: linear-gradient(135deg, var(--green), #04b384); color: #0c0d12; }

.spinner {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: spin .7s linear infinite; vertical-align: middle; margin-right: 5px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== ПОПАПЫ — снизу (мобильный стиль) ===== */
#codePopup, #invitePopup {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(12,13,18,.9); backdrop-filter: blur(8px);
  align-items: flex-end; justify-content: center;
}
#codePopup.show, #invitePopup.show { display: flex; }

.popup-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  padding: 28px 20px; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0));
  width: 100%; max-width: 500px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  animation: slideUp .3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }

.popup-title { font-family: 'Unbounded', sans-serif; font-size: .75rem; color: var(--muted); letter-spacing: 1px; }
.big-code {
  font-family: 'Unbounded', sans-serif; font-size: 2.2rem; font-weight: 600;
  letter-spacing: 8px; text-align: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; padding: 8px 0;
}
.popup-type-badge {
  font-size: .78rem; font-weight: 700; padding: 4px 14px; border-radius: 99px;
  background: var(--surface2); border: 1px solid var(--border); color: var(--muted);
}
.popup-type-badge.open   { border-color: var(--green);   color: var(--green);   }
.popup-type-badge.closed { border-color: var(--accent2); color: var(--accent2); }
.popup-hint { font-size: .82rem; color: var(--muted); text-align: center; line-height: 1.5; }
.popup-btns { display: flex; gap: 8px; width: 100%; }
.popup-btns .btn { flex: 1; font-size: .85rem; padding: 12px 8px; }

.invite-popup-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  padding: 24px 20px; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
  width: 100%; max-width: 500px;
  display: flex; flex-direction: column; gap: 16px;
  animation: slideUp .3s ease;
}
.invite-popup-title { font-family: 'Unbounded', sans-serif; font-size: .72rem; color: var(--muted); letter-spacing: 1px; text-align: center; }
.invite-type-row { display: flex; gap: 10px; }
.invite-type-opt {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 10px; border: 1.5px solid var(--border); border-radius: 14px; cursor: pointer;
}
.invite-type-opt.active  { border-color: var(--accent); background: rgba(232,67,147,.06); }
.invite-type-icon { font-size: 1.6rem; }
.invite-type-name { font-size: .78rem; font-weight: 700; }
.invite-host-only { text-align: center; font-size: .75rem; color: var(--muted); background: var(--surface2); border-radius: 10px; padding: 8px; }
.invite-link-box { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.invite-link-label { font-size: .62rem; color: var(--muted); font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.invite-link-row   { display: flex; align-items: center; gap: 8px; }
.invite-link-text  { flex: 1; font-size: .76rem; color: var(--accent2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invite-link-copy  { background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--muted); flex-shrink: 0; padding: 4px; }
.invite-btns { display: flex; gap: 8px; }
.invite-btns .btn { flex: 1; font-size: .82rem; padding: 12px; }

/* ===== APP ===== */
#app {
  display: none; height: 100dvh; flex-direction: column; overflow: hidden;
  padding-top: env(safe-area-inset-top, 0);
}

/* ───── Топбар ───── */
.topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--surface);
  border-bottom: 1px solid var(--border); flex-shrink: 0;
  overflow-x: auto; scrollbar-width: none;
}
.topbar::-webkit-scrollbar { display: none; }
.logo-sm {
  font-family: 'Unbounded', sans-serif; font-size: .7rem; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; flex-shrink: 0;
}
.room-code-badge {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 4px 10px; font-size: .72rem; font-weight: 700;
  font-family: 'Unbounded', sans-serif; color: var(--accent2);
  letter-spacing: 2px; cursor: pointer; flex-shrink: 0;
}
.room-type-pill {
  font-size: .68rem; padding: 3px 8px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface2); color: var(--muted);
  cursor: pointer; flex-shrink: 0; white-space: nowrap;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.dot.on { background: var(--green); box-shadow: 0 0 6px rgba(6,214,160,.5); }
.status-txt    { font-size: .7rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.members-count { font-size: .65rem; color: var(--muted); background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 3px 7px; flex-shrink: 0; }
.host-badge    { font-size: .62rem; color: var(--accent2); background: var(--surface2); border: 1px solid #ffd16640; border-radius: 6px; padding: 3px 7px; display: none; flex-shrink: 0; }
.host-badge.show { display: inline; }
.spacer { flex: 1; min-width: 4px; }
.share-btn { padding: 5px 9px; border: 1px solid var(--green); border-radius: 8px; background: transparent; color: var(--green); font-family: 'Nunito', sans-serif; font-size: .7rem; cursor: pointer; flex-shrink: 0; }
.exit-btn  { padding: 5px 9px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--muted); font-family: 'Nunito', sans-serif; font-size: .7rem; cursor: pointer; flex-shrink: 0; }

/* ===== КОНТЕНТ ===== */
.content { display: flex; flex: 1; overflow: hidden; flex-direction: column; }

@media (min-width: 768px) {
  .content { flex-direction: row; }
}

/* ───── Видео (мобильный) ───── */
.video-side { display: flex; flex-direction: column; flex: none; height: 36vh; }

@media (min-width: 768px) {
  .video-side { flex: 1; height: auto; min-width: 0; }
}

.video-wrap {
  flex: 1; background: #000; overflow: hidden;
  position: relative; display: flex; align-items: center; justify-content: center;
}
#videoEl { width: 100%; height: 100%; object-fit: contain; display: block; }

.vid-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 40%, transparent 60%, rgba(0,0,0,.3) 100%);
  opacity: 0; transition: opacity .25s; cursor: pointer;
}
.video-wrap:hover .vid-overlay { opacity: 1; }
.vid-overlay.force-show { opacity: 1 !important; }

.big-play {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.15); backdrop-filter: blur(6px);
  border: 2px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}

.vid-progress-wrap {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 0 10px 8px; display: flex; flex-direction: column; gap: 5px;
}
.vid-progress {
  width: 100%; height: 5px; background: rgba(255,255,255,.2); border-radius: 3px;
  cursor: pointer; appearance: none; -webkit-appearance: none; accent-color: var(--accent);
}
.vid-progress.guest-mode { pointer-events: none; opacity: .5; }
.vid-progress::-webkit-slider-thumb { width: 18px; height: 18px; border-radius: 50%; }
.vid-bottom-row { display: flex; align-items: center; gap: 6px; }
.vid-time  { font-size: .65rem; color: rgba(255,255,255,.7); white-space: nowrap; }
.vid-spacer { flex: 1; }
.vol-wrap { display: flex; align-items: center; gap: 4px; }
.vol-btn  { background: none; border: none; cursor: pointer; font-size: .9rem; padding: 4px; opacity: .85; }
.vol-slider { width: 50px; height: 4px; background: rgba(255,255,255,.2); border-radius: 2px; cursor: pointer; appearance: none; -webkit-appearance: none; accent-color: var(--green); }
.fs-btn { background: none; border: none; cursor: pointer; font-size: .9rem; padding: 4px; opacity: .85; }

.vid-loading {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.6); flex-direction: column; gap: 10px;
}
.vid-loading.show { display: flex; }
.vid-loading p { font-size: .8rem; color: var(--muted); }
.big-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }

.vid-error { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 10px; padding: 20px; text-align: center; }
.vid-error.show { display: flex; }
.vid-error .icon { font-size: 2rem; }
.vid-error p { font-size: .8rem; color: var(--muted); line-height: 1.5; max-width: 260px; }

.bottom-bar { display: flex; align-items: center; gap: 8px; padding: 5px 12px; background: var(--surface); border-top: 1px solid var(--border); flex-shrink: 0; }
.ctrl-url { flex: 1; font-size: .62rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logs-toggle-btn { padding: 3px 9px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface2); color: var(--muted); font-family: 'Nunito', sans-serif; font-size: .72rem; cursor: pointer; letter-spacing: 2px; flex-shrink: 0; }
.logs-toggle-btn.active { border-color: var(--accent); color: var(--accent); }

.logs-panel { display: none; flex-direction: column; max-height: 90px; background: var(--bg); border-top: 1px solid var(--border); flex-shrink: 0; }
.logs-panel.show { display: flex; }
.logs-hdr { display: flex; justify-content: space-between; align-items: center; padding: 4px 12px; border-bottom: 1px solid var(--border); font-size: .62rem; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.logs-hdr button { background: none; border: none; cursor: pointer; font-size: .62rem; color: var(--muted); }
.logs-body { flex: 1; overflow-y: auto; padding: 4px 12px; display: flex; flex-direction: column; gap: 2px; }
.logs-body::-webkit-scrollbar { width: 2px; }
.logs-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.log-entry { font-size: .65rem; color: var(--muted); line-height: 1.4; }
.log-entry .log-time { color: var(--border); margin-right: 4px; }
.log-entry.log-play  { color: var(--green);   }
.log-entry.log-pause { color: var(--accent2); }
.log-entry.log-seek  { color: #8b5cf6; }

/* ===== SIDEBAR / ЧАТ ===== */
.sidebar { flex: 1; display: flex; flex-direction: column; border-top: 1px solid var(--border); background: var(--surface); overflow: hidden; min-height: 0; }

@media (min-width: 768px) {
  .sidebar { width: 300px; flex: none; border-top: none; border-left: 1px solid var(--border); }
}

.sidebar-hdr { padding: 8px 14px; border-bottom: 1px solid var(--border); font-family: 'Unbounded', sans-serif; font-size: .6rem; font-weight: 400; color: var(--muted); letter-spacing: 1.5px; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.msg-count { background: var(--accent); color: #fff; border-radius: 99px; padding: 1px 7px; font-size: .58rem; font-family: 'Nunito', sans-serif; font-weight: 700; }

.msgs { flex: 1; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; scroll-behavior: smooth; min-height: 0; -webkit-overflow-scrolling: touch; }
.msgs::-webkit-scrollbar { width: 2px; }
.msgs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.msg { display: flex; flex-direction: column; gap: 2px; animation: msgIn .2s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.msg.me  { align-items: flex-end; }
.msg.sys { align-items: center; }

.bubble { padding: 7px 11px; border-radius: 13px; font-size: .88rem; max-width: 85%; line-height: 1.45; word-break: break-word; }
.msg.me    .bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 3px; }
.msg.other .bubble { background: var(--surface2); border-bottom-left-radius: 3px; }
.msg.sys   .bubble { background: transparent; color: var(--muted); font-size: .7rem; font-style: italic; padding: 2px 6px; }
.msg-meta { font-size: .6rem; color: var(--muted); padding: 0 4px; }

.mention    { background: rgba(232,67,147,.18); color: var(--accent); border-radius: 4px; padding: 1px 4px; font-weight: 700; }
.mention-me { background: rgba(255,209,102,.2); color: var(--accent2); }

/* ===== CHAT INPUT ===== */
.chat-inp-area {
  padding: 8px 10px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
  position: relative; flex-shrink: 0;
  background: var(--surface);
}

.mention-dropdown {
  display: none; position: absolute;
  bottom: calc(100% + 2px); left: 10px; right: 10px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; max-height: 160px; overflow-y: auto;
  box-shadow: 0 -8px 24px rgba(0,0,0,.5); z-index: 50;
}
.mention-dropdown.show { display: block; }
.mention-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; font-size: .88rem; }
.mention-item:active { background: var(--border); }
.mention-avatar { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, var(--accent), #8b5cf6); display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; color: #fff; }

.emoji-picker {
  display: none; position: absolute;
  bottom: calc(100% + 4px); right: 10px;
  width: min(260px, calc(100vw - 20px));
  background: var(--surface2); border: 1px solid var(--border); border-radius: 14px;
  padding: 8px; max-height: 160px; overflow-y: auto;
  box-shadow: 0 -8px 24px rgba(0,0,0,.5); z-index: 100;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.emoji-picker::-webkit-scrollbar { width: 3px; }
.emoji-picker::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.emoji-picker.show { display: block; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-btn { background: none; border: none; cursor: pointer; font-size: 1.3rem; padding: 5px 2px; border-radius: 6px; line-height: 1; text-align: center; }
.emoji-btn:active { background: var(--border); }

.chat-inp-wrap { display: flex; align-items: flex-end; gap: 6px; position: relative; }
.chat-inp-wrap textarea { flex: 1; padding-right: 64px; }

.chat-inp-actions { position: absolute; right: 44px; bottom: 8px; display: flex; gap: 2px; z-index: 1; }
.chat-act-btn { background: none; border: none; cursor: pointer; font-size: .95rem; color: var(--muted); padding: 4px 5px; border-radius: 6px; line-height: 1; }
.chat-act-btn:active { color: var(--accent); }

textarea.chat-inp {
  width: 100%; background: var(--bg); border: 1.5px solid var(--border); border-radius: 12px;
  padding: 10px 12px; color: var(--text); font-family: 'Nunito', sans-serif;
  font-size: .9rem; outline: none; resize: none; max-height: 90px;
  line-height: 1.4; transition: border-color .2s;
  -webkit-appearance: none; overflow-y: auto; scrollbar-width: none;
}
textarea.chat-inp::-webkit-scrollbar { display: none; }
textarea.chat-inp:focus { border-color: var(--accent); }

.send-btn { padding: 10px 12px; background: var(--accent); border: none; border-radius: 12px; color: #fff; cursor: pointer; font-size: .9rem; flex-shrink: 0; align-self: flex-end; }
.send-btn:active { transform: scale(.95); }

.mic-inline-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--surface2); color: var(--muted);
  font-size: 1rem; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  user-select: none; -webkit-user-select: none; align-self: flex-end;
}
.mic-inline-btn.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
  box-shadow: 0 0 14px rgba(232,67,147,.6);
  animation: pulse-mic .8s ease infinite;
}
@keyframes pulse-mic {
  0%, 100% { box-shadow: 0 0 10px rgba(232,67,147,.5); }
  50%       { box-shadow: 0 0 22px rgba(232,67,147,.9); }
}

/* ===== TOAST ===== */
#toast {
  position: fixed; top: 60px; left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 9px 18px; border-radius: 20px;
  font-size: .85rem; font-weight: 700; z-index: 999;
  opacity: 0; transition: all .3s; pointer-events: none;
  white-space: nowrap; max-width: calc(100vw - 32px);
  text-overflow: ellipsis; overflow: hidden;
}
#toast.show  { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.pause { background: var(--accent2); color: #0c0d12; }
#toast.play  { background: var(--green);   color: #0c0d12; }
#toast.info  { background: #8b5cf6; color: #fff; }
#toast.copy  { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
#toast.err   { background: #e24b4a; color: #fff; }