.stream-message-panel {
    --stream-message-compose-height: calc(66px + env(safe-area-inset-bottom, 0px));
    position: fixed;
    top: auto;
    right: 0;
    bottom: calc(var(--stream-message-keyboard-offset, 0px) + var(--mobile-bottom-nav-height, 94px));
    left: 0;
    width: 100vw;
    height: min(58dvh, 560px);
    max-height: calc(100dvh - var(--mobile-app-header-height, 148px) - var(--mobile-bottom-nav-height, 94px));
    padding-bottom: var(--stream-message-compose-height);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    background: var(--surface-color, #fff);
    color: var(--text-primary);
    border: 1px solid color-mix(in srgb, var(--text-primary, #111) 10%, transparent);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 34px rgba(15, 23, 42, 0.12);
    transform: translateY(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.26s ease;
}

body.stream-messages-open .stream-message-panel {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.stream-message-panel-head {
    position: relative;
    padding: 18px 14px 10px;
    border-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stream-message-panel-head::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 50%;
    width: 34px;
    height: 4px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text-secondary) 28%, transparent);
    transform: translateX(-50%);
}

.stream-message-panel-kicker {
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.stream-message-panel-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 850;
    line-height: 1.18;
}

.stream-message-panel-close {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--text-primary) 12%, transparent);
    background: color-mix(in srgb, var(--surface-color, var(--background-color)) 72%, transparent);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.stream-message-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 12px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.stream-message-empty {
    margin: auto;
    max-width: 230px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}

.stream-message-empty i {
    display: block;
    margin-bottom: 12px;
    font-size: 28px;
}

.stream-message-bubble {
    max-width: 86%;
    align-self: flex-start;
    padding: 10px 11px;
    border-radius: 15px 15px 15px 5px;
    background: color-mix(in srgb, var(--surface-color, var(--background-color)) 68%, transparent);
    border: 1px solid color-mix(in srgb, var(--text-primary) 8%, transparent);
}

.stream-message-bubble.is-self {
    align-self: flex-end;
    border-radius: 15px 15px 5px 15px;
    background: color-mix(in srgb, var(--primary-color) 24%, var(--surface-color, var(--background-color)));
    border-color: color-mix(in srgb, var(--primary-color) 32%, transparent);
}

.stream-message-bubble.is-host {
    border-color: color-mix(in srgb, var(--primary-color) 42%, transparent);
}

.stream-message-meta {
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.stream-message-sender {
    color: var(--text-primary);
    font-size: 10px;
    letter-spacing: 0.03em;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stream-message-sender-ticker,
.stream-message-time {
    color: var(--text-secondary);
}

.stream-message-moderation {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stream-message-delete,
.stream-message-moderate {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text-primary) 8%, transparent);
    color: var(--text-secondary);
    -webkit-text-fill-color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
}

.stream-message-moderate {
    width: auto;
    min-width: 40px;
    padding: 0 8px;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stream-message-moderate.is-block {
    color: #ef4444;
    -webkit-text-fill-color: #ef4444;
}

.stream-message-delete:active,
.stream-message-moderate:active {
    transform: scale(0.96);
}

.stream-message-bubble:hover .stream-message-delete,
.stream-message-bubble:focus-within .stream-message-delete,
.stream-message-bubble:hover .stream-message-moderate,
.stream-message-bubble:focus-within .stream-message-moderate {
    color: #ef4444;
    -webkit-text-fill-color: #ef4444;
}

.mobile-stream-block-confirm {
    position: fixed;
    inset: 0;
    z-index: 2700;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 18px;
    background: rgba(0,0,0,0.38);
}

.mobile-stream-block-card {
    width: min(100%, 420px);
    border-radius: 22px;
    background: var(--background-color);
    color: var(--text-primary);
    border: 1px solid color-mix(in srgb, var(--text-primary) 10%, transparent);
    box-shadow: 0 24px 70px rgba(0,0,0,0.28);
    padding: 18px;
}

.mobile-stream-block-title {
    font-size: 18px;
    font-weight: 850;
    margin: 0 0 6px;
}

.mobile-stream-block-copy {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 16px;
}

.mobile-stream-block-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mobile-stream-block-actions button {
    min-height: 46px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 850;
}

.mobile-stream-block-cancel {
    border: 1px solid color-mix(in srgb, var(--text-primary) 14%, transparent);
    background: var(--surface-color, var(--background-color));
    color: var(--text-primary);
}

.mobile-stream-block-submit {
    border: 0;
    background: #ef4444;
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.stream-message-host-badge {
    border-radius: 999px;
    padding: 2px 6px;
    background: var(--primary-color);
    color: #fff;
    -webkit-text-fill-color: #fff;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.stream-message-text {
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
}

.stream-message-compose {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    min-height: var(--stream-message-compose-height);
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid color-mix(in srgb, var(--text-primary) 9%, transparent);
    display: flex !important;
    gap: 8px;
    align-items: flex-end;
    background: var(--surface-color, #fff);
    box-sizing: border-box;
    visibility: visible !important;
    opacity: 1 !important;
}

.stream-message-input {
    flex: 1;
    display: block !important;
    width: 100%;
    min-height: 40px;
    max-height: 110px;
    resize: none;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--text-primary) 12%, transparent);
    background: color-mix(in srgb, var(--surface-color, var(--background-color)) 70%, transparent);
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.35;
    outline: none;
    font-family: inherit;
    visibility: visible !important;
    opacity: 1 !important;
}

.stream-message-send {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--text-primary) 12%, transparent);
    background: var(--surface-color, #fff);
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px color-mix(in srgb, var(--text-primary) 10%, transparent);
}

.mobile-stream-chat-name-prompt {
    position: fixed;
    inset: 0;
    z-index: 2600;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 18px 18px max(18px, env(safe-area-inset-bottom));
    background: rgba(0,0,0,0.38);
}

.stream-join-photo { display: flex; align-items: center; gap: 12px; position: relative; min-height: 76px; margin: 18px 0; padding: 12px; border: 1px dashed #b8bec7; border-radius: 18px; cursor: pointer; }
.mobile-stream-chat-name-prompt, .mobile-stream-chat-name-prompt * { box-sizing: border-box; }
.mobile-stream-chat-name-card { max-height: calc(100dvh - 36px); overflow-y: auto; }
.stream-join-photo input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.stream-join-photo img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; order: -1; }
.stream-join-photo img[hidden] { display: none; }
.stream-join-error { color: #bd3030; font-size: 13px; margin: 0 0 12px; }
.stream-message-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.stream-join-done { display: block; width: 100%; padding: 16px; border: 0; background: transparent; color: inherit; font: inherit; }
.mobile-stream-chat-name-save:disabled { opacity: .5; }

.mobile-stream-chat-name-card {
    width: min(100%, 420px);
    border-radius: 22px;
    background: var(--background-color);
    color: var(--text-primary);
    border: 1px solid color-mix(in srgb, var(--text-primary) 10%, transparent);
    box-shadow: 0 24px 70px rgba(0,0,0,0.28);
    padding: 18px;
    position: relative;
}

.mobile-stream-chat-name-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--text-primary) 10%, transparent);
    background: color-mix(in srgb, var(--surface-color, var(--background-color)) 80%, transparent);
    color: var(--text-primary);
}

.mobile-stream-chat-name-title {
    font-size: 18px;
    font-weight: 850;
    margin: 4px 46px 6px 0;
}

.mobile-stream-chat-name-copy {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 46px 14px 0;
}

.mobile-stream-chat-name-input {
    width: 100%;
    min-height: 50px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--text-primary) 14%, transparent);
    background: var(--surface-color, var(--background-color));
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
    padding: 0 14px;
    font-size: 16px;
    font-weight: 750;
    outline: none;
    margin-bottom: 12px;
}

