/* Mobile conversation upgrade: compact video notes, airier chat surfaces, and a calm profile editor. */
.video-note-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid rgba(139,92,246,.35);
  border-radius: 50%;
  color: #fff;
  background: #8b5cf6;
  cursor: pointer;
}
.video-note-btn:hover,
.video-note-btn:focus-visible { background: #a77bff; outline: 2px solid rgba(167,123,255,.4); outline-offset: 2px; }
.video-note-btn .ui-icon { width: 20px; height: 20px; }
.messages-layout .video-note-btn { border-color: var(--purple); color: #fff; background: var(--purple); box-shadow: none; }
.messages-layout .video-note-btn:hover,
.messages-layout .video-note-btn:focus-visible { color: #fff; background: var(--purple); }
.messages-layout .video-note-btn.is-holding {
  transform: scale(.93);
  background: #df496e;
  box-shadow: 0 0 0 5px rgba(223,73,110,.18);
}
.story-video-mark { width: 23px; height: 23px; padding: 0; background: var(--purple); }
.story-video-mark .ui-icon { width: 12px; height: 12px; }
.video-note-stop {
  position: fixed;
  z-index: 61;
  right: 18px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  width: 62px;
  height: 62px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #df496e;
  box-shadow: 0 10px 30px rgba(0,0,0,.38);
  font-weight: 800;
}
.video-note-live-panel {
  position: fixed;
  z-index: 60;
  right: 22px;
  bottom: calc(164px + env(safe-area-inset-bottom));
  width: min(210px, 48vw);
  aspect-ratio: 1;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #09070d;
  box-shadow: 0 16px 42px rgba(0,0,0,.48), 0 0 0 5px rgba(139,92,246,.28);
}
.video-note-live-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scaleX(-1);
}
.video-note-live-label {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(9,7,13,.62);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}
.story-camera-stage video { position: relative; z-index: 1; }
.story-record-canvas {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  pointer-events: none;
  object-fit: cover;
  transform-origin: center;
}
.story-mask-overlay { z-index: 3; opacity: 0; }
.story-camera-actions { z-index: 4; }
.chat-head-copy .is-typing { color: var(--purple, #8b5cf6); font-weight: 700; }
.message-bubble-wrap { max-width: min(78%, 520px); }
.messages-layout .chat-messages { gap: 16px; padding-inline: clamp(14px, 3vw, 30px); }
.messages-layout .bubble { line-height: 1.45; }
.profile-banner { position: relative; overflow: hidden; }
.profile-banner-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.profile-banner-copy { position: absolute; right: 18px; bottom: 16px; left: 18px; z-index: 1; color: #fff; font-size: clamp(16px, 3vw, 24px); font-weight: 800; text-shadow: 0 2px 14px rgba(0,0,0,.65); white-space: pre-wrap; }
.banner-canvas { width: 100%; height: 150px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(135deg,#24143e,#8b5cf6); touch-action: none; }
.profile-banner-tools { display: grid; gap: 8px; }
.shorts-create-drawer { margin: 6px 0 14px; }
.shorts-create-drawer > summary { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: var(--panel-2); font-weight: 800; cursor: pointer; list-style: none; }
.shorts-create-drawer > summary::-webkit-details-marker { display: none; }
.shorts-create-drawer[open] > summary { margin-bottom: 10px; color: var(--purple, #8b5cf6); }
@media (max-width: 760px) {
  .messages-layout { min-height: calc(100dvh - 132px); border-radius: 14px; }
  .messages-layout.has-active-chat .chat { min-height: calc(100dvh - 132px); }
  .messages-layout .chat-messages { min-height: 0; padding-top: 20px; padding-bottom: 20px; }
  .messages-layout .chat-form { grid-template-columns: minmax(0,1fr) auto; position: sticky; bottom: 0; padding: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .messages-layout .chat-form-actions { gap: 5px; }
  .messages-layout .media-quality-hint { display: none; }
  .messages-layout .chat-send-btn { min-width: 44px; padding-inline: 0; }
  .messages-layout .chat-input { min-height: 46px; border-radius: 16px; }
  .video-note-btn { width: 42px; min-height: 42px; }
  .message-bubble-wrap { max-width: 88%; }
}

@media (max-width: 760px) {
  .content .profile-card .profile-banner {
    min-height: clamp(158px, 42vw, 220px);
    margin: 0 -4px 12px;
    border-radius: 20px;
    background: var(--panel-2);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .24);
    isolation: isolate;
  }
  .content .profile-card .profile-banner::after {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, rgba(8, 7, 13, .02) 26%, rgba(8, 7, 13, .72) 100%);
    content: '';
    pointer-events: none;
  }
  .content .profile-card .profile-banner-image {
    z-index: 0;
    object-position: center 42%;
    transform: scale(1.015);
    filter: saturate(1.08) contrast(1.03);
  }
  .content .profile-card .profile-banner-copy {
    right: 16px;
    bottom: 14px;
    left: 16px;
    max-width: calc(100% - 32px);
    font-size: clamp(15px, 4vw, 21px);
    line-height: 1.16;
  }
  .content .profile-card .profile-banner-mark { z-index: 1; }
}
