    .roomline {
      display: flex;
      gap: 8px;
      align-items: center;
      margin-bottom: 12px;
    }
    .roomline code {
      overflow-wrap: anywhere;
      font-size: 12px;
      color: var(--muted);
      flex: 1;
    }
    .roomline button {
      width: auto;
      min-width: 96px;
    }
    .presencebar {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 12px;
      padding: 9px 10px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--bg);
    }
    .presence-count {
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
    }
    .presence-users {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      min-width: 0;
    }
    .presence-user {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 4px 8px;
      border: 1px solid var(--line);
      border-radius: 999px;
      font-size: 12px;
      background: var(--panel);
      max-width: 220px;
    }
    .presence-user-name {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .presence-dot {
      width: 7px;
      height: 7px;
      flex: 0 0 7px;
      border-radius: 50%;
      background: var(--ok);
    }
    #messages {
      height: min(55vh, 520px);
      overflow-y: auto;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 10px;
      background: var(--bg);
    }
    .msg {
      width: fit-content;
      max-width: min(76%, 640px);
      border-radius: 12px;
      padding: 8px 10px;
      margin: 7px 0;
      background: var(--other);
      overflow-wrap: anywhere;
    }
    .msg.mine {
      margin-left: auto;
      background: var(--mine);
    }
    .msg .meta {
      font-size: 11px;
      color: var(--muted);
      margin-bottom: 3px;
    }
    .msg .text {
      white-space: pre-wrap;
      line-height: 1.45;
    }
    .msg .text a {
      color: var(--accent);
      text-decoration: underline;
      overflow-wrap: anywhere;
    }
    .delivery {
      margin-top: 4px;
      font-size: 10px;
      color: var(--muted);
      text-align: right;
    }
    .typing-indicator {
      min-height: 22px;
      padding: 5px 3px 0;
      color: var(--muted);
      font-size: 12px;
      font-style: italic;
    }
    .msg .chat-image {
      display: block;
      max-width: min(100%, 560px);
      max-height: 520px;
      object-fit: contain;
      border-radius: 9px;
      margin-top: 7px;
      background: var(--panel);
      cursor: zoom-in;
    }