.mobile-stream-chat-name-prompt.is-missing-name .mobile-stream-chat-name-input {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 18%, transparent);
}

/* Was hardcoded #111/#fff while every sibling in this card (title, input,
   close button) reads from --text-primary -- the one element on the sheet
   not on the theme system, and the one that went black-on-black. Solid
   var(--primary-color) with an explicit white label matches how every other
   primary CTA in the app is built (see .mobile-import-library__owner-setup-
   connect for the same recipe), so this can't silently invert again. */
.mobile-stream-chat-name-save {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 16px;
    background: var(--primary-color, var(--accent-color, #111214));
}

.mobile-stream-chat-name-save span {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    font-size: 15px;
    font-weight: 850;
}

.mobile-stream-app-ready-name {
    margin: 4px 0 10px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 850;
}

.mobile-stream-app-ready-pin {
    width: 100%;
    border-radius: 16px;
    border: 1px dashed color-mix(in srgb, var(--text-primary) 24%, transparent);
    background: color-mix(in srgb, var(--surface-color, var(--background-color)) 82%, transparent);
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-align: center;
    padding: 16px 12px;
    margin: 0 0 12px;
}

/* Light mode should read as a clean white chat surface, not a gray overlay. */
[data-theme="light"] .stream-message-panel,
[data-theme="light-accent"] .stream-message-panel {
    background: #ffffff !important;
    color: #050505 !important;
    -webkit-text-fill-color: #050505 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 -12px 34px rgba(15, 23, 42, 0.12) !important;
}

[data-theme="light"] .stream-message-panel-head,
[data-theme="light-accent"] .stream-message-panel-head,
[data-theme="light"] .stream-message-compose,
[data-theme="light-accent"] .stream-message-compose {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .stream-message-list,
[data-theme="light-accent"] .stream-message-list {
    background: #ffffff !important;
}

[data-theme="light"] .stream-message-panel-title,
[data-theme="light-accent"] .stream-message-panel-title,
[data-theme="light"] .stream-message-sender,
[data-theme="light-accent"] .stream-message-sender,
[data-theme="light"] .stream-message-text,
[data-theme="light-accent"] .stream-message-text {
    color: #050505 !important;
    -webkit-text-fill-color: #050505 !important;
}

[data-theme="light"] .stream-message-panel-kicker,
[data-theme="light-accent"] .stream-message-panel-kicker,
[data-theme="light"] .stream-message-empty,
[data-theme="light-accent"] .stream-message-empty,
[data-theme="light"] .stream-message-sender-ticker,
[data-theme="light-accent"] .stream-message-sender-ticker,
[data-theme="light"] .stream-message-time,
[data-theme="light-accent"] .stream-message-time,
[data-theme="light"] .stream-message-meta,
[data-theme="light-accent"] .stream-message-meta {
    color: rgba(5, 5, 5, 0.58) !important;
    -webkit-text-fill-color: rgba(5, 5, 5, 0.58) !important;
}

[data-theme="light"] .stream-message-bubble,
[data-theme="light-accent"] .stream-message-bubble {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.10) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .stream-message-bubble.is-self,
[data-theme="light-accent"] .stream-message-bubble.is-self {
    background: color-mix(in srgb, var(--primary-color, #ff4d2e) 14%, #ffffff 86%) !important;
    border-color: color-mix(in srgb, var(--primary-color, #ff4d2e) 34%, rgba(0, 0, 0, 0.10)) !important;
}

[data-theme="light"] .stream-message-input,
[data-theme="light-accent"] .stream-message-input,
[data-theme="light"] .mobile-stream-chat-name-input,
[data-theme="light-accent"] .mobile-stream-chat-name-input {
    background: #ffffff !important;
    color: #050505 !important;
    -webkit-text-fill-color: #050505 !important;
    caret-color: #050505 !important;
    border-color: rgba(0, 0, 0, 0.14) !important;
    color-scheme: light !important;
}

[data-theme="light"] .stream-message-panel-close,
[data-theme="light-accent"] .stream-message-panel-close,
[data-theme="light"] .stream-message-send,
[data-theme="light-accent"] .stream-message-send {
    color: #050505 !important;
    -webkit-text-fill-color: #050505 !important;
}


/* ==========================================================================
   Stream tab chat: a dark glass sheet over the photo / the live video.
   It takes the bottom of the screen outright: the Collect dock and the
   bottom nav go away while it is open, and it sits on the screen edge (only
   the keyboard lifts it). Scoped with the id so it outranks the light-theme
   block above and the immersive positioning in native-stream-immersive.css.
   ========================================================================== */
html body.stream-active.stream-messages-open #stream-collect-bar,
html body.stream-active.stream-messages-open #bottom-nav {
    display: none !important;
}
html body.stream-active .stream-message-panel#stream-message-panel {
    --stream-message-compose-height: calc(74px + env(safe-area-inset-bottom, 0px));
    bottom: var(--stream-message-keyboard-offset, 0px) !important;
    height: min(78dvh, 680px) !important;
    max-height: calc(100dvh - 56px - env(safe-area-inset-top, 0px)) !important;
    background: rgba(14, 15, 17, 0.94) !important;
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    backdrop-filter: blur(24px) saturate(140%);
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-bottom: 0 !important;
    border-radius: 26px 26px 0 0 !important;
    box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.55) !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-panel-head {
    padding: 20px 18px 8px !important;
    background: transparent !important;
    border: 0 !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-panel-head::before {
    background: rgba(255, 255, 255, 0.28) !important;
    top: 7px;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-panel-kicker {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 4px !important;
    font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.55) !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-panel-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #6fe3c6;
    box-shadow: 0 0 0 3px rgba(111, 227, 198, 0.16);
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-panel-title {
    font-size: 20px !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-panel-close {
    width: 38px !important; height: 38px !important; min-width: 38px !important; min-height: 38px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(255, 255, 255, 0.10) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: 13px;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-panel-close i {
    color: #fff !important; -webkit-text-fill-color: #fff !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-list {
    padding: 6px 18px 22px !important;
    gap: 14px !important;
    background: transparent !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-empty {
    max-width: 240px;
    font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace !important;
    font-size: 11px !important;
    letter-spacing: 0.02em;
    line-height: 1.6 !important;
    color: rgba(255, 255, 255, 0.55) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.55) !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-empty i {
    font-size: 26px !important;
    color: rgba(255, 255, 255, 0.35) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.35) !important;
}
/* Messages are open rows, not boxed bubbles: avatar, name, time, then text. */
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-bubble {
    max-width: 100% !important;
    align-self: stretch !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-meta {
    margin-bottom: 4px !important;
    gap: 8px !important;
    font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    letter-spacing: 0.12em !important;
    color: rgba(255, 255, 255, 0.4) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.4) !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-avatar {
    width: 24px !important; height: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-sender {
    font-size: 10px !important;
    letter-spacing: 0.12em !important;
    color: rgba(255, 255, 255, 0.85) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.85) !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-bubble.is-self .stream-message-sender {
    color: #6fe3c6 !important; -webkit-text-fill-color: #6fe3c6 !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-time,
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-sender-ticker {
    color: rgba(255, 255, 255, 0.38) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.38) !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-host-badge {
    padding: 2px 7px !important;
    background: #6fe3c6 !important;
    color: #0e0f11 !important;
    -webkit-text-fill-color: #0e0f11 !important;
    font-size: 8px !important;
    letter-spacing: 0.14em !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-text {
    padding-left: 32px;
    font-size: 14px !important;
    line-height: 1.45 !important;
    color: rgba(255, 255, 255, 0.92) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.92) !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-delete,
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-moderate {
    background: rgba(255, 255, 255, 0.10) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.7) !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-moderate.is-block {
    color: #ff8a7a !important; -webkit-text-fill-color: #ff8a7a !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-compose {
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    gap: 10px !important;
    background: rgba(14, 15, 17, 0.96) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}
/* White field, black type: the one light element on the dark sheet. */
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-input {
    min-height: 46px !important;
    padding: 13px 16px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    background: #ffffff !important;
    border: 1px solid #ffffff !important;
    color: #0e0f11 !important;
    -webkit-text-fill-color: #0e0f11 !important;
    caret-color: #0e0f11 !important;
    color-scheme: light !important;
    box-shadow: none !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-input::placeholder {
    color: rgba(14, 15, 17, 0.45) !important;
    -webkit-text-fill-color: rgba(14, 15, 17, 0.45) !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-send {
    width: 46px !important; height: 46px !important; min-width: 46px !important; min-height: 46px !important;
    border: 0 !important;
    background: #6fe3c6 !important;
    color: #0e0f11 !important;
    -webkit-text-fill-color: #0e0f11 !important;
    box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.9) !important;
}
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-send i {
    color: #0e0f11 !important; -webkit-text-fill-color: #0e0f11 !important;
}
/* Live chat reads from the bottom up: rows hug the composer, not the title. */
html body.stream-active .stream-message-panel#stream-message-panel .stream-message-bubble:first-child { margin-top: auto !important; }


/* ==========================================================================
   Join the chat / your app is ready: the same dark glass as the chat sheet.
   Scoped by id so it outranks the light card rules above and the theme sweeps.
   ========================================================================== */
html body #mobile-stream-chat-name-prompt,
html body #mobile-stream-app-ready-prompt {
    padding: 0 !important;
    background: rgba(0, 0, 0, 0.55) !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-card,
html body #mobile-stream-app-ready-prompt .mobile-stream-chat-name-card {
    width: 100% !important;
    max-width: none !important;
    padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px)) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-bottom: 0 !important;
    border-radius: 26px 26px 0 0 !important;
    background: rgba(14, 15, 17, 0.96) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.6) !important;
}
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-card::before,
html body #mobile-stream-app-ready-prompt .mobile-stream-chat-name-card::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 34px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    transform: translateX(-50%);
}
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-close,
html body #mobile-stream-app-ready-prompt .mobile-stream-chat-name-close {
    top: 20px !important;
    right: 18px !important;
    width: 38px !important;
    height: 38px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(255, 255, 255, 0.10) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: 13px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-close *,
html body #mobile-stream-app-ready-prompt .mobile-stream-chat-name-close * {
    color: #fff !important; -webkit-text-fill-color: #fff !important;
}
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-title,
html body #mobile-stream-app-ready-prompt .mobile-stream-chat-name-title {
    margin: 10px 50px 6px 0 !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-copy,
html body #mobile-stream-app-ready-prompt .mobile-stream-chat-name-copy {
    margin: 0 40px 18px 0 !important;
    font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em;
    line-height: 1.6 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.6) !important;
}
/* Photo: a round avatar slot with the label beside it, not a dashed box. */
html body #mobile-stream-chat-name-prompt .stream-join-photo {
    display: flex !important;
    align-items: center;
    gap: 14px;
    min-height: 0 !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}
html body #mobile-stream-chat-name-prompt .stream-join-photo::before {
    content: '\f030';
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome;
    font-weight: 900;
    order: -2;
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
    border: 1px dashed rgba(255, 255, 255, 0.3);
}
html body #mobile-stream-chat-name-prompt .stream-join-photo:has(img:not([hidden]))::before { display: none; }
html body #mobile-stream-chat-name-prompt .stream-join-photo img {
    width: 64px !important;
    height: 64px !important;
    order: -2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
html body #mobile-stream-chat-name-prompt .stream-join-photo > span {
    font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.75) !important;
}
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-input {
    min-height: 52px !important;
    margin-bottom: 12px !important;
    padding: 0 16px !important;
    border: 1px solid #ffffff !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    color: #0e0f11 !important;
    -webkit-text-fill-color: #0e0f11 !important;
    caret-color: #0e0f11 !important;
    color-scheme: light !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-input::placeholder {
    color: rgba(14, 15, 17, 0.45) !important;
    -webkit-text-fill-color: rgba(14, 15, 17, 0.45) !important;
    font-weight: 500 !important;
}
html body #mobile-stream-chat-name-prompt .stream-join-error {
    font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace !important;
    font-size: 11px !important;
    color: #ffb4a8 !important;
    -webkit-text-fill-color: #ffb4a8 !important;
}
html body #mobile-stream-chat-name-prompt .stream-join-error:empty { display: none; }
/* Primary: Join & send here, Download login on the ready card. */
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-save,
html body #mobile-stream-app-ready-prompt .mobile-stream-chat-name-save {
    min-height: 52px !important;
    border: 0 !important;
    border-radius: 16px !important;
    background: #6fe3c6 !important;
    box-shadow: 0 12px 28px -14px rgba(111, 227, 198, 0.8) !important;
}
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-save,
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-save span,
html body #mobile-stream-app-ready-prompt .mobile-stream-chat-name-save,
html body #mobile-stream-app-ready-prompt .mobile-stream-chat-name-save span {
    color: #0e0f11 !important;
    -webkit-text-fill-color: #0e0f11 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em;
}
/* Quiet second action under it. */
html body #mobile-stream-app-ready-prompt .stream-join-done {
    margin-top: 4px;
    padding: 14px !important;
    border: 0 !important;
    background: transparent !important;
    font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.65) !important;
}
html body #mobile-stream-app-ready-prompt .mobile-stream-app-ready-name {
    margin: 6px 0 12px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}
