/* Исчезающие сообщения и дуэли клипов. */
.ghost-mode-btn {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--panel-2);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}
.ghost-mode-btn .ui-icon { width: 18px; height: 18px; }
.ghost-mode-btn:hover { color: var(--text); background: var(--panel-2); transform: translateY(-1px); }
.ghost-mode-btn:focus-visible { color: var(--text); outline: 2px solid var(--purple); outline-offset: 2px; }
.ghost-mode-btn.is-active { border-color: var(--purple); color: var(--text); background: var(--purple); box-shadow: 0 0 0 3px rgba(139,92,246,.16); }
.ghost-mode-icon { display: inline-flex; align-items: center; }
.ghost-mode-note {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: -2px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--panel-2);
  font-size: 11px;
  line-height: 1.35;
}
.ghost-mode-note-icon { display: inline-flex; color: var(--purple); }
.ghost-mode-note-icon .ui-icon { width: 15px; height: 15px; }
body.skin-sunshine .ghost-mode-btn.is-active { border-color: #ef721e; background: #ef721e; color: #fff; }
body.skin-sunshine .ghost-mode-note-icon { color: #d95412; }

@media (max-width: 760px) {
  .messages-layout .chat-form {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 9px;
  }
  .messages-layout .chat-input { grid-column: 1; min-height: 42px; }
  .messages-layout .chat-form-actions {
    grid-column: 1;
    width: 100%;
    gap: 6px;
  }
  .messages-layout .chat-form-actions > button,
  .messages-layout .chat-form-actions > .chat-attach { flex: 0 0 44px; }
  .messages-layout .chat-form-actions .ghost-mode-btn { flex: 1 1 auto; min-width: 0; padding-inline: 10px; }
  .messages-layout .chat-send-btn { min-width: 44px; padding-inline: 0; }
  .messages-layout .chat-send-btn span { display: none; }
  .messages-layout .chat-messages { gap: 10px; scroll-behavior: smooth; }
}

@media (max-width: 380px) {
  .messages-layout .chat-form-actions .ghost-mode-btn { padding-inline: 7px; font-size: 10px; }
  .messages-layout .chat-form-actions { gap: 5px; }
}
.short-duel-sheet {
  position: fixed;
  z-index: 70;
  right: 12px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  left: 12px;
  width: min(520px, calc(100% - 24px));
  max-height: min(74dvh, 560px);
  margin: 0 auto;
  padding: 16px;
  overflow: auto;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 22px;
  color: #fff;
  background: rgba(17,13,27,.98);
  box-shadow: 0 20px 70px rgba(0,0,0,.58);
  backdrop-filter: blur(18px);
}
.short-duel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding-bottom:12px; border-bottom:1px solid rgba(255,255,255,.12); }
.short-duel-head strong, .short-duel-head small { display:block; }
.short-duel-head small { margin-top:4px; color:rgba(255,255,255,.62); font-size:12px; }
.short-duel-stage { display:grid; grid-template-columns:1fr auto 1fr; gap:9px; align-items:stretch; padding:18px 0 10px; }
.short-duel-stage > div { display:grid; min-width:0; gap:5px; padding:12px; border:1px solid rgba(189,162,255,.3); border-radius:14px; background:rgba(255,255,255,.06); }
.short-duel-stage span, .short-duel-stage small { color:rgba(255,255,255,.62); font-size:11px; }
.short-duel-stage strong { overflow:hidden; text-overflow:ellipsis; }
.short-duel-stage > b { align-self:center; color:#d5c3ff; font-size:12px; }
.short-duel-stage select { min-width:0; min-height:40px; padding:0 8px; border:1px solid rgba(255,255,255,.2); border-radius:10px; color:#fff; background:#2a213e; }
.short-duel-stake { margin:8px 0; color:#f4d78a; font-size:12px; font-weight:700; line-height:1.4; }
.short-duel-note { color:rgba(255,255,255,.68); font-size:13px; }
.short-duel-sheet .primary-btn { width:100%; min-height:46px; margin-top:8px; }
@media (max-width:520px) {
  .short-duel-sheet {
    right: 8px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 8px;
    width: calc(100% - 16px);
    max-height: calc(100dvh - max(20px, env(safe-area-inset-bottom) + 10px));
    padding: 14px;
    border-radius: 18px;
  }
  .short-duel-stage {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 6px;
    padding: 12px 0 8px;
  }
  .short-duel-stage > div { padding: 10px; }
  .short-duel-stage > b { justify-self: center; font-size: 10px; }
  .short-duel-stage select { max-width: 100%; font-size: 12px; }
  .short-duel-sheet .short-share-close { min-width: 42px; min-height: 42px; }
}