html body #mobile-stream-app-ready-prompt .mobile-stream-app-ready-pin {
    margin: 0 0 16px !important;
    padding: 18px 12px !important;
    border: 1px dashed rgba(255, 255, 255, 0.3) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    letter-spacing: 0.22em !important;
    color: #6fe3c6 !important;
    -webkit-text-fill-color: #6fe3c6 !important;
}

/* Photo and name share one row; the card is two rows plus the button. */
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-card {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 10px;
    align-items: center;
}
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-title,
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-copy,
html body #mobile-stream-chat-name-prompt .stream-join-error,
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-save {
    grid-column: 1 / -1;
}
/* The photo slot is a pill: camera circle plus the words, name field beside it. */
html body #mobile-stream-chat-name-prompt .stream-join-photo {
    margin: 0 !important;
    height: 52px;
    padding: 0 16px 0 6px !important;
    gap: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.3) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.06) !important;
}
html body #mobile-stream-chat-name-prompt .stream-join-photo::before {
    width: 38px; height: 38px; flex-basis: 38px; font-size: 14px;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
}
html body #mobile-stream-chat-name-prompt .stream-join-photo img { width: 38px !important; height: 38px !important; }
html body #mobile-stream-chat-name-prompt .stream-join-photo > span { white-space: nowrap; }
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-input { margin: 0 !important; }
html body #mobile-stream-chat-name-prompt .stream-join-error:not(:empty) { margin: 10px 0 0; }
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-save { margin-top: 14px; }

/* Everything on the join card is a pill: photo slot, name field, button. */
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-input,
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-save,
html body #mobile-stream-app-ready-prompt .mobile-stream-chat-name-save,
html body #mobile-stream-app-ready-prompt .mobile-stream-app-ready-pin {
    border-radius: 999px !important;
}
html body #mobile-stream-chat-name-prompt .mobile-stream-chat-name-input { padding: 0 20px !important; }
