.stream-page {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(157, 255, 92, .06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(157, 255, 92, .04) 1px, transparent 1px),
    #00270f;
  background-size: 16px 16px, 16px 16px, auto;
  color: #101b10;
}

.stream-shell {
  width: min(1180px, calc(100vw - 18px));
  margin: 14px auto;
  border: 3px ridge #d8d8d8;
  background: #dcdcdc;
  box-shadow: 0 0 0 2px #111, 8px 8px 0 rgba(0, 0, 0, .35);
}

@media (min-width: 921px) {
  body.stream-page {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8px 0;
    scrollbar-width: none;
  }

  body.stream-page::-webkit-scrollbar {
    display: none;
  }

  .stream-shell {
    --stream-desktop-fit-fallback: 1;
    width: var(--site-width);
    height: var(--site-height);
    max-width: none;
    margin: 0 auto;
    table-layout: fixed;
    overflow: hidden;
    transform: scale(var(--stream-desktop-fit, var(--stream-desktop-fit-fallback)));
    transform-origin: top center;
    box-shadow: none;
  }

  .stream-header-grid {
    grid-template-columns: 1fr 182px;
    gap: 8px;
  }

  .stream-page .topbar {
    height: 18px;
    padding: 1px 7px;
  }

  .stream-page .header {
    height: 76px;
    padding: 4px 8px;
  }

  .stream-page .header-gif {
    width: 66px;
    height: 42px;
  }

  .stream-page .css-logo {
    min-height: 42px;
    padding: 2px 12px 5px;
    font-size: 29px;
  }

  .stream-live-sign {
    padding: 5px 7px;
    font-size: 10px;
  }

  .stream-main,
  .stream-side {
    padding: 4px;
  }

  .stream-main {
    width: 636px;
  }

  .stream-side {
    width: 264px;
  }

  .stream-video-window,
  .stream-info-window,
  .stream-side .box {
    margin-bottom: 5px;
  }

  .stream-video-frame {
    height: 352px;
    min-height: 0;
  }

  .stream-toolbar {
    gap: 5px;
    padding-top: 5px;
  }

  .stream-toolbar button,
  .stream-toolbar a,
  .stream-status-strip button,
  .stream-obs button,
  .stream-chat form button,
  .stream-auth button {
    padding: 4px 7px;
    font-size: 10px;
    line-height: 1.1;
  }

  .stream-status-strip {
    gap: 5px;
    margin-top: 5px;
    padding: 5px;
    font-size: 10px;
  }

  .stream-copy {
    padding: 7px;
    max-height: 118px;
    overflow: auto;
    font-size: 10px;
    line-height: 1.18;
  }

  .stream-copy h1 {
    margin-bottom: 4px;
    font-size: 21px;
  }

  .stream-copy p {
    margin: 5px 0;
  }

  .stream-auth {
    gap: 5px;
    margin-bottom: 5px;
    padding: 5px;
  }

  .stream-auth input,
  .stream-chat input,
  .stream-chat textarea {
    padding: 5px;
    font-size: 10px;
  }

  .stream-auth-buttons {
    grid-template-columns: 1fr 1fr 46px;
    gap: 4px;
  }

  .stream-chat-list {
    height: 284px;
    padding: 5px;
    font-size: 10px;
    line-height: 1.16;
  }

  .stream-chat textarea {
    min-height: 48px;
  }

  .stream-chat-note {
    min-height: 15px;
    padding-top: 3px;
    font-size: 10px;
  }

  .stream-obs dl {
    grid-template-columns: 58px 1fr;
    gap: 3px 5px;
    margin-bottom: 6px;
    font-size: 10px;
    line-height: 1.15;
  }

  .stream-links {
    gap: 5px;
    font-size: 10px;
  }

  .stream-links a {
    padding: 5px;
  }
}

/* 2026-08-23 v9 final cascade guard: keep stream geometry after legacy blocks. */
@media (min-width: 921px) {
  .stream-compact-page .stream-shell,
  .stream-compact-page.stream-page.is-theater .stream-shell {
    display: block !important;
    width: var(--site-width) !important;
    height: var(--site-height) !important;
    max-width: none !important;
    overflow: hidden !important;
    transform: scale(var(--stream-desktop-fit, 1)) !important;
    transform-origin: top center !important;
  }

  .stream-compact-page .stream-shell > tbody {
    display: grid !important;
    grid-template-columns: 704px 196px !important;
    grid-template-rows: 18px 76px 581px !important;
    width: var(--site-width) !important;
    height: var(--site-height) !important;
  }

  .stream-compact-page .stream-shell > tbody > tr {
    display: contents !important;
  }

  .stream-compact-page .stream-shell td {
    display: block !important;
    box-sizing: border-box !important;
  }

  .stream-compact-page .topbar {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: var(--site-width) !important;
    height: 18px !important;
    padding: 1px 7px !important;
  }

  .stream-compact-page .header {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: var(--site-width) !important;
    height: 76px !important;
    padding: 4px 8px !important;
  }

  .stream-compact-page .stream-main,
  .stream-compact-page.stream-page.is-theater .stream-main {
    grid-column: 1 !important;
    grid-row: 3 !important;
    width: 704px !important;
    height: 581px !important;
    padding: 6px 4px 6px 6px !important;
  }

  .stream-compact-page .stream-side {
    grid-column: 2 !important;
    grid-row: 3 !important;
    width: 196px !important;
    height: 581px !important;
    padding: 6px 6px 6px 4px !important;
  }

  .stream-compact-page .stream-video-window {
    display: grid !important;
    grid-template-rows: 390px 8px 64px 1fr 34px !important;
    width: 100% !important;
    height: 569px !important;
    margin: 0 !important;
    border: 0 !important;
    background: #1fb14c !important;
    overflow: hidden !important;
  }

  .stream-compact-page .stream-video-window .window-title,
  .stream-compact-page .stream-toolbar {
    display: none !important;
  }

  .stream-compact-page .stream-video-frame {
    grid-row: 1 !important;
    width: 100% !important;
    height: 390px !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 9 !important;
    box-sizing: border-box !important;
    border: 4px solid #fff020 !important;
    background: #1fb14c !important;
  }

  .stream-compact-page .stream-player-fallback {
    inset: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    border: 0 !important;
    background: #1fb14c !important;
    text-align: center !important;
  }

  .stream-compact-page .stream-player-fallback b {
    font-size: 78px !important;
    line-height: .9 !important;
  }

  .stream-compact-page .stream-player-fallback span {
    max-width: 76% !important;
    font-size: 14px !important;
    line-height: 1.18 !important;
  }

  .stream-compact-page .stream-broadcast-title {
    grid-row: 3 !important;
    height: 64px !important;
    margin: 0 !important;
    padding: 9px 10px 8px !important;
    box-sizing: border-box !important;
    font-size: 34px !important;
    line-height: 1.05 !important;
  }

  .stream-compact-page .stream-status-strip {
    grid-row: 5 !important;
    display: grid !important;
    grid-template-columns: 170px minmax(0, 1fr) 78px !important;
    gap: 8px !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 6px 8px !important;
    box-sizing: border-box !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
  }

  .stream-compact-page .stream-chat {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 569px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border: 3px ridge #8b0018 !important;
    overflow: hidden !important;
  }

  .stream-compact-page .stream-chat .box-title {
    display: none !important;
  }

  .stream-compact-page .stream-auth {
    flex: 0 0 auto !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 5px !important;
    border: 0 !important;
    border-bottom: 2px solid #827f54 !important;
  }

  .stream-compact-page .stream-auth-state {
    overflow: hidden !important;
    font-size: 8px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  .stream-compact-page .stream-auth input {
    height: 21px !important;
    padding: 3px 5px !important;
    font-size: 10px !important;
  }

  .stream-compact-page .stream-auth-buttons {
    grid-template-columns: 1fr 1fr 34px !important;
    gap: 3px !important;
  }

  .stream-compact-page .stream-auth button,
  .stream-compact-page .stream-chat form button {
    min-width: 0 !important;
    padding: 3px 4px !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
  }

  .stream-compact-page .stream-chat-list {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 6px !important;
    font-size: 10px !important;
    line-height: 1.18 !important;
  }

  .stream-compact-page .stream-chat form {
    flex: 0 0 auto !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 5px !important;
  }

  .stream-compact-page .stream-chat textarea {
    height: 42px !important;
    min-height: 42px !important;
    padding: 5px !important;
    resize: none !important;
    font-size: 9px !important;
  }
}

/* 2026-08-23 v9: final proportional geometry for the stream room. */
@media (min-width: 921px) {
  body.stream-page {
    overflow: hidden !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 8px 0 !important;
  }

  .stream-compact-page .stream-shell,
  .stream-compact-page.stream-page.is-theater .stream-shell {
    display: block !important;
    width: var(--site-width) !important;
    height: var(--site-height) !important;
    max-width: none !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    table-layout: fixed !important;
    transform: scale(var(--stream-desktop-fit, 1)) !important;
    transform-origin: top center !important;
    box-shadow: none !important;
  }

  .stream-compact-page .stream-shell > tbody {
    display: grid !important;
    grid-template-columns: 704px 196px !important;
    grid-template-rows: 18px 76px 581px !important;
    width: var(--site-width) !important;
    height: var(--site-height) !important;
  }

  .stream-compact-page .stream-shell > tbody > tr {
    display: contents !important;
  }

  .stream-compact-page .stream-shell td {
    display: block !important;
    box-sizing: border-box !important;
  }

  .stream-compact-page .topbar {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: var(--site-width) !important;
    height: 18px !important;
    padding: 1px 7px !important;
  }

  .stream-compact-page .header {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: var(--site-width) !important;
    height: 76px !important;
    padding: 4px 8px !important;
  }

  .stream-compact-page .stream-header-grid {
    grid-template-columns: 1fr 188px !important;
    gap: 8px !important;
  }

  .stream-compact-page .stream-main,
  .stream-compact-page.stream-page.is-theater .stream-main {
    grid-column: 1 !important;
    grid-row: 3 !important;
    width: 704px !important;
    height: 581px !important;
    padding: 6px 4px 6px 6px !important;
  }

  .stream-compact-page .stream-side {
    grid-column: 2 !important;
    grid-row: 3 !important;
    width: 196px !important;
    height: 581px !important;
    padding: 6px 6px 6px 4px !important;
  }

  .stream-compact-page .stream-video-window {
    display: grid !important;
    grid-template-rows: 390px 8px 64px 1fr 34px !important;
    width: 100% !important;
    height: 569px !important;
    margin: 0 !important;
    border: 0 !important;
    background: #1fb14c !important;
    overflow: hidden !important;
  }

  .stream-compact-page .stream-video-window .window-title {
    display: none !important;
  }

  .stream-compact-page .stream-video-frame {
    grid-row: 1 !important;
    width: 100% !important;
    height: 390px !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 9 !important;
    box-sizing: border-box !important;
    border: 4px solid #fff020 !important;
    background: #1fb14c !important;
  }

  .stream-compact-page .stream-video-frame video {
    object-fit: contain !important;
    background: #101010 !important;
  }

  .stream-compact-page .stream-player-fallback {
    inset: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border: 0 !important;
    background: #1fb14c !important;
    text-align: center !important;
  }

  .stream-compact-page .stream-player-fallback b {
    color: #fff020 !important;
    font-size: 78px !important;
    line-height: .9 !important;
    letter-spacing: 0 !important;
  }

  .stream-compact-page .stream-player-fallback span {
    max-width: 76% !important;
    color: #44224d !important;
    font-size: 14px !important;
    line-height: 1.18 !important;
  }

  .stream-compact-page .stream-broadcast-title {
    grid-row: 3 !important;
    height: 64px !important;
    min-height: 64px !important;
    margin: 0 !important;
    padding: 9px 10px 8px !important;
    box-sizing: border-box !important;
    font-size: 34px !important;
    line-height: 1.05 !important;
  }

  .stream-compact-page .stream-status-strip {
    grid-row: 5 !important;
    display: grid !important;
    grid-template-columns: 170px minmax(0, 1fr) 78px !important;
    gap: 8px !important;
    align-items: center !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 6px 8px !important;
    box-sizing: border-box !important;
    border: 0 !important;
    background: transparent !important;
    color: #7d007d !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
  }

  .stream-compact-page .stream-status-strip span,
  .stream-compact-page .stream-status-strip i {
    min-width: 0 !important;
    overflow: hidden !important;
    color: inherit !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  .stream-compact-page .stream-chat {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 569px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border: 3px ridge #8b0018 !important;
    background: #ffffbd !important;
    overflow: hidden !important;
  }

  .stream-compact-page .stream-chat .box-title {
    display: none !important;
  }

  .stream-compact-page .stream-auth {
    flex: 0 0 auto !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 5px !important;
    border: 0 !important;
    border-bottom: 2px solid #827f54 !important;
    background: #ffffbd !important;
  }

  .stream-compact-page .stream-auth-state {
    overflow: hidden !important;
    font-size: 8px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  .stream-compact-page .stream-auth form {
    gap: 4px !important;
  }

  .stream-compact-page .stream-auth input {
    height: 21px !important;
    padding: 3px 5px !important;
    font-size: 10px !important;
  }

  .stream-compact-page .stream-auth-buttons {
    grid-template-columns: 1fr 1fr 34px !important;
    gap: 3px !important;
  }

  .stream-compact-page .stream-auth button,
  .stream-compact-page .stream-chat form button {
    min-width: 0 !important;
    padding: 3px 4px !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
  }

  .stream-compact-page .stream-chat-list {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 6px !important;
    border: 0 !important;
    border-top: 2px solid #827f54 !important;
    border-bottom: 2px solid #827f54 !important;
    background: #ffffbd !important;
    font-size: 10px !important;
    line-height: 1.18 !important;
  }

  .stream-compact-page .stream-chat form {
    flex: 0 0 auto !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 5px !important;
    background: #ffffbd !important;
  }

  .stream-compact-page .stream-chat textarea {
    height: 42px !important;
    min-height: 42px !important;
    padding: 5px !important;
    resize: none !important;
    font-size: 9px !important;
  }

  .stream-compact-page .stream-chat-note {
    flex: 0 0 auto !important;
    min-height: 13px !important;
    padding: 0 5px 4px !important;
    font-size: 9px !important;
  }
}

/* 2026-08-23: stream-room layout, matched to the drawn OBS/chat sketch. */
.stream-broadcast-title {
  margin: 8px 0 0;
  padding: 8px 10px;
  border: 3px ridge #8b0018;
  background: #ffffb8;
  color: #9a0017;
  font-size: 34px;
  line-height: 1.05;
  text-transform: none;
  text-shadow: 1px 1px #fff8a6;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stream-video-frame.is-online .stream-player-fallback {
  display: none;
}

@media (min-width: 921px) {
  .stream-compact-page .stream-shell {
    display: block;
    width: var(--site-width);
    height: var(--site-height);
    table-layout: fixed;
  }

  .stream-compact-page .stream-shell > tbody {
    display: grid;
    grid-template-columns: 704px 196px;
    grid-template-rows: 18px 76px 581px;
    width: var(--site-width);
    height: var(--site-height);
  }

  .stream-compact-page .stream-shell > tbody > tr {
    display: contents;
  }

  .stream-compact-page .stream-shell td {
    display: block;
  }

  .stream-compact-page .stream-main-col {
    width: 704px;
  }

  .stream-compact-page .stream-side-col {
    width: 196px;
  }

  .stream-compact-page .topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    height: 18px;
    padding: 1px 7px;
  }

  .stream-compact-page .header {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 76px;
    padding: 4px 8px;
    box-sizing: border-box;
  }

  .stream-compact-page .stream-header-grid {
    grid-template-columns: 1fr 188px;
    gap: 8px;
  }

  .stream-compact-page .stream-live-sign {
    justify-content: center;
    min-width: 170px;
    padding: 4px 7px;
    font-size: 10px;
  }

  .stream-compact-page .stream-main,
  .stream-compact-page .stream-side {
    height: 581px;
    padding: 6px;
    box-sizing: border-box;
    vertical-align: top;
  }

  .stream-compact-page .stream-main {
    grid-column: 1;
    grid-row: 3;
    width: 704px;
    padding-right: 3px;
  }

  .stream-compact-page .stream-side {
    grid-column: 2;
    grid-row: 3;
    width: 196px;
    padding-left: 3px;
  }

  .stream-compact-page .stream-video-window,
  .stream-compact-page .stream-chat {
    height: 569px;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .stream-compact-page .stream-video-window {
    border: 0;
    background: #1fb14c;
  }

  .stream-compact-page .stream-video-window .window-title {
    display: none;
  }

  .stream-compact-page .stream-video-frame {
    flex: 0 0 auto;
    width: 100%;
    height: 388px;
    min-height: 0;
    aspect-ratio: auto;
    box-sizing: border-box;
    border: 4px solid #fff020;
    background: #1fb14c;
  }

  .stream-compact-page .stream-video-frame video {
    background: #101010;
    object-fit: contain;
  }

  .stream-compact-page .stream-player-fallback {
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    background: #1fb14c;
    color: #fff020;
    text-align: center;
    text-transform: lowercase;
  }

  .stream-compact-page .stream-player-fallback b {
    font-size: 86px;
    line-height: .9;
    font-weight: 700;
  }

  .stream-compact-page .stream-player-fallback span {
    max-width: 78%;
    color: #572060;
    font-size: 16px;
    line-height: 1.2;
    text-transform: none;
  }

  .stream-compact-page .stream-toolbar {
    display: none;
  }

  .stream-compact-page .stream-broadcast-title {
    flex: 0 0 auto;
    min-height: 59px;
    margin-top: 8px;
    box-sizing: border-box;
  }

  .stream-compact-page .stream-status-strip {
    flex: 0 0 auto;
    grid-template-columns: 165px minmax(0, 1fr) 78px;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    padding: 7px 8px;
    border: 0;
    background: transparent;
    color: #7d007d;
    font-size: 12px;
  }

  .stream-compact-page .stream-status-strip span {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .stream-compact-page .stream-status-strip i {
    color: inherit;
  }

  .stream-compact-page .stream-status-strip button {
    padding: 4px 5px;
    font-size: 10px;
    white-space: nowrap;
  }

  .stream-compact-page .stream-chat {
    border: 3px ridge #8b0018;
    background: #ffffbd;
  }

  .stream-compact-page .stream-chat .box-title {
    display: none;
  }

  .stream-compact-page .stream-auth {
    flex: 0 0 auto;
    gap: 4px;
    margin: 0;
    padding: 5px;
    border: 0;
    border-bottom: 2px solid #827f54;
    background: #ffffbd;
  }

  .stream-compact-page .stream-auth-state {
    font-size: 8px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .stream-compact-page .stream-auth form {
    gap: 4px;
  }

  .stream-compact-page .stream-auth input {
    height: 22px;
    padding: 3px 5px;
    font-size: 10px;
  }

  .stream-compact-page .stream-auth-buttons {
    grid-template-columns: 1fr 1fr 39px;
    gap: 3px;
  }

  .stream-compact-page .stream-auth button,
  .stream-compact-page .stream-chat form button {
    padding: 3px 4px;
    font-size: 10px;
    line-height: 1.1;
  }

  .stream-compact-page .stream-chat-list {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    padding: 6px;
    border: 0;
    border-top: 2px solid #827f54;
    border-bottom: 2px solid #827f54;
    background: #ffffbd;
    font-size: 11px;
    line-height: 1.2;
  }

  .stream-compact-page .stream-chat form {
    flex: 0 0 auto;
    gap: 4px;
    margin: 0;
    padding: 5px;
    background: #ffffbd;
  }

  .stream-compact-page .stream-chat textarea {
    height: 46px;
    min-height: 46px;
    padding: 5px;
    resize: none;
    font-size: 10px;
  }

  .stream-compact-page .stream-chat-note {
    flex: 0 0 auto;
    min-height: 14px;
    padding: 0 5px 4px;
    font-size: 10px;
  }
}

@media (max-width: 920px) {
  .stream-broadcast-title {
    font-size: 24px;
    white-space: normal;
  }

  .stream-player-fallback {
    inset: 0;
  }

  .stream-player-fallback b {
    font-size: 48px;
  }
}

@media (min-width: 921px) {
  .stream-compact-page .stream-shell {
    height: var(--site-height);
  }

  .stream-compact-page .stream-main,
  .stream-compact-page .stream-side {
    height: 581px;
    box-sizing: border-box;
  }

  .stream-compact-page .stream-video-window,
  .stream-compact-page .stream-chat {
    height: 573px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .stream-compact-page .stream-video-frame {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
  }

  .stream-compact-page .stream-toolbar,
  .stream-compact-page .stream-status-strip,
  .stream-compact-page .stream-auth,
  .stream-compact-page .stream-chat form,
  .stream-compact-page .stream-chat-note,
  .stream-compact-page .box-title,
  .stream-compact-page .window-title {
    flex: 0 0 auto;
  }

  .stream-compact-page .stream-chat-list {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
  }

  .stream-compact-page .stream-auth {
    gap: 4px;
    margin-bottom: 5px;
  }

  .stream-compact-page .stream-chat form {
    gap: 4px;
    margin-top: 5px;
  }

  .stream-compact-page .stream-chat textarea {
    min-height: 42px;
    height: 42px;
    resize: none;
  }

  .stream-compact-page .stream-status-strip {
    grid-template-columns: 1fr auto auto;
    overflow: hidden;
  }

  .stream-compact-page #radioNow {
    display: inline-block;
    max-width: 330px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
  }
}

.stream-header-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.stream-live-sign {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 2px inset #9bc38e;
  background: #102010;
  color: #eaff89;
  text-transform: uppercase;
  white-space: nowrap;
}

.stream-live-sign small {
  color: #9dff5c;
}

.stream-rec-dot {
  width: 13px;
  height: 13px;
  background: #ff0505;
  border: 2px outset #590000;
  box-shadow: 0 0 8px #ff0000;
}

.stream-main,
.stream-side {
  vertical-align: top;
  padding: 10px;
}

.stream-main {
  width: 72%;
}

.stream-side {
  width: 28%;
}

.stream-video-window,
.stream-info-window,
.stream-side .box {
  margin-bottom: 12px;
}

.stream-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 260px;
  background:
    repeating-linear-gradient(0deg, rgba(157, 255, 92, .08) 0 2px, transparent 2px 5px),
    #050805;
  border: 3px inset #bfbfbf;
}

.stream-video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #050805;
}

.stream-player-fallback {
  position: absolute;
  inset: auto 12px 12px 12px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 2px dashed #d8d06d;
  background: rgba(255, 255, 194, .94);
  color: #101b10;
  font-size: 14px;
  pointer-events: none;
}

.stream-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 9px 0 0;
}

.stream-toolbar button,
.stream-toolbar a,
.stream-status-strip button,
.stream-obs button,
.stream-chat form button {
  border: 3px outset #f5f5f5;
  background: #fffdd1;
  color: #0a4010;
  padding: 6px 10px;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.stream-toolbar button:active,
.stream-toolbar a:active,
.stream-status-strip button:active,
.stream-obs button:active,
.stream-chat form button:active {
  border-style: inset;
}

.stream-status-strip {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding: 8px;
  border: 2px inset #b6b6b6;
  background: #ffffc4;
}

.stream-status-strip i {
  font-style: normal;
  color: #003c0b;
}

.stream-copy {
  padding: 12px;
  background: #ffffc4;
  border: 2px inset #e7e28b;
}

.stream-copy h1 {
  margin: 0 0 8px;
  color: #008c1a;
  font-size: 30px;
  line-height: 1.1;
  text-shadow: 2px 2px #fff;
}

.stream-copy p {
  margin: 9px 0;
}

.stream-copy code,
.stream-obs code {
  background: #f7f7d7;
  border: 1px solid #8d8d52;
  padding: 1px 4px;
  overflow-wrap: anywhere;
}

.stream-chat-list {
  height: 410px;
  overflow: auto;
  padding: 6px;
  border: 2px inset #bfbfbf;
  background: #ffffc4;
}

.stream-auth {
  display: grid;
  gap: 7px;
  margin-bottom: 8px;
  padding: 6px;
  border: 2px inset #cfcf9d;
  background: #ffffc4;
}

.stream-auth-state {
  color: #004d12;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.stream-auth form {
  display: grid;
  gap: 6px;
}

.stream-auth input {
  width: 100%;
  box-sizing: border-box;
  border: 2px inset #d0d0a0;
  background: #ffffc4;
  color: #101b10;
  font: inherit;
  padding: 7px;
}

.stream-auth-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 5px;
}

.stream-auth button {
  border: 3px outset #f5f5f5;
  background: #fffdd1;
  color: #0a4010;
  padding: 6px 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.stream-auth button:active {
  border-style: inset;
}

.stream-auth.is-logged-out #streamLogoutBtn,
.stream-auth.is-logged-in [data-auth-action] {
  display: none;
}

.stream-auth.is-logged-in .stream-auth-login-field,
.stream-auth.is-logged-in .stream-hp {
  display: none !important;
}

.stream-auth.is-logged-in form {
  display: block;
}

.stream-auth.is-logged-in .stream-auth-buttons {
  display: block;
}

.stream-auth.is-logged-in #streamLogoutBtn {
  display: inline-block;
  width: 100%;
}

.stream-chat-entry {
  padding: 4px 0;
  border-bottom: 1px dotted #87875c;
  overflow-wrap: anywhere;
}

.stream-chat-entry b {
  color: #008c1a;
}

.stream-chat-entry .stream-nick,
#streamViewerNames .stream-viewer-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  vertical-align: -2px;
}

#streamViewerNames .stream-viewer-name {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

#streamViewerNames .stream-viewer-name span {
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

#streamViewerNames .stream-viewer-name:hover span,
#streamViewerNames .stream-viewer-name:focus-visible span {
  color: #b00000;
  background: #ffff66;
}

#streamViewerNames .stream-viewer-name:focus-visible {
  outline: 1px dotted #b00000;
  outline-offset: 1px;
}

.stream-chat-entry .pixel-flag,
#streamViewerNames .pixel-flag {
  width: 18px;
  height: 12px;
  margin-right: 1px;
  vertical-align: -2px;
}

.stream-chat-entry.is-sys b,
.stream-chat-entry.is-sys code {
  color: #b00000;
}

.stream-chat-entry.is-admin {
  margin: 4px 0;
  padding: 6px;
  border: 2px dashed #b00000;
  background: #fff2a3;
}

.stream-chat-entry.is-admin b,
.stream-chat-entry.is-admin code {
  color: #b00000;
  text-transform: uppercase;
}

.stream-chat-entry.is-moderation {
  border: 2px dotted #b00000;
  background: #fff7bd;
  color: #7c0000;
}

.stream-chat-entry.is-banned {
  opacity: .68;
}

.stream-chat-entry time,
.stream-chat-entry code {
  margin-left: 5px;
  color: #8a1f1f;
  font-size: 12px;
}

.stream-chat form {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.stream-chat input,
.stream-chat textarea {
  width: 100%;
  box-sizing: border-box;
  border: 2px inset #d0d0a0;
  background: #ffffc4;
  color: #101b10;
  font: inherit;
  padding: 7px;
}

.stream-chat textarea {
  resize: vertical;
  min-height: 56px;
}

.stream-hp {
  position: absolute;
  left: -10000px;
  width: 1px !important;
  height: 1px;
  opacity: 0;
}

.stream-chat-note {
  min-height: 18px;
  padding-top: 5px;
  color: #7c0000;
  font-weight: 700;
}

.stream-chat.is-locked .stream-chat-list {
  opacity: .9;
}

.stream-chat.is-locked #streamChatForm button,
.stream-chat.is-locked #streamGuestMessage {
  opacity: .55;
}

.stream-obs dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 5px 8px;
  margin: 0 0 10px;
}

.stream-obs dt {
  color: #008c1a;
  font-weight: 700;
}

.stream-obs dd {
  margin: 0;
}

.stream-links {
  display: grid;
  gap: 7px;
}

.stream-links a {
  display: block;
  padding: 7px;
  border: 2px outset #cfcfcf;
  background: #ffffc4;
  color: #0a4010;
}

.stream-page.is-theater .stream-shell {
  width: min(1480px, calc(100vw - 8px));
}

.stream-page.is-theater .stream-side {
  display: none;
}

.stream-page.is-theater .stream-main {
  width: 100%;
}

@media (min-width: 921px) {
  .stream-page.is-theater .stream-shell {
    width: var(--site-width);
    height: var(--site-height);
  }

  .stream-page.is-theater .stream-main {
    width: 100%;
  }
}

@media (max-width: 920px) {
  .stream-shell,
  .stream-shell > tbody,
  .stream-shell > tbody > tr,
  .stream-shell > tbody > tr > td {
    display: block;
    width: auto;
  }

  .stream-shell {
    width: calc(100vw - 8px);
    margin: 4px auto;
    transform: none;
  }

  .stream-main,
  .stream-side {
    padding: 8px;
  }

  .stream-header-grid {
    grid-template-columns: 1fr;
  }

  .stream-live-sign {
    justify-content: space-between;
  }

  .stream-video-frame {
    min-height: 200px;
  }

  .stream-status-strip {
    grid-template-columns: 1fr;
  }

  .stream-chat-list {
    height: 300px;
  }

  .stream-copy h1 {
    font-size: 25px;
  }
}

@media (max-width: 520px) {
  .stream-video-frame {
    min-height: 180px;
  }

  .stream-player-fallback {
    position: static;
    margin-top: 0;
    border-left: 0;
    border-right: 0;
  }

  .stream-toolbar button,
  .stream-toolbar a {
    flex: 1 1 46%;
    text-align: center;
  }

  .stream-obs dl {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 921px) {
  body.stream-page {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8px 0;
    scrollbar-width: none;
  }

  body.stream-page::-webkit-scrollbar {
    display: none;
  }

  .stream-shell,
  .stream-page.is-theater .stream-shell {
    width: var(--site-width);
    height: var(--site-height);
    max-width: none;
    margin: 0 auto;
    table-layout: fixed;
    overflow: hidden;
    transform: scale(var(--stream-desktop-fit, 1));
    transform-origin: top center;
    box-shadow: none;
  }

  .stream-header-grid {
    grid-template-columns: 1fr 182px;
    gap: 8px;
  }

  .stream-page .topbar {
    height: 18px;
    padding: 1px 7px;
  }

  .stream-page .header {
    height: 76px;
    padding: 4px 8px;
  }

  .stream-page .header-gif {
    width: 66px;
    height: 42px;
  }

  .stream-page .css-logo {
    min-height: 42px;
    padding: 2px 12px 5px;
    font-size: 29px;
  }

  .stream-live-sign {
    padding: 5px 7px;
    font-size: 10px;
  }

  .stream-main,
  .stream-side {
    padding: 4px;
  }

  .stream-main {
    width: 636px;
  }

  .stream-side {
    width: 264px;
  }

  .stream-page.is-theater .stream-main {
    width: 100%;
  }

  .stream-video-window,
  .stream-info-window,
  .stream-side .box {
    margin-bottom: 5px;
  }

  .stream-video-frame {
    height: 352px;
    min-height: 0;
  }

  .stream-toolbar {
    gap: 5px;
    padding-top: 5px;
  }

  .stream-toolbar button,
  .stream-toolbar a,
  .stream-status-strip button,
  .stream-obs button,
  .stream-chat form button,
  .stream-auth button {
    padding: 4px 7px;
    font-size: 10px;
    line-height: 1.1;
  }

  .stream-status-strip {
    gap: 5px;
    margin-top: 5px;
    padding: 5px;
    font-size: 10px;
  }

  .stream-copy {
    padding: 7px;
    max-height: 118px;
    overflow: auto;
    font-size: 10px;
    line-height: 1.18;
  }

  .stream-copy h1 {
    margin-bottom: 4px;
    font-size: 21px;
  }

  .stream-copy p {
    margin: 5px 0;
  }

  .stream-auth {
    gap: 5px;
    margin-bottom: 5px;
    padding: 5px;
  }

  .stream-auth input,
  .stream-chat input,
  .stream-chat textarea {
    padding: 5px;
    font-size: 10px;
  }

  .stream-auth-buttons {
    grid-template-columns: 1fr 1fr 46px;
    gap: 4px;
  }

  .stream-chat-list {
    height: 284px;
    padding: 5px;
    font-size: 10px;
    line-height: 1.16;
  }

  .stream-chat textarea {
    min-height: 48px;
  }

  .stream-chat-note {
    min-height: 15px;
    padding-top: 3px;
    font-size: 10px;
  }

  .stream-obs dl {
    grid-template-columns: 58px 1fr;
    gap: 3px 5px;
    margin-bottom: 6px;
    font-size: 10px;
    line-height: 1.15;
  }

  .stream-links {
    gap: 5px;
    font-size: 10px;
  }

  .stream-links a {
    padding: 5px;
  }
}

/* 2026-08-23 v9 final cascade guard: keep stream geometry after legacy blocks. */
@media (min-width: 921px) {
  .stream-compact-page .stream-shell,
  .stream-compact-page.stream-page.is-theater .stream-shell {
    display: block !important;
    width: var(--site-width) !important;
    height: var(--site-height) !important;
    max-width: none !important;
    overflow: hidden !important;
    transform: scale(var(--stream-desktop-fit, 1)) !important;
    transform-origin: top center !important;
  }

  .stream-compact-page .stream-shell > tbody {
    display: grid !important;
    grid-template-columns: 704px 196px !important;
    grid-template-rows: 18px 76px 581px !important;
    width: var(--site-width) !important;
    height: var(--site-height) !important;
  }

  .stream-compact-page .stream-shell > tbody > tr {
    display: contents !important;
  }

  .stream-compact-page .stream-shell td {
    display: block !important;
    box-sizing: border-box !important;
  }

  .stream-compact-page .topbar {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: var(--site-width) !important;
    height: 18px !important;
    padding: 1px 7px !important;
  }

  .stream-compact-page .header {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: var(--site-width) !important;
    height: 76px !important;
    padding: 4px 8px !important;
  }

  .stream-compact-page .stream-main,
  .stream-compact-page.stream-page.is-theater .stream-main {
    grid-column: 1 !important;
    grid-row: 3 !important;
    width: 704px !important;
    height: 581px !important;
    padding: 6px 4px 6px 6px !important;
  }

  .stream-compact-page .stream-side {
    grid-column: 2 !important;
    grid-row: 3 !important;
    width: 196px !important;
    height: 581px !important;
    padding: 6px 6px 6px 4px !important;
  }

  .stream-compact-page .stream-video-window {
    display: grid !important;
    grid-template-rows: 390px 8px 64px 1fr 34px !important;
    width: 100% !important;
    height: 569px !important;
    margin: 0 !important;
    border: 0 !important;
    background: #1fb14c !important;
    overflow: hidden !important;
  }

  .stream-compact-page .stream-video-window .window-title,
  .stream-compact-page .stream-toolbar {
    display: none !important;
  }

  .stream-compact-page .stream-video-frame {
    grid-row: 1 !important;
    width: 100% !important;
    height: 390px !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 9 !important;
    box-sizing: border-box !important;
    border: 4px solid #fff020 !important;
    background: #1fb14c !important;
  }

  .stream-compact-page .stream-broadcast-title {
    grid-row: 3 !important;
    height: 64px !important;
    margin: 0 !important;
    padding: 9px 10px 8px !important;
    box-sizing: border-box !important;
    font-size: 34px !important;
    line-height: 1.05 !important;
  }

  .stream-compact-page .stream-status-strip {
    grid-row: 5 !important;
    display: grid !important;
    grid-template-columns: 170px minmax(0, 1fr) 78px !important;
    gap: 8px !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 6px 8px !important;
    box-sizing: border-box !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 11px !important;
    line-height: 1.15 !important;
  }

  .stream-compact-page .stream-chat {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 569px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border: 3px ridge #8b0018 !important;
    overflow: hidden !important;
  }
}

/* 2026-08-23 v11: restore Digraville retro skin; keep the proportional grid. */
@media (min-width: 921px) {
  .stream-compact-page .stream-video-window {
    display: grid !important;
    grid-template-rows: 20px 390px 8px 64px 1fr 34px !important;
    background: #dcdcdc !important;
    border: 3px ridge #d8d8d8 !important;
    box-shadow: inset 0 0 0 1px #111 !important;
  }

  .stream-compact-page .stream-video-window .window-title {
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 20px !important;
    padding: 1px 6px !important;
    box-sizing: border-box !important;
    border-bottom: 2px ridge #d8d8d8 !important;
    background: #005400 !important;
    color: #f5ffd0 !important;
    font-size: 12px !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
  }

  .stream-compact-page .stream-video-window .win-buttons {
    display: inline-flex !important;
    gap: 2px !important;
  }

  .stream-compact-page .stream-video-frame {
    grid-row: 2 !important;
    border: 3px inset #bfbfbf !important;
    background:
      repeating-linear-gradient(0deg, rgba(157, 255, 92, .07) 0 2px, transparent 2px 5px),
      #1f2422 !important;
  }

  .stream-compact-page .stream-video-frame video {
    background: #050805 !important;
  }

  .stream-compact-page .stream-player-fallback {
    inset: auto 12px 12px 12px !important;
    display: grid !important;
    gap: 6px !important;
    align-items: start !important;
    justify-content: stretch !important;
    padding: 10px !important;
    border: 2px dashed #d8d06d !important;
    background: rgba(255, 255, 194, .94) !important;
    color: #101b10 !important;
    text-align: left !important;
    pointer-events: none !important;
  }

  .stream-compact-page .stream-player-fallback b {
    color: #101b10 !important;
    font-size: 14px !important;
    line-height: 1.15 !important;
    text-transform: none !important;
  }

  .stream-compact-page .stream-player-fallback span {
    max-width: none !important;
    color: #101b10 !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
  }

  .stream-compact-page .stream-broadcast-title {
    grid-row: 4 !important;
    border: 3px inset #e7e28b !important;
    background:
      repeating-linear-gradient(0deg, rgba(0, 90, 0, .05) 0 2px, transparent 2px 4px),
      #ffffc4 !important;
    color: #008c1a !important;
    text-shadow: 2px 2px #fff !important;
  }

  .stream-compact-page .stream-status-strip {
    grid-row: 6 !important;
    grid-template-columns: 166px minmax(0, 1fr) minmax(190px, 260px) !important;
    gap: 6px !important;
    border: 2px inset #b6b6b6 !important;
    background: #ffffc4 !important;
    color: #003c0b !important;
  }

  .stream-compact-page .stream-status-strip span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .stream-compact-page .stream-status-strip b {
    color: #1d1d1d !important;
  }

  .stream-compact-page .stream-status-strip .stream-viewer-row {
    min-width: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
  }

  .stream-compact-page #streamViewerNames {
    display: inline-block !important;
    max-width: 210px !important;
    overflow: hidden !important;
    color: #006018 !important;
    font-style: normal !important;
    text-overflow: ellipsis !important;
    vertical-align: bottom !important;
    white-space: nowrap !important;
  }

  .stream-compact-page .stream-chat {
    background: #dcdcdc !important;
    border: 3px ridge #d8d8d8 !important;
    box-shadow: inset 0 0 0 1px #111 !important;
  }

  .stream-compact-page .stream-chat .box-title {
    display: block !important;
    flex: 0 0 20px !important;
    height: 20px !important;
    padding: 2px 8px !important;
    box-sizing: border-box !important;
    border-bottom: 2px ridge #d8d8d8 !important;
    background: #005400 !important;
    color: #f5ffd0 !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
  }

  .stream-compact-page .stream-auth,
  .stream-compact-page .stream-chat-list,
  .stream-compact-page .stream-chat form,
  .stream-compact-page .stream-chat-note {
    background: #ffffc4 !important;
  }

  .stream-compact-page .stream-chat-list {
    border-top: 2px inset #bfbfbf !important;
    border-bottom: 2px inset #bfbfbf !important;
  }
}

/* 2026-08-23 v14: design audit guard, keeps the 90s skin but stabilizes the room. */
.stream-page,
.stream-shell,
.stream-shell * {
  box-sizing: border-box;
}

.stream-page {
  overflow-x: hidden;
}

.stream-header-grid.stream-header-logo-only {
  grid-template-columns: 1fr !important;
}

.stream-header-logo-only .logo {
  justify-content: center;
  width: 100%;
  min-width: 0;
}

.stream-header-logo-only .css-logo {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.stream-player-fallback.stream-player-offline {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.stream-player-fallback.stream-player-offline #playerFallbackText {
  display: inline-block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  color: #101b10 !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  text-transform: lowercase !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.stream-chat form button,
.stream-auth button {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-chat-popout-link,
.stream-chat-back-link {
  color: #f6ff83;
  text-decoration: underline;
}

.stream-chat-back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: min(260px, calc(100vw - 155px));
  margin-left: auto;
  padding: 1px 7px;
  overflow: hidden;
  border: 1px outset #ffffc4;
  background: #ffffc4;
  color: #003c00;
  font-family: var(--font-bold);
  font-size: 11px;
  line-height: 16px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-chat-back-link::before {
  content: "\2190";
  flex: 0 0 auto;
  color: #8a0000;
}

.stream-chat-popout-link {
  float: right;
  font-family: var(--font);
  font-size: 10px;
  line-height: 1.1;
  white-space: nowrap;
}

.stream-chat-popout-link:hover,
.stream-chat-popout-link:focus {
  color: #ffffff;
}

.stream-chat-back-link:hover,
.stream-chat-back-link:focus {
  color: #8a0000;
}

.stream-chat-back-link:active {
  border-style: inset;
}

.stream-chat-popout-page {
  display: block;
  width: 100vw;
  height: 100vh;
  min-width: 320px;
  min-height: 360px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(157, 255, 92, .06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(157, 255, 92, .04) 1px, transparent 1px),
    #00270f;
  background-size: 16px 16px, 16px 16px, auto;
}

.stream-chat-popout-shell {
  width: 100vw;
  height: 100vh;
  table-layout: fixed;
  border: 4px ridge #d8d8d8;
  background: #dcdcdc;
  color: #101010;
}

.stream-chat-popout-shell .topbar {
  height: 24px;
  padding: 2px 8px;
  background: #004d00;
  color: #f5ffd0;
  border-bottom: 2px ridge #d8d8d8;
  font-size: 13px;
  white-space: nowrap;
}

.stream-chat-popout-shell .topbar b {
  margin-right: 12px;
}

.stream-chat-popout-cell {
  height: calc(100vh - 24px);
  padding: 7px;
  vertical-align: top;
}

.stream-chat-popout-page .stream-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  border: 3px ridge #d8d8d8;
  background: #dcdcdc;
  box-shadow: inset 0 0 0 1px #111;
}

.stream-chat-popout-page .stream-chat .box-title {
  display: flex !important;
  flex: 0 0 24px;
  align-items: center;
  justify-content: space-between;
  height: 24px;
  padding: 3px 8px;
  border-bottom: 2px ridge #d8d8d8;
  background: #005400;
  color: #f5ffd0;
  font-family: var(--font-bold);
  font-size: 14px;
  line-height: 1;
}

.stream-chat-popout-page .stream-chat .box-title span {
  color: #f6ff83;
  font-family: var(--font);
  font-size: 11px;
}

.stream-chat-popout-page .stream-auth {
  flex: 0 0 auto;
  margin: 0;
  padding: 7px;
  background: #ffffc4;
  border-bottom: 2px inset #bfbfbf;
}

.stream-chat-popout-page .stream-auth-state {
  font-size: 13px;
}

.stream-chat-popout-page .stream-auth input,
.stream-chat-popout-page .stream-chat textarea {
  font-size: 14px;
}

.stream-chat-popout-page .stream-auth-buttons {
  grid-template-columns: minmax(70px, 1fr) minmax(118px, 1.4fr) minmax(62px, .8fr);
}

.stream-chat-popout-page .stream-chat-list {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  padding: 10px;
  border: 0;
  border-bottom: 2px inset #bfbfbf;
  background: #ffffc4;
  font-size: 16px;
  line-height: 1.35;
}

.stream-chat-popout-page .stream-chat-entry {
  margin-bottom: 6px;
}

.stream-chat-popout-page .stream-chat form {
  flex: 0 0 auto;
  margin: 0;
  padding: 7px;
  background: #ffffc4;
}

.stream-chat-popout-page .stream-chat textarea {
  min-height: 54px;
  resize: vertical;
}

.stream-chat-popout-page .stream-chat form button,
.stream-chat-popout-page .stream-auth button {
  font-size: 13px;
}

.stream-chat-popout-page .stream-chat-note {
  flex: 0 0 24px;
  min-height: 24px;
  padding: 3px 7px;
  background: #ffffc4;
  font-size: 12px;
}

.stream-top-tab {
  display: inline-block;
  margin-left: 14px;
  padding: 1px 8px 2px;
  color: #003800;
  background: #ffffc7;
  border: 2px outset #ffffe0;
  text-decoration: underline;
  vertical-align: middle;
  white-space: nowrap;
}

.stream-top-tab:hover,
.stream-top-tab:focus {
  color: #9b0000;
  background: #f6ff83;
}

.stream-records-page .stream-shell {
  max-width: 1120px;
}

.stream-records-main {
  padding: 8px;
  background: #d8d8d8;
  border-top: 2px solid #202020;
}

.stream-records-window {
  min-height: 420px;
}

.stream-records-hint {
  margin: 8px 10px 0;
  padding: 6px 8px;
  color: #003800;
  background: #ffffc7;
  border: 1px dashed #b8aa42;
  font-size: 15px;
}

.stream-records-list {
  display: grid;
  gap: 6px;
  margin: 10px;
  padding: 8px;
  min-height: 240px;
  background: #ffffc7;
  border: 2px inset #f7f7d0;
}

.stream-record-item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 7px 8px;
  color: #101010;
  background: #f7f7bd;
  border: 1px solid #868660;
}

.stream-record-date {
  color: #004d00;
  font-family: var(--font-bold);
  white-space: nowrap;
}

.stream-record-meta {
  min-width: 0;
}

.stream-record-meta b,
.stream-record-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-record-meta span {
  color: #555;
  font-size: 13px;
}

.stream-record-actions {
  display: flex;
  gap: 6px;
}

.stream-record-actions a,
.stream-record-actions button {
  display: inline-block;
  padding: 2px 8px;
  color: #003800;
  background: #ffffde;
  border: 2px outset #ffffe0;
  font: inherit;
  text-decoration: underline;
  white-space: nowrap;
}

.stream-record-actions a:active,
.stream-record-actions button:active {
  border-style: inset;
}

.stream-records-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  color: #004d00;
  font-family: var(--font-bold);
  text-align: center;
}

.stream-inline-records {
  margin: 4px 8px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #ffffc4;
  border: 2px inset #b6b6b6;
  color: #003c0b;
}

.stream-inline-records-title {
  height: 16px;
  padding: 1px 6px;
  overflow: hidden;
  color: #f5ffd0;
  background: #005400;
  font-family: var(--font-bold);
  font-size: 11px;
  line-height: 14px;
  white-space: nowrap;
}

.stream-inline-records-list {
  display: flex;
  gap: 5px;
  align-items: stretch;
  min-width: 0;
  min-height: 0;
  height: calc(100% - 16px);
  padding: 4px 5px;
  overflow-x: auto;
  overflow-y: hidden;
}

.stream-inline-record {
  display: grid;
  grid-template-rows: 1fr auto;
  flex: 1 1 auto;
  min-width: 0;
  padding: 3px 5px;
  color: #003800;
  background: #ffffde;
  border: 2px outset #ffffe0;
  text-decoration: none;
}

.stream-inline-record:hover,
.stream-inline-record:focus {
  color: #9b0000;
  text-decoration: underline;
}

.stream-inline-record b,
.stream-inline-record span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-inline-record b {
  font-size: 12px;
}

.stream-inline-record span {
  color: #4a4a30;
  font-size: 10px;
}

.stream-inline-records-empty {
  display: flex;
  align-items: center;
  padding: 0 4px;
  color: #006018;
  font-family: var(--font-bold);
  font-size: 12px;
  white-space: nowrap;
}

.stream-inline-record-item {
  display: flex;
  flex: 0 0 108px;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stream-record-delete {
  cursor: pointer;
}

.stream-inline-record-item .stream-record-delete {
  display: none;
  width: 100%;
  padding: 1px 3px;
  overflow: hidden;
  border: 1px outset #ffffe0;
  background: #ffffc4;
  color: #8a0000;
  font: inherit;
  font-size: 9px;
  line-height: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-inline-record-item:hover .stream-record-delete,
.stream-inline-record-item:focus-within .stream-record-delete {
  display: block;
}

@media (min-width: 921px) {
  .stream-compact-page .stream-shell {
    width: var(--site-width) !important;
    height: var(--site-height) !important;
    max-width: none !important;
  }

  .stream-compact-page .stream-shell > tbody {
    grid-template-columns: 704px 196px !important;
    grid-template-rows: 18px 76px 581px !important;
  }

  .stream-compact-page .stream-video-window {
    grid-template-rows: 20px 390px 8px 64px minmax(0, 1fr) 34px !important;
  }

  .stream-compact-page .stream-video-frame {
    height: 390px !important;
    overflow: hidden !important;
  }

  .stream-compact-page .stream-broadcast-title {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
  }

  .stream-compact-page .stream-status-strip {
    grid-template-columns: 154px 86px minmax(0, 1fr) !important;
    align-items: center !important;
    min-width: 0 !important;
  }

  .stream-compact-page .stream-inline-records {
    grid-row: 5 !important;
    align-self: stretch !important;
  }

  .stream-compact-page #radioNow {
    max-width: none !important;
  }

  .stream-compact-page #streamViewerNames {
    max-width: 420px !important;
  }

  .stream-compact-page #streamUptime {
    color: #006018 !important;
    font-variant-numeric: tabular-nums !important;
  }

  .stream-compact-page .stream-chat {
    min-width: 0 !important;
  }

  .stream-compact-page .stream-auth-buttons {
    grid-template-columns: 42px minmax(76px, 1fr) 36px !important;
    gap: 3px !important;
  }

  .stream-compact-page .stream-auth button {
    padding-left: 2px !important;
    padding-right: 2px !important;
    font-size: 8px !important;
  }

  .stream-compact-page .stream-chat-list {
    overflow-x: hidden !important;
  }
}

@media (max-width: 920px) {
  body.stream-page {
    display: block;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .stream-shell,
  .stream-shell > tbody,
  .stream-shell > tbody > tr,
  .stream-shell > tbody > tr > td {
    max-width: 100%;
  }

  .stream-shell {
    width: min(100%, calc(100vw - 14px)) !important;
    margin: 4px auto !important;
    overflow: hidden;
    box-shadow: 0 0 0 1px #111;
  }

  .stream-main,
  .stream-side {
    width: 100% !important;
    min-width: 0;
  }

  .stream-header-grid {
    gap: 8px;
  }

  .stream-page .logo {
    justify-content: center;
    min-width: 0;
  }

  .stream-page .css-logo {
    max-width: calc(100vw - 138px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .stream-live-sign {
    width: 100%;
    min-width: 0;
  }

  .stream-video-window {
    overflow: hidden;
  }

  .stream-video-frame {
    min-height: 190px;
    overflow: hidden;
  }

  .stream-player-fallback {
    position: absolute !important;
    inset: auto 8px 8px 8px !important;
    max-height: calc(100% - 16px);
    padding: 7px;
    overflow: hidden;
    gap: 4px;
    font-size: 10px;
    line-height: 1.15;
  }

  .stream-player-fallback b,
  .stream-player-fallback span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .stream-player-fallback b {
    font-size: 11px !important;
    line-height: 1.15 !important;
  }

  .stream-player-fallback span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .stream-broadcast-title {
    display: block;
    min-width: 0;
    font-size: clamp(20px, 7vw, 28px);
  }

  .stream-status-strip {
    min-width: 0;
  }

  .stream-status-strip span,
  .stream-status-strip i,
  #streamViewerNames {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .stream-auth-buttons {
    grid-template-columns: minmax(54px, .8fr) minmax(116px, 1.4fr) minmax(54px, .8fr);
  }

  .stream-chat-list {
    overflow-x: hidden;
  }
}

@media (max-width: 420px) {
  .stream-main,
  .stream-side {
    padding-left: 6px;
    padding-right: 6px;
  }

  .stream-auth-buttons {
    grid-template-columns: 1fr;
  }

  .stream-auth button,
  .stream-chat form button {
    min-height: 30px;
  }
}

@media (max-width: 720px) {
  .stream-top-tab {
    margin-left: 8px;
    padding-right: 5px;
    padding-left: 5px;
    font-size: 12px;
  }

  .stream-record-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .stream-record-actions {
    justify-content: flex-start;
  }
}

/* 2026-08-24 v11: final geometry polish for the stream room. */
.stream-page {
  --jec-frame: #d8d8d8;
  --jec-frame-dark: #777;
  --jec-frame-line: #111;
  --jec-titlebar: #005400;
  --jec-panel: #dcdcdc;
  --jec-paper: #ffffc4;
  --jec-inset: #b6b6b6;
  --jec-gap: 8px;
}

.stream-page .stream-shell,
.stream-page .window,
.stream-page .box,
.stream-chat-popout-shell {
  border-radius: 0 !important;
}

.stream-page .stream-shell {
  border: 4px ridge var(--jec-frame) !important;
  background: var(--jec-panel) !important;
  outline: 1px solid var(--jec-frame-line);
}

.stream-page .topbar {
  border-bottom: 2px ridge var(--jec-frame) !important;
}

.stream-page .header {
  border-bottom: 3px ridge var(--jec-frame) !important;
}

.stream-page .stream-video-window,
.stream-page .stream-chat,
.stream-page .stream-records-window,
.stream-chat-popout-page .stream-chat {
  border: 3px ridge var(--jec-frame) !important;
  background: var(--jec-panel) !important;
  outline: 1px solid var(--jec-frame-line);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .75),
    inset -1px -1px 0 rgba(0, 0, 0, .38) !important;
  overflow: hidden !important;
}

.stream-page .window-title,
.stream-page .box-title,
.stream-chat-popout-shell .topbar {
  height: 22px !important;
  min-height: 22px !important;
  padding: 3px 8px !important;
  border-bottom: 2px ridge var(--jec-frame) !important;
  background: var(--jec-titlebar) !important;
  color: #f5ffd0 !important;
  line-height: 14px !important;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .35),
    inset -1px -1px 0 rgba(0, 0, 0, .35);
}

.stream-page .win-buttons {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
}

.stream-page .win-buttons i {
  width: 11px !important;
  height: 11px !important;
  border: 2px outset #e4e4e4 !important;
  background: #005400 !important;
}

.stream-page .stream-video-frame,
.stream-page .stream-broadcast-title,
.stream-page .stream-inline-records,
.stream-page .stream-status-strip,
.stream-page .stream-auth,
.stream-page .stream-chat-list,
.stream-page .stream-chat form,
.stream-page .stream-chat-note,
.stream-page .stream-records-hint,
.stream-page .stream-records-list {
  border: 2px inset var(--jec-inset) !important;
  background-color: var(--jec-paper) !important;
  outline: 1px solid rgba(255, 255, 255, .45);
}

.stream-page .stream-video-frame {
  background-color: #050805 !important;
}

.stream-page .stream-broadcast-title,
.stream-page .stream-inline-records,
.stream-page .stream-status-strip {
  margin-right: var(--jec-gap) !important;
  margin-left: var(--jec-gap) !important;
}

.stream-page .stream-broadcast-title {
  display: flex !important;
  align-items: center !important;
  min-height: 0 !important;
  padding: 0 10px !important;
}

.stream-page .stream-inline-records {
  margin-top: 5px !important;
  margin-bottom: 5px !important;
}

.stream-page .stream-status-strip {
  margin-bottom: var(--jec-gap) !important;
  padding: 5px 7px !important;
}

.stream-page .stream-chat .box-title {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.stream-page .stream-chat-popout-link {
  float: none !important;
  margin-left: 8px !important;
}

.stream-page .stream-auth,
.stream-page .stream-chat-list,
.stream-page .stream-chat form,
.stream-page .stream-chat-note {
  margin-right: 6px !important;
  margin-left: 6px !important;
}

.stream-page .stream-auth {
  margin-top: 6px !important;
}

.stream-page .stream-chat-note {
  margin-bottom: 6px !important;
}

.stream-page .stream-chat-list {
  border-top-width: 2px !important;
  border-bottom-width: 2px !important;
}

.stream-page .stream-auth button,
.stream-page .stream-chat form button,
.stream-page .stream-record-actions a,
.stream-page .stream-record-actions button,
.stream-page .stream-inline-record {
  border: 2px outset #ffffe0 !important;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .75);
}

.stream-dead-link,
.stream-back-link {
  display: inline-block;
  margin-left: 6px;
  padding: 0 5px;
  border: 2px outset #ffffe0;
  background: #fffdd1;
  color: #b00000 !important;
  font-size: 11px;
  line-height: 13px;
  text-decoration: underline;
  text-transform: lowercase;
}

.stream-dead-link:active,
.stream-back-link:active {
  border-style: inset;
}

.stream-bans-page {
  overflow: auto !important;
}

.stream-bans-page .stream-shell {
  width: min(980px, calc(100vw - 18px));
  min-height: 0;
  margin: 12px auto;
  transform: none !important;
}

.stream-bans-main {
  padding: 6px;
}

.stream-bans-window {
  border: 3px ridge var(--jec-frame);
  background: var(--jec-panel);
  outline: 1px solid var(--jec-frame-line);
}

.stream-bans-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin: 7px;
  padding: 7px;
  border: 2px inset var(--jec-inset);
  background: var(--jec-paper);
}

.stream-bans-controls label,
.stream-bans-controls span {
  font-weight: 700;
  color: #004d12;
}

.stream-bans-controls select,
.stream-bans-controls button {
  border: 2px outset #ffffe0;
  background: #fffdd1;
  color: #0a4010;
  font: inherit;
  font-weight: 700;
  padding: 3px 7px;
}

.stream-bans-controls button:active {
  border-style: inset;
}

.stream-bans-list {
  display: grid;
  gap: 7px;
  margin: 7px;
  padding: 7px 7px 10px 32px;
  min-height: 220px;
  border: 2px inset var(--jec-inset);
  background: var(--jec-paper);
}

.stream-ban-card {
  padding: 7px;
  border: 2px dotted #87875c;
  background: #ffffc4;
}

.stream-ban-card.is-active {
  border-color: #b00000;
  background: #fff2a3;
}

.stream-ban-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: baseline;
  margin-bottom: 5px;
}

.stream-ban-number {
  color: #004d12;
}

.stream-ban-nick {
  color: #b00000;
  font-weight: 700;
  text-transform: uppercase;
}

.stream-ban-line code {
  margin-left: auto;
  border: 1px solid #8d8d52;
  background: #f7f7d7;
  color: #7c0000;
  padding: 1px 5px;
}

.stream-ban-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px 9px;
  font-size: 12px;
}

.stream-ban-messages {
  margin-top: 7px;
}

.stream-ban-messages summary {
  cursor: pointer;
  color: #004d12;
  font-weight: 700;
  text-decoration: underline;
}

.stream-bans-message-list {
  display: grid;
  gap: 4px;
  margin: 6px 0 0;
  padding-left: 20px;
}

.stream-bans-message-list li {
  border-top: 1px dotted #87875c;
  padding-top: 4px;
}

.stream-bans-message-list time {
  display: inline-block;
  margin-right: 6px;
  color: #8a1f1f;
  font-size: 11px;
}

.stream-bans-empty {
  color: #7c0000;
  font-weight: 700;
}

@media (min-width: 921px) {
  body.stream-bans-page {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: auto !important;
    padding: 8px 0;
  }

  body.stream-bans-page::-webkit-scrollbar {
    display: initial;
  }

  .stream-bans-page .stream-shell {
    height: auto;
  }
}

@media (max-width: 700px) {
  .stream-ban-meta {
    grid-template-columns: 1fr;
  }

  .stream-ban-line code {
    margin-left: 0;
  }
}

.stream-page .stream-auth button:active,
.stream-page .stream-chat form button:active,
.stream-page .stream-record-actions a:active,
.stream-page .stream-record-actions button:active,
.stream-page .stream-inline-record:active {
  border-style: inset !important;
  box-shadow: none;
}

.stream-chat-popout-page .stream-chat-popout-shell {
  border: 4px ridge var(--jec-frame) !important;
  background: transparent !important;
  outline: 1px solid var(--jec-frame-line);
}

.stream-chat-popout-page .stream-chat-popout-cell {
  padding: var(--jec-gap) !important;
}

.stream-chat-popout-page .stream-chat-list {
  margin-top: 6px !important;
}

@media (min-width: 921px) {
  .stream-compact-page .stream-shell > tbody {
    grid-template-columns: 704px 196px !important;
    grid-template-rows: 18px 76px 581px !important;
  }

  .stream-compact-page .stream-main,
  .stream-compact-page .stream-side {
    padding: 6px !important;
  }

  .stream-compact-page .stream-video-window {
    grid-template-rows: 22px 386px 6px 62px minmax(0, 1fr) 32px !important;
    height: 569px !important;
  }

  .stream-compact-page .stream-video-frame {
    margin: 7px 8px 0 !important;
  }

  .stream-compact-page .stream-chat {
    height: 569px !important;
  }

  .stream-compact-page .stream-chat .box-title {
    flex: 0 0 22px !important;
  }
}

@media (max-width: 920px) {
  .stream-page .stream-shell {
    border-width: 3px !important;
  }

  .stream-page .stream-video-window,
  .stream-page .stream-chat,
  .stream-page .stream-records-window {
    border-width: 3px !important;
  }

  .stream-page .stream-broadcast-title,
  .stream-page .stream-inline-records,
  .stream-page .stream-status-strip,
  .stream-page .stream-auth,
  .stream-page .stream-chat-list,
  .stream-page .stream-chat form,
  .stream-page .stream-chat-note {
    margin-right: 6px !important;
    margin-left: 6px !important;
  }
}

/* 2026-08-24 v12: flatter stream room, fewer nested frames, more usable space. */
.stream-page {
  --jec-gap: 3px;
}

.stream-page .stream-shell {
  border: 2px solid #cfcfcf !important;
  outline: 1px solid #101010 !important;
  box-shadow: none !important;
}

.stream-page .topbar,
.stream-page .header {
  border-bottom: 1px solid #101010 !important;
}

.stream-page .stream-donate-link {
  display: inline-block;
  margin-left: 8px;
  padding: 0 5px;
  border: 1px outset #ffffc4;
  background: #ffffc4;
  color: #8a0000;
  font-family: var(--font-bold);
  font-size: 11px;
  line-height: 13px;
  text-decoration: underline;
  text-transform: uppercase;
  vertical-align: 1px;
  white-space: nowrap;
}

.stream-page .stream-donate-link:active {
  border-style: inset;
}

.stream-page .stream-video-window,
.stream-page .stream-chat {
  border: 1px solid #101010 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.stream-page .window-title,
.stream-page .box-title {
  height: 18px !important;
  min-height: 18px !important;
  padding: 2px 6px !important;
  border-bottom: 1px solid #101010 !important;
  line-height: 13px !important;
}

.stream-page .win-buttons {
  gap: 2px !important;
}

.stream-page .win-buttons i {
  width: 9px !important;
  height: 9px !important;
  border-width: 1px !important;
}

.stream-page .stream-video-frame,
.stream-page .stream-broadcast-title,
.stream-page .stream-inline-records,
.stream-page .stream-status-strip,
.stream-page .stream-auth,
.stream-page .stream-chat-list,
.stream-page .stream-chat form,
.stream-page .stream-chat-note {
  outline: 0 !important;
  box-shadow: none !important;
}

.stream-page .stream-broadcast-title,
.stream-page .stream-inline-records,
.stream-page .stream-status-strip,
.stream-page .stream-auth,
.stream-page .stream-chat form,
.stream-page .stream-chat-note {
  border: 0 !important;
}

.stream-page .stream-auth,
.stream-page .stream-chat-list,
.stream-page .stream-chat form,
.stream-page .stream-chat-note {
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.stream-page .stream-chat-list {
  border: 1px solid #777 !important;
}

.stream-page .stream-auth button,
.stream-page .stream-chat form button,
.stream-page .stream-record-actions a,
.stream-page .stream-record-actions button,
.stream-page .stream-inline-record {
  border-width: 1px !important;
}

@media (min-width: 921px) {
  .stream-compact-page .stream-shell > tbody {
    grid-template-columns: 675px 225px !important;
    grid-template-rows: 16px 58px 601px !important;
  }

  .stream-compact-page .topbar {
    height: 16px !important;
    padding: 0 6px !important;
    font-size: 11px !important;
    line-height: 15px !important;
  }

  .stream-compact-page .stream-donate-link {
    margin-left: 6px !important;
    padding: 0 4px !important;
    font-size: 10px !important;
    line-height: 12px !important;
  }

  .stream-compact-page .header {
    height: 58px !important;
    padding: 3px 6px !important;
  }

  .stream-compact-page .css-logo {
    min-height: 40px !important;
    padding: 2px 12px 4px !important;
    font-size: 28px !important;
  }

  .stream-compact-page .stream-main,
  .stream-compact-page.stream-page.is-theater .stream-main {
    width: 675px !important;
    height: 601px !important;
    padding: 3px !important;
  }

  .stream-compact-page .stream-side {
    width: 225px !important;
    height: 601px !important;
    padding: 3px !important;
  }

  .stream-compact-page .stream-video-window {
    grid-template-rows: 18px 410px 42px minmax(0, 1fr) 26px !important;
    height: 595px !important;
  }

  .stream-compact-page .stream-video-frame {
    grid-row: 2 !important;
    height: 410px !important;
    margin: 2px 2px 0 !important;
    border: 2px solid #fff020 !important;
    background:
      repeating-linear-gradient(0deg, rgba(157, 255, 92, .07) 0 2px, transparent 2px 5px),
      #1f2422 !important;
  }

  .stream-compact-page .stream-player-fallback {
    inset: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #1fb14c !important;
    text-align: center !important;
  }

  .stream-compact-page .stream-broadcast-title {
    grid-row: 3 !important;
    height: 42px !important;
    margin: 0 2px !important;
    padding: 3px 6px !important;
    font-size: 28px !important;
    line-height: 1 !important;
  }

  .stream-compact-page .stream-inline-records {
    grid-row: 4 !important;
    margin: 0 2px !important;
  }

  .stream-compact-page .stream-inline-records-title {
    height: 14px !important;
    padding: 0 5px !important;
    font-size: 10px !important;
    line-height: 14px !important;
  }

  .stream-compact-page .stream-inline-records-list {
    height: calc(100% - 14px) !important;
    padding: 2px 3px !important;
    gap: 3px !important;
  }

  .stream-compact-page .stream-inline-record {
    flex-basis: 96px !important;
    padding: 2px 4px !important;
  }

  .stream-compact-page .stream-inline-record-item {
    flex-basis: 96px !important;
  }

  .stream-compact-page .stream-status-strip {
    grid-row: 5 !important;
    grid-template-columns: 130px 70px minmax(0, 1fr) !important;
    gap: 4px !important;
    height: 26px !important;
    margin: 0 2px 2px !important;
    padding: 2px 4px !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
  }

  .stream-compact-page #streamViewerNames {
    max-width: none !important;
  }

  .stream-compact-page .stream-chat {
    height: 595px !important;
  }

  .stream-compact-page .stream-chat .box-title {
    flex: 0 0 18px !important;
    height: 18px !important;
    padding: 2px 5px !important;
    font-size: 11px !important;
    line-height: 13px !important;
  }

  .stream-compact-page .stream-chat-popout-link {
    margin-left: 4px !important;
    font-size: 9px !important;
  }

  .stream-compact-page .stream-auth {
    gap: 3px !important;
    margin: 0 !important;
    padding: 3px !important;
    border-bottom: 1px solid #8d8d52 !important;
  }

  .stream-compact-page .stream-auth-state {
    font-size: 10px !important;
    line-height: 1.1 !important;
  }

  .stream-compact-page .stream-auth form {
    gap: 3px !important;
  }

  .stream-compact-page .stream-auth input,
  .stream-compact-page .stream-chat textarea {
    padding: 3px !important;
    border-width: 1px !important;
    font-size: 10px !important;
  }

  .stream-compact-page .stream-auth-buttons {
    grid-template-columns: 42px minmax(84px, 1fr) 36px !important;
    gap: 2px !important;
  }

  .stream-compact-page .stream-auth button,
  .stream-compact-page .stream-chat form button {
    min-height: 20px !important;
    padding: 2px 3px !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
  }

  .stream-compact-page .stream-chat-list {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 3px 4px !important;
    font-size: 10px !important;
    line-height: 1.14 !important;
  }

  .stream-compact-page .stream-chat-entry {
    padding: 2px 0 !important;
  }

  .stream-compact-page .stream-chat-entry.is-admin,
  .stream-compact-page .stream-chat-entry.is-moderation {
    margin: 2px 0 !important;
    padding: 3px !important;
    border-width: 1px !important;
  }

  .stream-compact-page .stream-chat form {
    gap: 3px !important;
    margin: 0 !important;
    padding: 3px !important;
    border-top: 1px solid #8d8d52 !important;
  }

  .stream-compact-page .stream-chat textarea {
    min-height: 42px !important;
    resize: none !important;
  }

  .stream-compact-page .stream-chat-note {
    flex: 0 0 14px !important;
    min-height: 14px !important;
    margin: 0 !important;
    padding: 1px 4px !important;
    font-size: 9px !important;
    line-height: 12px !important;
  }
}

@media (max-width: 920px) {
  .stream-page .stream-shell {
    width: min(100%, calc(100vw - 8px)) !important;
    margin: 2px auto !important;
    border-width: 1px !important;
  }

  .stream-page .stream-video-window,
  .stream-page .stream-chat,
  .stream-page .stream-records-window {
    border-width: 1px !important;
  }

  .stream-main,
  .stream-side {
    padding: 3px !important;
  }

  .stream-page .header {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }

  .stream-page .stream-donate-link {
    margin-left: 5px !important;
    padding: 0 4px !important;
    font-size: 10px !important;
  }

  .stream-page .stream-video-frame,
  .stream-page .stream-broadcast-title,
  .stream-page .stream-inline-records,
  .stream-page .stream-status-strip {
    margin-right: 3px !important;
    margin-left: 3px !important;
  }

  .stream-page .stream-video-frame {
    border-width: 2px !important;
  }

  .stream-page .stream-auth,
  .stream-page .stream-chat-list,
  .stream-page .stream-chat form,
  .stream-page .stream-chat-note {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }
}

/* 2026-08-24 v14: stream.html audit fixes, stable topbar and safer focus states. */
.stream-page .topbar {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

.stream-page .topbar .led,
.stream-page .topbar > b,
.stream-page .stream-donate-link {
  flex: 0 0 auto !important;
}

.stream-page .stream-donate-link {
  margin-left: 0 !important;
}

.stream-page .topbar-marquee {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.stream-page a:focus-visible,
.stream-page button:focus-visible,
.stream-page input:focus-visible,
.stream-page textarea:focus-visible {
  outline: 2px solid #f6ff83 !important;
  outline-offset: 1px !important;
}

.stream-chat-entry a {
  color: #003c9e;
  text-decoration: underline;
}

.stream-chat-entry a:visited {
  color: #5a008a;
}

.stream-video-frame video {
  display: block;
}

@media (max-width: 420px) {
  .stream-page .topbar {
    gap: 4px !important;
  }

  .stream-page .topbar > b {
    max-width: 100px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

/* 2026-08-24 v15: restore dark Digraville screen for offline stream state. */
.stream-compact-page .stream-video-frame,
.stream-page .stream-video-frame {
  background:
    repeating-linear-gradient(0deg, rgba(157, 255, 92, .09) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(157, 255, 92, .035) 0 1px, transparent 1px 8px),
    #07110c !important;
}

.stream-compact-page .stream-player-fallback,
.stream-player-fallback.stream-player-offline {
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 0 !important;
  background:
    radial-gradient(circle at 50% 45%, rgba(157, 255, 92, .08), transparent 42%),
    repeating-linear-gradient(0deg, rgba(157, 255, 92, .08) 0 1px, transparent 1px 5px),
    #07110c !important;
  color: #eaff89 !important;
  text-align: center !important;
}

.stream-player-fallback.stream-player-offline #playerFallbackText {
  color: #eaff89 !important;
  font-family: var(--font-bold);
  font-size: 25px !important;
  line-height: 1 !important;
  text-shadow: 2px 2px 0 #003b12 !important;
}

/* 2026-08-24 v16: donate button lives in the player titlebar. */
.stream-page .stream-window-heading {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-width: 0 !important;
}

.stream-page .window-title .stream-donate-link {
  margin-left: 0 !important;
  padding: 0 5px !important;
  border-color: #f6ff83 !important;
  background: #ffffc4 !important;
  color: #8a0000 !important;
  font-size: 10px !important;
  line-height: 12px !important;
  vertical-align: 0 !important;
}

@media (max-width: 420px) {
  .stream-page .stream-window-heading {
    gap: 4px !important;
  }

  .stream-page .window-title .stream-donate-link {
    padding: 0 3px !important;
    font-size: 9px !important;
  }
}

/* 2026-08-24 v17: keep Syzran date/time readable in the stream status row. */
@media (min-width: 921px) {
  .stream-compact-page .stream-status-strip {
    grid-template-columns: 168px 78px minmax(0, 1fr) !important;
  }

  .stream-compact-page .stream-status-strip span:first-child {
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .stream-compact-page #streamDateLine,
  .stream-compact-page #streamUptime {
    font-variant-numeric: tabular-nums !important;
    white-space: nowrap !important;
  }

  .stream-compact-page .stream-status-strip .stream-viewer-row {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

@media (max-width: 520px) {
  .stream-status-strip {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }
}

/* 2026-08-24 v18: remove the old yellow debug-style outline from the stream screen. */
.stream-page .stream-video-frame,
.stream-compact-page .stream-video-frame {
  border: 2px inset #465b49 !important;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .18),
    inset -1px -1px 0 rgba(0, 0, 0, .78) !important;
}

.stream-page .stream-video-frame.is-online,
.stream-compact-page .stream-video-frame.is-online {
  border-color: #465b49 !important;
}

/* 2026-08-24 v19: stream.html visual audit cleanup. */
.stream-page .topbar > b {
  margin-right: 6px !important;
}

.stream-page .topbar-marquee {
  color: #ffff00 !important;
  font-size: 10px !important;
  line-height: 15px !important;
}

.stream-page .topbar-marquee span {
  display: inline-block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  vertical-align: top !important;
}

.stream-page .stream-broadcast-title {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  letter-spacing: 0 !important;
}

.stream-player-fallback.stream-player-offline #playerFallbackText {
  font-size: 24px !important;
  line-height: 26px !important;
}

/* 2026-08-26 audit1: keep hidden honeypot and marquee from tripping mobile layout. */
.stream-page .stream-hp {
  position: absolute !important;
  left: auto !important;
  right: auto !important;
  top: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  max-width: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.stream-page .topbar-marquee {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.stream-page .topbar-marquee > span {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (max-width: 920px) {
  .stream-page .topbar {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
  }

  .stream-page .topbar b {
    flex: 0 0 auto !important;
    max-width: 128px !important;
    margin-right: 8px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .stream-page .topbar-marquee {
    flex: 1 1 auto !important;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .stream-page .topbar-marquee span,
  .stream-page .topbar-marquee > span {
    display: block !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    animation: none !important;
  }
}

/* 2026-08-26 1024-fit-final: keep 1024x768 as a complete two-column desktop layout. */
@media (min-width: 921px) and (max-width: 1100px) {
  body.stream-page {
    --stream-skin-width: 1024px !important;
    --stream-skin-height: 720px !important;
    --stream-side-width: 252px !important;
  }

  .stream-compact-page .stream-shell,
  .stream-compact-page.stream-page.is-theater .stream-shell,
  .stream-records-page .stream-shell,
  .stream-bans-page .stream-shell,
  .stream-chat-popout-page .stream-chat-popout-shell {
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
    min-height: 0 !important;
    max-width: none !important;
    overflow: hidden !important;
  }

  .stream-compact-page .stream-shell > tbody {
    display: grid !important;
    grid-template-columns: calc(var(--stream-skin-width) - var(--stream-side-width)) var(--stream-side-width) !important;
    grid-template-rows: 18px 62px calc(var(--stream-skin-height) - 80px) !important;
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
  }

  .stream-compact-page .topbar,
  .stream-compact-page .header,
  .stream-records-page .topbar,
  .stream-bans-page .topbar,
  .stream-chat-popout-page .topbar,
  .stream-records-page .header,
  .stream-bans-page .header {
    width: var(--stream-skin-width) !important;
  }

  .stream-compact-page .stream-main,
  .stream-compact-page.stream-page.is-theater .stream-main {
    width: calc(var(--stream-skin-width) - var(--stream-side-width)) !important;
    height: calc(var(--stream-skin-height) - 80px) !important;
  }

  .stream-compact-page .stream-side {
    width: var(--stream-side-width) !important;
    height: calc(var(--stream-skin-height) - 80px) !important;
  }

  .stream-compact-page .stream-video-window {
    width: 100% !important;
    height: calc(var(--stream-skin-height) - 88px) !important;
  }

  .stream-compact-page .stream-video-frame {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    max-height: 432px !important;
  }

  .stream-compact-page .stream-chat {
    width: 100% !important;
    height: calc(var(--stream-skin-height) - 88px) !important;
  }

  .stream-records-page .stream-shell > tbody,
  .stream-bans-page .stream-shell > tbody {
    display: grid !important;
    grid-template-rows: 18px 62px calc(var(--stream-skin-height) - 80px) !important;
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell > tbody {
    display: grid !important;
    grid-template-rows: 18px calc(var(--stream-skin-height) - 18px) !important;
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
  }

  .stream-records-main,
  .stream-bans-main,
  .stream-chat-popout-cell {
    width: var(--stream-skin-width) !important;
    height: calc(var(--stream-skin-height) - 80px) !important;
  }

  .stream-records-window,
  .stream-bans-window,
  .stream-chat-popout-page .stream-chat {
    width: 100% !important;
    height: calc(var(--stream-skin-height) - 88px) !important;
  }

  .stream-page .stream-shell td.topbar,
  .stream-chat-popout-page .stream-chat-popout-shell td.topbar {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .stream-page .stream-shell td.topbar .topbar-marquee,
  .stream-chat-popout-page .stream-chat-popout-shell td.topbar .topbar-marquee {
    flex: 1 1 auto !important;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .stream-page .stream-shell td.topbar .topbar-marquee span,
  .stream-page .stream-shell td.topbar .topbar-marquee > span,
  .stream-chat-popout-page .stream-chat-popout-shell td.topbar .topbar-marquee span,
  .stream-chat-popout-page .stream-chat-popout-shell td.topbar .topbar-marquee > span {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    animation: none !important;
  }
}

/* 2026-08-26 1024-fit: make every stream page fit cleanly in 1024x768. */
@media (min-width: 921px) and (max-width: 1100px) {
  body.stream-page {
    --stream-skin-width: 1024px;
    --stream-skin-height: 720px;
    --stream-side-width: 252px;
  }

  .stream-compact-page .stream-shell,
  .stream-compact-page.stream-page.is-theater .stream-shell,
  .stream-records-page .stream-shell,
  .stream-bans-page .stream-shell,
  .stream-chat-popout-page .stream-chat-popout-shell {
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
    max-width: none !important;
    overflow: hidden !important;
  }

  .stream-compact-page .stream-shell > tbody {
    grid-template-columns: calc(var(--stream-skin-width) - var(--stream-side-width)) var(--stream-side-width) !important;
    grid-template-rows: 18px 62px calc(var(--stream-skin-height) - 80px) !important;
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
  }

  .stream-compact-page .stream-main,
  .stream-compact-page.stream-page.is-theater .stream-main {
    width: calc(var(--stream-skin-width) - var(--stream-side-width)) !important;
    height: calc(var(--stream-skin-height) - 80px) !important;
  }

  .stream-compact-page .stream-side {
    width: var(--stream-side-width) !important;
    height: calc(var(--stream-skin-height) - 80px) !important;
  }

  .stream-compact-page .stream-video-frame {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    max-height: 432px !important;
  }

  .stream-compact-page .stream-video-window {
    height: calc(var(--stream-skin-height) - 88px) !important;
  }

  .stream-compact-page .stream-chat {
    height: calc(var(--stream-skin-height) - 88px) !important;
  }

  .stream-records-page .stream-shell > tbody,
  .stream-bans-page .stream-shell > tbody {
    grid-template-rows: 18px 62px calc(var(--stream-skin-height) - 80px) !important;
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell > tbody {
    grid-template-rows: 18px calc(var(--stream-skin-height) - 18px) !important;
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
  }

  .stream-records-page .topbar,
  .stream-bans-page .topbar,
  .stream-chat-popout-page .topbar,
  .stream-records-page .header,
  .stream-bans-page .header {
    width: var(--stream-skin-width) !important;
  }

  .stream-records-main,
  .stream-bans-main,
  .stream-chat-popout-cell {
    width: var(--stream-skin-width) !important;
  }

  .stream-records-window,
  .stream-bans-window,
  .stream-chat-popout-page .stream-chat {
    height: calc(var(--stream-skin-height) - 88px) !important;
  }
}

.stream-chat.is-locked #streamChatForm button,
.stream-chat.is-locked #streamGuestMessage {
  opacity: .7 !important;
}

@media (min-width: 921px) {
  .stream-compact-page .stream-video-window {
    grid-template-rows: 18px 414px 40px minmax(0, 1fr) 28px !important;
  }

  .stream-compact-page .stream-video-frame {
    height: 414px !important;
  }

  .stream-compact-page .stream-broadcast-title {
    height: 40px !important;
    padding: 3px 8px !important;
    font-size: 26px !important;
    line-height: 1 !important;
  }

  .stream-compact-page .stream-inline-records-list {
    align-items: center !important;
  }

  .stream-compact-page .stream-inline-records-empty {
    min-height: 100% !important;
    align-items: center !important;
    opacity: .9 !important;
  }

  .stream-compact-page .stream-status-strip {
    grid-template-columns: 172px 92px minmax(0, 1fr) !important;
    gap: 6px !important;
    height: 28px !important;
    padding: 3px 6px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  .stream-compact-page .stream-status-strip span:nth-child(2) {
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .stream-compact-page .stream-status-strip .stream-viewer-row {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
  }

  .stream-compact-page #streamViewerNames {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 920px) {
  .stream-page .stream-broadcast-title {
    white-space: normal !important;
    font-size: 22px !important;
    line-height: 1.1 !important;
  }
}

/* 2026-08-24 v22: a live video must hide the offline overlay even after later
   compact-page fallback rules force it visible with !important. */
.stream-video-frame.is-online .stream-player-fallback,
.stream-compact-page .stream-video-frame.is-online .stream-player-fallback,
.stream-player-fallback.stream-player-offline[hidden] {
  display: none !important;
}

/* 2026-08-24 v24: keep stream recordings as a compact strip, not stretched tiles. */
.stream-inline-records-list {
  align-items: center !important;
}

.stream-inline-record-item {
  flex: 0 0 124px !important;
  align-self: center !important;
  height: auto !important;
}

.stream-inline-record {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  grid-template-rows: none !important;
  flex: 0 0 auto !important;
  height: 24px !important;
  box-sizing: border-box !important;
  padding: 2px 5px !important;
}

.stream-inline-record b {
  flex: 0 0 auto !important;
  font-size: 10px !important;
  line-height: 14px !important;
}

.stream-inline-record span {
  flex: 0 0 auto !important;
  font-size: 9px !important;
  line-height: 14px !important;
}

@media (min-width: 921px) {
  .stream-compact-page .stream-video-window {
    grid-template-rows: 18px minmax(0, 1fr) 40px 40px 28px !important;
  }

  .stream-compact-page .stream-video-frame {
    height: auto !important;
  }

  .stream-compact-page .stream-inline-records {
    grid-row: 4 !important;
    align-self: stretch !important;
    overflow: hidden !important;
  }

  .stream-compact-page .stream-inline-records-list {
    height: calc(100% - 14px) !important;
    padding: 1px 4px !important;
    gap: 4px !important;
  }
}

/* 2026-08-24 v25: geometry pass for stream.html.
   The media row owns the spare height; lower strips stay compact and aligned. */
@media (min-width: 921px) {
  .stream-compact-page .stream-video-window {
    grid-template-rows: 18px minmax(0, 1fr) 40px 40px 28px !important;
    overflow: hidden !important;
  }

  .stream-compact-page .stream-video-frame {
    grid-row: 2 !important;
    align-self: stretch !important;
    height: 100% !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    margin: 2px 2px 0 !important;
    overflow: hidden !important;
  }

  .stream-compact-page .stream-video-frame video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background: #050805 !important;
  }

  .stream-compact-page .stream-broadcast-title {
    grid-row: 3 !important;
    height: 40px !important;
    margin: 0 2px !important;
    padding: 3px 8px !important;
  }

  .stream-compact-page .stream-inline-records {
    grid-row: 4 !important;
    height: 40px !important;
    margin: 0 2px !important;
  }

  .stream-compact-page .stream-status-strip {
    grid-row: 5 !important;
    height: 28px !important;
    margin: 0 2px 2px !important;
  }

  .stream-inline-record-item {
    flex-basis: 112px !important;
  }

  .stream-inline-record {
    height: 22px !important;
    gap: 4px !important;
    padding: 1px 4px !important;
  }

  .stream-inline-record b {
    font-size: 9px !important;
    line-height: 13px !important;
  }

  .stream-inline-record span {
    font-size: 8px !important;
    line-height: 13px !important;
  }
}

/* 2026-08-24 v27: remove the permanent black letterbox around the OBS picture. */
.stream-page .stream-video-frame,
.stream-compact-page .stream-video-frame,
.stream-page .stream-video-frame.is-online,
.stream-compact-page .stream-video-frame.is-online {
  background: #06150b !important;
}

.stream-page .stream-video-frame video,
.stream-compact-page .stream-video-frame video {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  background: transparent !important;
}

/* 2026-08-24 v28: titlebar action buttons use one pixel style. */
.stream-page .window-title .stream-window-heading {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.stream-page .window-title .stream-donate-link,
.stream-page .window-title .stream-records-link,
.stream-page .window-title .stream-dead-link,
.stream-page .window-title .stream-back-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  height: 16px !important;
  min-height: 16px !important;
  margin: 0 !important;
  padding: 0 6px !important;
  border: 2px outset #ffffe0 !important;
  background: #fffdd1 !important;
  color: #8a0000 !important;
  font-family: var(--font-bold) !important;
  font-size: 10px !important;
  line-height: 10px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-decoration: underline !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .75) !important;
}

.stream-page .window-title .stream-donate-link:active,
.stream-page .window-title .stream-records-link:active,
.stream-page .window-title .stream-dead-link:active,
.stream-page .window-title .stream-back-link:active {
  border-style: inset !important;
  box-shadow: none !important;
}

/* 2026-08-24 v29: the OBS viewport itself is fixed to 16:9. */
@media (min-width: 921px) {
  .stream-compact-page .stream-video-window {
    grid-template-rows: 18px auto 40px minmax(0, 1fr) 28px !important;
  }

  .stream-compact-page .stream-video-frame {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    align-self: start !important;
    justify-self: stretch !important;
  }

  .stream-compact-page .stream-video-frame video {
    object-fit: contain !important;
  }
}

@media (max-width: 920px) {
  .stream-page .stream-video-frame {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
  }

  .stream-page .stream-video-frame video {
    object-fit: contain !important;
  }
}

/* 2026-08-24 v30: recordings moved to /stream-records.html, no inline archive strip. */
.stream-page .window-title .stream-records-link {
  color: #8a0000 !important;
}

.stream-page .stream-inline-records {
  display: none !important;
}

@media (min-width: 921px) {
  .stream-compact-page .stream-video-window {
    grid-template-rows: 18px auto 40px 28px !important;
  }

  .stream-compact-page .stream-status-strip {
    grid-row: 4 !important;
  }
}

/* 2026-08-24 v33: Video.js/VHS is the only stream playback engine. */
.stream-page .stream-video-frame .video-js,
.stream-compact-page .stream-video-frame .video-js {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-family: var(--font-main) !important;
  font-size: inherit !important;
  line-height: inherit !important;
  overflow: hidden !important;
}

.stream-page .stream-video-frame .video-js .vjs-tech,
.stream-compact-page .stream-video-frame .video-js .vjs-tech,
.stream-page .stream-video-frame video.vjs-tech,
.stream-compact-page .stream-video-frame video.vjs-tech {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: #000 !important;
}

.stream-page .stream-video-frame .vjs-control-bar,
.stream-compact-page .stream-video-frame .vjs-control-bar,
.stream-page .stream-video-frame .vjs-big-play-button,
.stream-compact-page .stream-video-frame .vjs-big-play-button,
.stream-page .stream-video-frame .vjs-loading-spinner,
.stream-compact-page .stream-video-frame .vjs-loading-spinner,
.stream-page .stream-video-frame .vjs-modal-dialog,
.stream-compact-page .stream-video-frame .vjs-modal-dialog {
  display: none !important;
}

.stream-page .stream-video-frame.is-online .video-js,
.stream-compact-page .stream-video-frame.is-online .video-js {
  background: #000 !important;
}

/* 2026-08-24 v35: keep the stream window tight around the 16:9 player. */
@media (min-width: 921px) {
  .stream-compact-page .stream-video-window {
    align-self: start !important;
    height: auto !important;
    min-height: 0 !important;
    grid-template-rows: 18px auto 40px 28px !important;
  }

  .stream-compact-page .stream-video-frame {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    min-height: 0 !important;
    align-self: start !important;
  }
}

/* 2026-08-26 v36: make stream.html use the same skin geometry as the main page. */
body.stream-page {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  color: #000 !important;
  font: 12px/1.22 var(--retro-font) !important;
  background-color: var(--green-deep) !important;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .2) 0 1px, transparent 1px 6px) !important;
  background-size: auto !important;
}

@media (min-aspect-ratio: 4 / 3) and (min-width: 900px) {
  body.stream-page {
    min-height: 100vh !important;
    padding: 12px 0 !important;
    background-image:
      linear-gradient(90deg, rgba(0, 0, 0, .45), transparent 14%, transparent 86%, rgba(0, 0, 0, .45)),
      repeating-linear-gradient(45deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 8px),
      repeating-linear-gradient(0deg, rgba(0, 0, 0, .2) 0 1px, transparent 1px 6px) !important;
  }
}

.stream-page .stream-shell,
.stream-page .stream-shell * {
  box-sizing: border-box !important;
  font-family: var(--retro-font) !important;
  letter-spacing: 0 !important;
}

.stream-page .stream-shell {
  width: var(--site-width) !important;
  height: var(--site-height) !important;
  max-width: 100vw !important;
  margin: 0 auto !important;
  table-layout: fixed !important;
  border: var(--border-panel) ridge var(--chrome) !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: var(--chrome) !important;
  box-shadow: none !important;
}

.stream-page .topbar {
  display: block !important;
  box-sizing: border-box !important;
  height: 22px !important;
  min-height: 0 !important;
  padding: 2px var(--space-2) !important;
  overflow: hidden !important;
  color: #fff !important;
  background: var(--green-panel) !important;
  border-bottom: 2px solid #000 !important;
  font: 12px var(--retro-font) !important;
  line-height: normal !important;
  white-space: nowrap !important;
}

.stream-page .topbar b {
  display: inline-block !important;
  max-width: none !important;
  margin-right: 20px !important;
  overflow: visible !important;
  color: #fff !important;
  text-overflow: clip !important;
}

.stream-page .topbar-marquee {
  position: relative !important;
  display: inline-block !important;
  width: 570px !important;
  max-width: calc(100% - 150px) !important;
  overflow: hidden !important;
  color: #ffff00 !important;
  font-size: inherit !important;
  line-height: normal !important;
  text-overflow: clip !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

.stream-page .topbar-marquee span {
  display: inline-block !important;
  min-width: 100% !important;
  max-width: none !important;
  padding-left: 100% !important;
  overflow: visible !important;
  text-overflow: clip !important;
  animation: topbarTicker 24s linear infinite !important;
}

.stream-page .header {
  box-sizing: border-box !important;
  height: 58px !important;
  padding: 5px 8px !important;
  color: #fff !important;
  border-bottom: 2px solid #000 !important;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .08) 0 1px, transparent 1px 6px),
    #00501a !important;
}

.stream-page .stream-header-grid,
.stream-page .stream-header-grid.stream-header-logo-only {
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-items: center !important;
  width: 100% !important;
  height: 100% !important;
  gap: 8px !important;
}

.stream-page .stream-header-logo-only .logo,
.stream-page .logo {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  gap: 8px !important;
}

.stream-page .css-logo {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 58px !important;
  max-width: min(470px, calc(100vw - 330px)) !important;
  margin-right: auto !important;
  margin-left: auto !important;
  padding: 3px 14px 6px !important;
  color: #dfff62 !important;
  background: linear-gradient(#0a6b21, #004414 58%, #002d0d) !important;
  border: 3px solid #0b2a0d !important;
  border-top-color: #8dff41 !important;
  border-left-color: #50b936 !important;
  box-shadow:
    inset 0 0 0 3px #00651d,
    inset 0 -5px 0 #001f08,
    4px 4px 0 #001304,
    7px 7px 0 rgba(0, 0, 0, .45) !important;
  font: 900 35px/.92 var(--retro-title-font) !important;
  text-align: center !important;
  text-transform: uppercase !important;
  text-shadow:
    2px 0 0 #002b0b,
    -2px 0 0 #002b0b,
    0 2px 0 #002b0b,
    0 -2px 0 #002b0b,
    4px 4px 0 #001704,
    0 0 8px rgba(223, 255, 98, .35) !important;
  white-space: nowrap !important;
}

.stream-page .stream-main,
.stream-page .stream-side {
  box-sizing: border-box !important;
  padding: var(--space-1) !important;
  vertical-align: top !important;
  background: #dcdcdc !important;
}

.stream-page .stream-side {
  background: #d0d0d0 !important;
  border-left: 2px ridge #fff !important;
}

.stream-page .stream-video-window,
.stream-page .stream-chat,
.stream-page .stream-records-window {
  margin-bottom: var(--space-1) !important;
  border: var(--border-ui) ridge #fff !important;
  border-right-color: #777 !important;
  border-bottom-color: #777 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: var(--panel-gray) !important;
  box-shadow: none !important;
}

.stream-page .stream-video-window {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.stream-page .stream-chat {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  min-height: 0 !important;
  padding: var(--space-1) 5px !important;
  overflow: hidden !important;
}

.stream-page .box-title,
.stream-page .window-title {
  min-height: 0 !important;
  padding: 3px var(--space-2) !important;
  color: #fff !important;
  background: var(--green-panel) !important;
  border-bottom: 1px solid #000 !important;
  font: bold 12px/1.12 var(--retro-font) !important;
  box-shadow: none !important;
}

.stream-page .window-title {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  height: auto !important;
  margin: 0 !important;
}

.stream-page .box-title {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: auto !important;
  margin: -4px -5px 4px !important;
}

.stream-page .stream-window-heading {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  min-width: 0 !important;
  max-width: calc(100% - 50px) !important;
  overflow: hidden !important;
  color: #fff !important;
  white-space: nowrap !important;
}

.stream-page .window-title .stream-donate-link,
.stream-page .window-title .stream-records-link,
.stream-page .window-title .stream-dead-link,
.stream-page .window-title .stream-back-link {
  display: inline-block !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 1px 4px !important;
  border: 1px solid #8f8976 !important;
  background: var(--cream) !important;
  color: #004000 !important;
  box-shadow: none !important;
  font: bold 10px/1.1 var(--retro-font) !important;
  text-decoration: underline !important;
  text-transform: none !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

.stream-page .window-title .stream-donate-link:active,
.stream-page .window-title .stream-records-link:active,
.stream-page .window-title .stream-dead-link:active,
.stream-page .window-title .stream-back-link:active {
  border-style: inset !important;
}

/* 2026-08-27: HLS quality selector for adaptive OBS stream. */
.stream-page .window-title .stream-quality-control {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  height: 16px !important;
  min-height: 16px !important;
  margin: 0 !important;
  padding: 0 4px !important;
  border: 2px inset #d8d8d8 !important;
  background: #fffdd1 !important;
  color: #004000 !important;
  font-family: var(--font-bold) !important;
  font-size: 10px !important;
  line-height: 10px !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.stream-page .window-title .stream-quality-control select {
  width: 92px !important;
  height: 12px !important;
  min-height: 12px !important;
  padding: 0 1px !important;
  border: 1px inset #8c8c8c !important;
  border-radius: 0 !important;
  background: #ffffc8 !important;
  color: #004000 !important;
  font-family: var(--font-bold) !important;
  font-size: 9px !important;
  line-height: 9px !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 760px) {
  .stream-page .window-title .stream-quality-control {
    max-width: 118px !important;
    overflow: hidden !important;
  }

  .stream-page .window-title .stream-quality-control select {
    width: 62px !important;
  }
}

.stream-page .stream-chat-popout-link {
  display: inline-block !important;
  margin-left: 6px !important;
  color: #ffff99 !important;
  font: bold 10px/1.1 var(--retro-font) !important;
  text-decoration: underline !important;
  white-space: nowrap !important;
}

.stream-page .win-buttons {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  gap: 3px !important;
  height: 13px !important;
  margin-left: 4px !important;
}

.stream-page .win-buttons i {
  position: relative !important;
  display: block !important;
  width: 11px !important;
  height: 11px !important;
  border: 1px solid #b8ffb8 !important;
  background: #003312 !important;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .35), inset -1px -1px 0 rgba(0, 0, 0, .55) !important;
}

.stream-page .stream-video-frame {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: 2px inset #777 !important;
  outline: 0 !important;
  background:
    repeating-linear-gradient(0deg, rgba(157, 255, 92, .09) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(157, 255, 92, .035) 0 1px, transparent 1px 8px),
    #07110c !important;
  box-shadow: none !important;
}

.stream-page .stream-video-frame .video-js,
.stream-page .stream-video-frame .video-js .vjs-tech,
.stream-page .stream-video-frame video,
.stream-page .stream-video-frame video.vjs-tech {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: #000 !important;
}

.stream-page .stream-player-fallback,
.stream-page .stream-player-fallback.stream-player-offline {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 0 !important;
  background:
    radial-gradient(circle at 50% 45%, rgba(157, 255, 92, .08), transparent 42%),
    repeating-linear-gradient(0deg, rgba(157, 255, 92, .08) 0 1px, transparent 1px 5px),
    #07110c !important;
  color: #eaff89 !important;
  text-align: center !important;
}

.stream-page .stream-player-fallback #playerFallbackText {
  display: inline-block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  color: #eaff89 !important;
  font-family: var(--retro-font) !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  line-height: 26px !important;
  text-shadow: 2px 2px 0 #003b12 !important;
  text-transform: lowercase !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.stream-page .stream-video-frame.is-online .stream-player-fallback,
.stream-page .stream-player-fallback[hidden] {
  display: none !important;
}

.stream-page .stream-broadcast-title {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 5px 8px !important;
  overflow: hidden !important;
  border: 0 !important;
  border-top: 1px solid #d5d58c !important;
  outline: 0 !important;
  background:
    repeating-linear-gradient(0deg, rgba(0, 128, 0, .07) 0 1px, transparent 1px 4px),
    #ffffcc !important;
  color: #009020 !important;
  box-shadow: none !important;
  font: 900 22px/1.05 var(--retro-font) !important;
  text-shadow: 1px 1px #fff8a6 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.stream-page .stream-status-strip {
  display: grid !important;
  grid-template-columns: 210px 102px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px !important;
  height: auto !important;
  min-height: 22px !important;
  margin: 0 !important;
  padding: 4px 7px !important;
  overflow: hidden !important;
  border: 0 !important;
  border-top: 1px solid #e7e7aa !important;
  outline: 0 !important;
  background: var(--cream) !important;
  color: #000 !important;
  box-shadow: none !important;
  font: 10px/1.15 var(--retro-font) !important;
}

.stream-page .stream-status-strip span,
.stream-page .stream-status-strip i,
.stream-page .stream-status-strip em {
  min-width: 0 !important;
  overflow: hidden !important;
  color: inherit !important;
  font-style: normal !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.stream-page .stream-status-strip b {
  color: #000 !important;
  font-weight: 700 !important;
}

.stream-page .stream-auth,
.stream-page .stream-chat-list,
.stream-page .stream-chat form,
.stream-page .stream-chat-note {
  margin-right: 0 !important;
  margin-left: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.stream-page .stream-auth {
  flex: 0 0 auto !important;
  gap: 3px !important;
  margin-top: 0 !important;
  margin-bottom: 4px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.stream-page .stream-auth-state {
  margin: 0 0 2px !important;
  color: #003612 !important;
  font: bold 10px/1.12 var(--retro-font) !important;
  white-space: normal !important;
}

.stream-page .stream-auth form {
  display: grid !important;
  gap: 2px !important;
}

.stream-page .stream-auth input,
.stream-page .stream-chat input,
.stream-page .stream-chat textarea,
.stream-page .stream-auth button,
.stream-page .stream-chat form button {
  display: block !important;
  width: 100% !important;
  min-height: 20px !important;
  margin: 2px 0 !important;
  padding: 2px 3px !important;
  border: 1px inset #fff !important;
  border-radius: 0 !important;
  background: var(--cream) !important;
  color: #000 !important;
  font: 11px/1.12 var(--retro-font) !important;
}

.stream-page .stream-auth-buttons {
  display: grid !important;
  grid-template-columns: 1fr 1fr 42px !important;
  gap: 2px !important;
}

.stream-page .stream-auth button,
.stream-page .stream-chat form button {
  border-style: outset !important;
  background: #d7d7d7 !important;
  cursor: pointer !important;
}

.stream-page .stream-auth button:active,
.stream-page .stream-chat form button:active {
  border-style: inset !important;
}

.stream-page .stream-chat-list {
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 4px !important;
  padding: 4px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border: 1px inset #777 !important;
  background: var(--cream) !important;
  color: #000 !important;
  font: 10px/1.16 var(--retro-font) !important;
}

.stream-page .stream-chat-entry {
  margin: 0 !important;
  padding: 2px 0 !important;
  border-bottom: 1px dotted #aaa36c !important;
  color: #000 !important;
}

.stream-page .stream-chat-entry.is-admin,
.stream-page .stream-chat-entry.is-moderation {
  margin: 2px 0 !important;
  padding: 3px !important;
  border: 1px dashed #d00000 !important;
  background: #fff7a6 !important;
}

.stream-page .stream-chat textarea {
  height: 34px !important;
  min-height: 34px !important;
  resize: none !important;
}

.stream-page .stream-chat form {
  flex: 0 0 auto !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.stream-page .stream-chat-note {
  flex: 0 0 auto !important;
  min-height: 14px !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #003612 !important;
  font: 9px/1.1 var(--retro-font) !important;
}

@media (min-width: 921px) {
  body.stream-page {
    width: 100% !important;
    height: 100vh !important;
    min-height: 100vh !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 8px 0 !important;
    scrollbar-width: none !important;
  }

  body.stream-page::-webkit-scrollbar {
    display: none !important;
  }

  .stream-compact-page .stream-shell,
  .stream-compact-page.stream-page.is-theater .stream-shell {
    display: block !important;
    width: var(--site-width) !important;
    height: var(--site-height) !important;
    max-width: none !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    transform: scale(var(--stream-desktop-fit, 1)) !important;
    transform-origin: top center !important;
  }

  .stream-compact-page .stream-shell > tbody {
    display: grid !important;
    grid-template-columns: calc(var(--site-width) - var(--left-col-width)) var(--left-col-width) !important;
    grid-template-rows: 18px 62px calc(var(--site-height) - 80px) !important;
    width: var(--site-width) !important;
    height: var(--site-height) !important;
  }

  .stream-compact-page .stream-shell > tbody > tr {
    display: contents !important;
  }

  .stream-compact-page .stream-shell td {
    display: block !important;
  }

  .stream-compact-page .topbar {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: var(--site-width) !important;
    height: 18px !important;
    padding: 1px 7px !important;
    font-size: 12px !important;
  }

  .stream-compact-page .header {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: var(--site-width) !important;
    height: 62px !important;
    padding: 3px 8px !important;
  }

  .stream-compact-page .css-logo {
    min-height: 42px !important;
    padding: 2px 12px 5px !important;
    font-size: 29px !important;
  }

  .stream-compact-page .stream-main,
  .stream-compact-page.stream-page.is-theater .stream-main {
    grid-column: 1 !important;
    grid-row: 3 !important;
    width: calc(var(--site-width) - var(--left-col-width)) !important;
    height: calc(var(--site-height) - 80px) !important;
    padding: 4px !important;
  }

  .stream-compact-page .stream-side {
    grid-column: 2 !important;
    grid-row: 3 !important;
    width: var(--left-col-width) !important;
    height: calc(var(--site-height) - 80px) !important;
    padding: 4px !important;
  }

  .stream-compact-page .stream-chat {
    height: calc(var(--site-height) - 88px) !important;
  }

  .stream-compact-page .stream-video-window {
    align-self: start !important;
  }

  .stream-compact-page .window-title,
  .stream-compact-page .box-title {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    font-size: 11px !important;
    line-height: 1 !important;
  }

  .stream-compact-page .stream-video-frame {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
  }

  .stream-compact-page .stream-broadcast-title {
    font-size: 22px !important;
  }

  .stream-compact-page .stream-status-strip {
    grid-template-columns: 210px 102px minmax(0, 1fr) !important;
  }
}

@media (max-width: 920px) {
  body.stream-page {
    display: block !important;
    min-height: 100vh !important;
    height: auto !important;
    overflow: auto !important;
    padding: 0 !important;
  }

  .stream-page .stream-shell {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100vw !important;
    margin: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    transform: none !important;
  }

  .stream-page .stream-shell > tbody,
  .stream-page .stream-shell > tbody > tr,
  .stream-page .stream-shell > tbody > tr > td {
    display: block !important;
    width: 100% !important;
    height: auto !important;
  }

  .stream-page .topbar {
    height: 20px !important;
    padding: 2px 6px !important;
    font-size: 11px !important;
  }

  .stream-page .header {
    height: auto !important;
    padding: 5px 7px !important;
  }

  .stream-page .css-logo {
    max-width: calc(100vw - 24px) !important;
    min-height: 52px !important;
    font-size: clamp(23px, 9vw, 31px) !important;
  }

  .stream-page .stream-main,
  .stream-page .stream-side {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 4px !important;
    border-left: 0 !important;
  }

  .stream-page .stream-side {
    border-top: 2px ridge #fff !important;
  }

  .stream-page .stream-chat {
    height: 420px !important;
  }

  .stream-page .window-title .stream-records-link,
  .stream-page .window-title .stream-dead-link {
    display: none !important;
  }

  .stream-page .stream-status-strip {
    grid-template-columns: 1fr !important;
  }
}

/* 2026-08-26 v37: main page has an actual transformed skin box of 908x728 CSS px. */
body.stream-page {
  --stream-skin-width: 908px;
  --stream-skin-height: 728px;
}

@media (min-width: 921px) {
  .stream-compact-page .stream-shell,
  .stream-compact-page.stream-page.is-theater .stream-shell {
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
  }

  .stream-compact-page .stream-shell > tbody {
    grid-template-columns: calc(var(--stream-skin-width) - var(--left-col-width)) var(--left-col-width) !important;
    grid-template-rows: 18px 62px calc(var(--stream-skin-height) - 80px) !important;
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
  }

  .stream-compact-page .topbar,
  .stream-compact-page .header {
    width: var(--stream-skin-width) !important;
  }

  .stream-compact-page .stream-main,
  .stream-compact-page.stream-page.is-theater .stream-main {
    width: calc(var(--stream-skin-width) - var(--left-col-width)) !important;
    height: calc(var(--stream-skin-height) - 80px) !important;
  }

  .stream-compact-page .stream-side {
    width: var(--left-col-width) !important;
    height: calc(var(--stream-skin-height) - 80px) !important;
  }

  .stream-compact-page .stream-chat {
    height: calc(var(--stream-skin-height) - 88px) !important;
  }
}

/* 2026-08-26 v38: override older compact selectors with the exact main controls. */
.stream-page .stream-video-window .window-title,
.stream-page .stream-chat .box-title,
.stream-page .stream-records-window .window-title {
  padding: 2px 8px !important;
  color: #fff !important;
  background: #004000 !important;
  border-bottom: 1px solid #000 !important;
  font: bold 11px/11px var(--retro-font) !important;
  box-shadow: none !important;
}

.stream-page .stream-chat .box-title {
  margin: -5px -5px 4px !important;
}

.stream-page .stream-auth input,
.stream-page .stream-chat textarea,
.stream-page .stream-auth button,
.stream-page .stream-chat form button {
  min-height: 20px !important;
  margin: 1px 0 !important;
  padding: 1px 3px !important;
  border-width: 1px !important;
  font: 10px/1.05 var(--retro-font) !important;
}

.stream-page .stream-chat textarea {
  height: 28px !important;
  min-height: 28px !important;
}

.stream-page .stream-chat form button {
  height: 20px !important;
}

@media (min-width: 921px) {
  .stream-page .stream-auth input,
  .stream-page .stream-auth button,
  .stream-page .stream-chat form button {
    height: 20px !important;
  }

  .stream-page .stream-chat textarea {
    height: 24px !important;
    min-height: 24px !important;
  }
}

/* 2026-08-26 v39: share the same main-site skin on records, bans and chat pages. */
body.stream-records-page,
body.stream-bans-page,
body.stream-chat-popout-page {
  margin: 0 !important;
  color: #000 !important;
  font: 12px/1.22 var(--retro-font) !important;
  background-color: var(--green-deep) !important;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .2) 0 1px, transparent 1px 6px) !important;
  background-size: auto !important;
}

@media (min-aspect-ratio: 4 / 3) and (min-width: 900px) {
  body.stream-records-page,
  body.stream-bans-page,
  body.stream-chat-popout-page {
    background-image:
      linear-gradient(90deg, rgba(0, 0, 0, .45), transparent 14%, transparent 86%, rgba(0, 0, 0, .45)),
      repeating-linear-gradient(45deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 8px),
      repeating-linear-gradient(0deg, rgba(0, 0, 0, .2) 0 1px, transparent 1px 6px) !important;
  }
}

.stream-records-page .stream-shell,
.stream-bans-page .stream-shell,
.stream-chat-popout-page .stream-chat-popout-shell {
  box-sizing: border-box !important;
  display: block !important;
  width: var(--stream-skin-width) !important;
  min-width: 0 !important;
  max-width: 100vw !important;
  height: var(--stream-skin-height) !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  table-layout: fixed !important;
  border: var(--border-panel) ridge var(--chrome) !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: var(--chrome) !important;
  color: #000 !important;
  box-shadow: none !important;
}

.stream-chat-popout-page .stream-chat-popout-shell *,
.stream-chat-popout-page .stream-chat-popout-shell {
  box-sizing: border-box !important;
}

.stream-records-page .stream-shell > tbody,
.stream-bans-page .stream-shell > tbody,
.stream-chat-popout-page .stream-chat-popout-shell > tbody {
  display: grid !important;
  grid-template-rows: 18px 62px minmax(0, 1fr) !important;
  width: var(--stream-skin-width) !important;
  height: var(--stream-skin-height) !important;
  min-height: 0 !important;
}

.stream-records-page .stream-shell > tbody > tr,
.stream-bans-page .stream-shell > tbody > tr,
.stream-chat-popout-page .stream-chat-popout-shell > tbody > tr {
  display: contents !important;
}

.stream-records-page .stream-shell td,
.stream-bans-page .stream-shell td,
.stream-chat-popout-page .stream-chat-popout-shell td {
  display: block !important;
  box-sizing: border-box !important;
}

.stream-records-page .topbar,
.stream-bans-page .topbar,
.stream-chat-popout-page .topbar {
  grid-row: 1 !important;
  width: var(--stream-skin-width) !important;
  height: 18px !important;
  padding: 1px 7px !important;
  color: #fff !important;
  background: #004000 !important;
  border-bottom: 2px solid #000 !important;
  font: 12px var(--retro-font) !important;
  line-height: normal !important;
  white-space: nowrap !important;
}

.stream-records-page .header,
.stream-bans-page .header {
  grid-row: 2 !important;
  width: var(--stream-skin-width) !important;
  height: 62px !important;
  padding: 3px 8px !important;
  color: #fff !important;
  border-bottom: 2px solid #000 !important;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .08) 0 1px, transparent 1px 6px),
    #00501a !important;
}

.stream-records-page .stream-header-grid,
.stream-bans-page .stream-header-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-items: center !important;
  width: 100% !important;
  height: 100% !important;
}

.stream-records-page .header-gif {
  display: none !important;
}

.stream-records-page .logo,
.stream-bans-page .logo {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
}

.stream-records-page .css-logo,
.stream-bans-page .css-logo {
  min-height: 42px !important;
  padding: 2px 12px 5px !important;
  font-size: 29px !important;
}

.stream-records-main,
.stream-bans-main,
.stream-chat-popout-cell {
  grid-row: 3 !important;
  width: var(--stream-skin-width) !important;
  height: calc(var(--stream-skin-height) - 80px) !important;
  min-height: 0 !important;
  padding: 4px !important;
  background: #dcdcdc !important;
  border-top: 0 !important;
  vertical-align: top !important;
}

.stream-records-window,
.stream-bans-window,
.stream-chat-popout-page .stream-chat {
  margin: 0 !important;
  height: calc(var(--stream-skin-height) - 88px) !important;
  min-height: 0 !important;
  border: var(--border-ui) ridge #fff !important;
  border-right-color: #777 !important;
  border-bottom-color: #777 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: var(--panel-gray) !important;
  box-shadow: none !important;
}

.stream-records-window .window-title,
.stream-bans-window .window-title,
.stream-chat-popout-page .stream-chat .box-title {
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 2px 8px !important;
  color: #fff !important;
  background: #004000 !important;
  border-bottom: 1px solid #000 !important;
  font: bold 11px/11px var(--retro-font) !important;
  box-shadow: none !important;
}

.stream-chat-popout-page .stream-chat .box-title {
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin: -5px -5px 4px !important;
}

.stream-chat-popout-page .stream-chat .box-title span {
  color: #ffff99 !important;
  font: bold 10px/1.1 var(--retro-font) !important;
}

.stream-records-page .stream-broadcast-title {
  margin: 0 !important;
}

.stream-records-hint,
.stream-records-list,
.stream-bans-controls,
.stream-bans-list {
  margin: 4px !important;
  padding: 5px !important;
  border: 1px inset #777 !important;
  outline: 0 !important;
  background: var(--cream) !important;
  color: #000 !important;
  box-shadow: none !important;
  font: 11px/1.22 var(--retro-font) !important;
}

.stream-records-list,
.stream-bans-list {
  height: 470px !important;
  min-height: 0 !important;
  overflow: auto !important;
}

.stream-record-item,
.stream-ban-card {
  padding: 5px !important;
  border: 1px dotted #87875c !important;
  background: #ffffcc !important;
  color: #000 !important;
}

.stream-record-actions a,
.stream-record-actions button,
.stream-bans-controls select,
.stream-bans-controls button,
.stream-chat-popout-page .stream-auth button,
.stream-chat-popout-page .stream-chat form button {
  display: inline-block !important;
  min-height: 20px !important;
  margin: 1px 0 !important;
  padding: 1px 3px !important;
  border: 1px outset #fff !important;
  border-radius: 0 !important;
  background: #d7d7d7 !important;
  color: #000 !important;
  font: 10px/1.05 var(--retro-font) !important;
  text-decoration: underline !important;
}

.stream-bans-controls select {
  border-style: inset !important;
  background: var(--cream) !important;
  text-decoration: none !important;
}

.stream-chat-popout-page .stream-auth,
.stream-chat-popout-page .stream-chat-list,
.stream-chat-popout-page .stream-chat form,
.stream-chat-popout-page .stream-chat-note {
  margin: 0 0 4px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.stream-chat-popout-page .stream-auth input,
.stream-chat-popout-page .stream-chat textarea {
  display: block !important;
  width: 100% !important;
  min-height: 20px !important;
  margin: 1px 0 !important;
  padding: 1px 3px !important;
  border: 1px inset #fff !important;
  border-radius: 0 !important;
  background: var(--cream) !important;
  color: #000 !important;
  font: 10px/1.05 var(--retro-font) !important;
}

.stream-chat-popout-page .stream-chat textarea {
  height: 29px !important;
  min-height: 29px !important;
  resize: none !important;
}

.stream-chat-popout-page .stream-chat-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding: 4px !important;
  overflow: auto !important;
  border: 1px inset #777 !important;
  background: var(--cream) !important;
  font: 10px/1.16 var(--retro-font) !important;
}

.stream-chat-popout-page .stream-chat {
  display: flex !important;
  flex-direction: column !important;
  padding: 4px 5px !important;
  height: calc(var(--stream-skin-height) - 88px) !important;
}

.stream-chat-popout-page .stream-chat-back-link,
.stream-records-page .stream-top-tab,
.stream-bans-page .stream-back-link {
  display: inline-block !important;
  margin-left: 8px !important;
  padding: 1px 4px !important;
  border: 1px solid #8f8976 !important;
  background: var(--cream) !important;
  color: #004000 !important;
  box-shadow: none !important;
  font: bold 10px/1.1 var(--retro-font) !important;
  text-decoration: underline !important;
  white-space: nowrap !important;
}

@media (min-width: 921px) {
  body.stream-records-page,
  body.stream-bans-page,
  body.stream-chat-popout-page {
    width: 100% !important;
    min-height: 100vh !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 8px 0 !important;
    scrollbar-width: none !important;
  }

  body.stream-records-page::-webkit-scrollbar,
  body.stream-bans-page::-webkit-scrollbar,
  body.stream-chat-popout-page::-webkit-scrollbar {
    display: none !important;
  }

  .stream-records-page .stream-shell,
  .stream-bans-page .stream-shell,
  .stream-chat-popout-page .stream-chat-popout-shell {
    max-width: none !important;
    overflow: hidden !important;
    transform: scale(var(--stream-desktop-fit, 1)) !important;
    transform-origin: top center !important;
  }
}

@media (max-width: 920px) {
  body.stream-records-page,
  body.stream-bans-page,
  body.stream-chat-popout-page {
    display: block !important;
    min-height: 100vh !important;
    height: auto !important;
    overflow: auto !important;
    padding: 0 !important;
  }

  .stream-records-page .stream-shell,
  .stream-bans-page .stream-shell,
  .stream-chat-popout-page .stream-chat-popout-shell {
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    border-right: 0 !important;
    border-left: 0 !important;
    transform: none !important;
  }

  .stream-records-page .stream-shell > tbody,
  .stream-bans-page .stream-shell > tbody,
  .stream-chat-popout-page .stream-chat-popout-shell > tbody,
  .stream-records-page .stream-shell > tbody > tr,
  .stream-bans-page .stream-shell > tbody > tr,
  .stream-chat-popout-page .stream-chat-popout-shell > tbody > tr,
  .stream-records-page .stream-shell td,
  .stream-bans-page .stream-shell td,
  .stream-chat-popout-page .stream-chat-popout-shell td {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
  }

  .stream-records-page .topbar,
  .stream-bans-page .topbar,
  .stream-chat-popout-page .topbar {
    width: 100% !important;
    height: 20px !important;
    padding: 2px 6px !important;
    font-size: 11px !important;
  }

  .stream-records-page .header,
  .stream-bans-page .header {
    width: 100% !important;
    height: auto !important;
    padding: 5px 7px !important;
  }

  .stream-records-page .css-logo,
  .stream-bans-page .css-logo {
    max-width: calc(100vw - 24px) !important;
    min-height: 52px !important;
    font-size: clamp(21px, 8vw, 31px) !important;
  }

  .stream-records-main,
  .stream-bans-main,
  .stream-chat-popout-cell {
    width: 100% !important;
    min-height: 0 !important;
    padding: 4px !important;
  }

  .stream-records-window,
  .stream-bans-window,
  .stream-chat-popout-page .stream-chat {
    min-height: 0 !important;
    height: auto !important;
  }

  .stream-records-list,
  .stream-bans-list {
    min-height: 240px !important;
  }

  .stream-record-item {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }

  .stream-ban-meta {
    grid-template-columns: 1fr !important;
  }
}

/* 2026-08-26 v40: widescreen 16:9 stream pages. */
body.stream-page {
  --stream-skin-width: 1280px;
  --stream-skin-height: 720px;
  --stream-side-width: 300px;
}

@media (min-width: 921px) {
  .stream-compact-page .stream-shell,
  .stream-compact-page.stream-page.is-theater .stream-shell,
  .stream-records-page .stream-shell,
  .stream-bans-page .stream-shell,
  .stream-chat-popout-page .stream-chat-popout-shell {
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
    min-height: 0 !important;
    max-width: none !important;
    overflow: hidden !important;
    transform: scale(var(--stream-desktop-fit, 1)) !important;
    transform-origin: top center !important;
  }

  .stream-compact-page .stream-shell > tbody {
    display: grid !important;
    grid-template-columns: calc(var(--stream-skin-width) - var(--stream-side-width)) var(--stream-side-width) !important;
    grid-template-rows: 18px 62px calc(var(--stream-skin-height) - 80px) !important;
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
  }

  .stream-records-page .stream-shell > tbody,
  .stream-bans-page .stream-shell > tbody {
    display: grid !important;
    grid-template-rows: 18px 62px calc(var(--stream-skin-height) - 80px) !important;
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
    min-height: 0 !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell > tbody {
    display: grid !important;
    grid-template-rows: 18px calc(var(--stream-skin-height) - 18px) !important;
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
    min-height: 0 !important;
  }

  .stream-compact-page .topbar,
  .stream-records-page .topbar,
  .stream-bans-page .topbar,
  .stream-chat-popout-page .topbar,
  .stream-compact-page .header,
  .stream-records-page .header,
  .stream-bans-page .header {
    width: var(--stream-skin-width) !important;
  }

  .stream-compact-page .stream-main,
  .stream-compact-page.stream-page.is-theater .stream-main {
    width: calc(var(--stream-skin-width) - var(--stream-side-width)) !important;
    height: calc(var(--stream-skin-height) - 80px) !important;
    padding: 4px !important;
  }

  .stream-compact-page .stream-side {
    width: var(--stream-side-width) !important;
    height: calc(var(--stream-skin-height) - 80px) !important;
    padding: 4px !important;
  }

  .stream-compact-page .stream-video-window {
    width: 100% !important;
    height: auto !important;
  }

  .stream-compact-page .stream-video-frame {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    max-height: 552px !important;
  }

  .stream-compact-page .stream-chat {
    width: 100% !important;
    height: calc(var(--stream-skin-height) - 88px) !important;
  }

  .stream-records-main,
  .stream-bans-main {
    width: var(--stream-skin-width) !important;
    height: calc(var(--stream-skin-height) - 80px) !important;
    min-height: 0 !important;
  }

  .stream-chat-popout-cell {
    grid-row: 2 !important;
    width: var(--stream-skin-width) !important;
    height: calc(var(--stream-skin-height) - 18px) !important;
    min-height: 0 !important;
    padding: 4px !important;
  }

  .stream-records-window,
  .stream-bans-window {
    height: calc(var(--stream-skin-height) - 88px) !important;
    min-height: 0 !important;
  }

  .stream-chat-popout-page .stream-chat {
    height: calc(var(--stream-skin-height) - 26px) !important;
    min-height: 0 !important;
  }

  .stream-records-list,
  .stream-bans-list {
    height: 430px !important;
    min-height: 0 !important;
  }

  .stream-record-item {
    grid-template-columns: 160px minmax(0, 1fr) auto !important;
  }

  .stream-ban-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* 2026-08-26 v41: let native video controls receive clicks through Video.js text-track overlay. */
.stream-video-frame .vjs-text-track-display,
.stream-video-frame .vjs-text-track-display * {
  pointer-events: none !important;
}

/* 2026-08-26 v42: auth state must override late button display rules. */
.stream-auth [hidden],
.stream-auth.is-logged-in .stream-auth-login-field,
.stream-auth.is-logged-in [data-auth-action],
.stream-auth.is-logged-out #streamLogoutBtn {
  display: none !important;
}

/* 2026-08-28 stream-audit: final mobile/popout and native HLS stability overrides. */
@media (max-width: 920px) {
  body.stream-chat-popout-page {
    width: 100vw !important;
    min-width: 0 !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
    padding: 0 !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell {
    display: block !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    height: 100dvh !important;
    min-height: 0 !important;
    margin: 0 !important;
    transform: none !important;
    overflow: hidden !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell > tbody {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 20px minmax(0, calc(100dvh - 20px)) !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 0 !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell > tbody > tr {
    display: contents !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }

  .stream-chat-popout-page .topbar {
    width: 100vw !important;
    height: 20px !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .stream-chat-popout-cell {
    width: 100vw !important;
    height: calc(100dvh - 20px) !important;
    min-height: 0 !important;
    padding: 4px !important;
    overflow: hidden !important;
  }

  .stream-chat-popout-page .stream-chat {
    display: grid !important;
    grid-template-rows: 20px auto minmax(0, 1fr) auto 16px !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 4px !important;
    overflow: hidden !important;
  }

  .stream-chat-popout-page .stream-chat-list {
    height: auto !important;
    min-height: 0 !important;
    overflow: auto !important;
  }

  .stream-chat-popout-page .stream-smiley-picker {
    max-height: 64px !important;
    overflow: auto !important;
  }

  .stream-chat-popout-page .stream-chat textarea {
    height: 44px !important;
    min-height: 44px !important;
  }
}

.stream-page .stream-video-frame > video.stream-video-tech {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  object-fit: cover !important;
  background: transparent !important;
}

/* 2026-08-28 mobile-stream-fix: visible nav, readable chat, full-height popout/bans. */
@media (max-width: 920px) {
  .stream-page .window-title {
    min-height: 21px !important;
    padding: 1px 4px !important;
    gap: 4px !important;
    overflow: hidden !important;
  }

  .stream-page .window-title .stream-window-heading {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 4px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    scrollbar-width: none !important;
  }

  .stream-page .window-title .stream-window-heading::-webkit-scrollbar {
    display: none !important;
  }

  .stream-page .window-title .stream-donate-link,
  .stream-page .window-title .stream-records-link,
  .stream-page .window-title .stream-dead-link,
  .stream-page .window-title .stream-back-link {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    padding: 1px 5px !important;
    font-size: 11px !important;
    line-height: 13px !important;
  }

  .stream-page .stream-video-window .window-title .win-buttons {
    display: none !important;
  }

  .stream-page .stream-video-window .window-title .stream-quality-control {
    display: none !important;
  }

  .stream-compact-page .stream-chat {
    padding: 3px !important;
  }

  .stream-compact-page .stream-chat .box-title {
    flex: 0 0 auto !important;
    min-height: 18px !important;
    margin-bottom: 3px !important;
  }

  .stream-compact-page .stream-auth {
    flex: 0 0 auto !important;
    margin-bottom: 3px !important;
    padding: 2px !important;
  }

  .stream-compact-page .stream-chat-list {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: auto !important;
  }

  .stream-page .stream-smiley-picker {
    display: flex !important;
    grid-template-columns: none !important;
    flex: 0 0 37px !important;
    width: 100% !important;
    height: 37px !important;
    min-height: 37px !important;
    max-height: 37px !important;
    gap: 2px !important;
    padding: 2px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  .stream-page .stream-smiley-picker .smiley-button {
    flex: 0 0 46px !important;
    width: 46px !important;
    min-width: 46px !important;
    height: 31px !important;
    padding: 1px !important;
  }

  .stream-page .stream-smiley-picker .smiley-button img {
    max-width: 100% !important;
    max-height: 27px !important;
    object-fit: contain !important;
  }

  body.stream-chat-popout-page {
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell {
    display: block !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-width: 2px !important;
    transform: none !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell > tbody {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 21px minmax(0, 1fr) !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell > tbody > tr {
    display: contents !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }

  .stream-chat-popout-page .topbar {
    grid-row: 1 !important;
    width: 100% !important;
    height: 21px !important;
    padding: 2px 5px !important;
    overflow: hidden !important;
  }

  .stream-chat-popout-cell {
    grid-row: 2 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 2px !important;
    overflow: hidden !important;
  }

  .stream-chat-popout-page .stream-chat {
    display: grid !important;
    grid-template-rows: 19px auto minmax(0, 1fr) auto 16px !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 3px !important;
    overflow: hidden !important;
  }

  .stream-chat-popout-page .stream-chat-list {
    height: auto !important;
    min-height: 0 !important;
    overflow: auto !important;
  }

  body.stream-bans-page {
    height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
  }

  .stream-bans-page .stream-shell {
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }

  .stream-bans-page .stream-shell > tbody {
    display: grid !important;
    grid-template-rows: 20px auto minmax(0, 1fr) !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  .stream-bans-page .stream-bans-main {
    height: auto !important;
    min-height: 0 !important;
    padding: 3px !important;
    overflow: hidden !important;
  }

  .stream-bans-page .stream-bans-window {
    display: grid !important;
    grid-template-rows: 21px auto minmax(0, 1fr) !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .stream-bans-page .stream-bans-controls {
    margin: 3px !important;
    padding: 3px !important;
  }

  .stream-bans-page .stream-bans-list {
    height: auto !important;
    min-height: 0 !important;
    margin: 3px !important;
    padding: 5px !important;
    overflow: auto !important;
  }

  .stream-bans-page .stream-ban-meta {
    grid-template-columns: 1fr !important;
    gap: 2px !important;
  }
}

/* 2026-08-27 stream-smilies: guestbook-style smilies for stream chat. */
.stream-chat .stream-smiley-picker {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 2px !important;
  max-height: 82px !important;
  margin: 0 !important;
  padding: 2px !important;
  border: 1px inset #777 !important;
  background: #e7e7b8 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.stream-chat .smiley-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 28px !important;
  min-height: 28px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px outset #fff !important;
  background: #ffffcc !important;
  cursor: pointer !important;
}

.stream-chat .smiley-button:active {
  border-style: inset !important;
}

.stream-chat .smiley-button img {
  width: auto !important;
  height: auto !important;
  max-width: 36px !important;
  max-height: 30px !important;
  image-rendering: pixelated !important;
  object-fit: contain !important;
}

.stream-chat .stream-smile {
  width: auto !important;
  height: 18px !important;
  max-width: 36px !important;
  max-height: 18px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  image-rendering: pixelated !important;
  vertical-align: -3px !important;
}

.stream-chat.is-locked .stream-smiley-picker {
  opacity: .55 !important;
  pointer-events: none !important;
}

.stream-auth.is-logged-out .stream-auth-buttons {
  grid-template-columns: 1fr 1fr !important;
}

.stream-auth.is-logged-in .stream-auth-buttons {
  grid-template-columns: 1fr !important;
}

.stream-auth.is-logged-in #streamLogoutBtn {
  display: block !important;
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

/* 2026-08-26 v43: use one stable Video.js control layer for HLS playback. */
.stream-page .stream-video-frame .video-js,
.stream-compact-page .stream-video-frame .video-js {
  pointer-events: auto !important;
}

.stream-page .stream-video-frame .video-js .vjs-tech,
.stream-compact-page .stream-video-frame .video-js .vjs-tech,
.stream-page .stream-video-frame video.vjs-tech,
.stream-compact-page .stream-video-frame video.vjs-tech {
  pointer-events: auto !important;
}

.stream-page .stream-video-frame .vjs-control-bar,
.stream-compact-page .stream-video-frame .vjs-control-bar {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 38px !important;
  align-items: center !important;
  gap: 2px !important;
  padding: 5px 8px !important;
  border-top: 1px solid rgba(255, 255, 220, 0.35) !important;
  background: linear-gradient(180deg, rgba(15, 15, 15, 0.12), rgba(0, 0, 0, 0.72)) !important;
  color: #ffffcc !important;
  font: 14px "Digraville Mono", "Courier New", monospace !important;
  box-sizing: border-box !important;
  z-index: 6 !important;
}

.stream-page .stream-video-frame .vjs-control,
.stream-compact-page .stream-video-frame .vjs-control,
.stream-page .stream-video-frame .vjs-button,
.stream-compact-page .stream-video-frame .vjs-button {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 30px !important;
  height: 28px !important;
  color: #ffffcc !important;
  background: transparent !important;
  border: 0 !important;
  cursor: pointer !important;
}

.stream-page .stream-video-frame .vjs-progress-control,
.stream-compact-page .stream-video-frame .vjs-progress-control {
  flex: 1 1 auto !important;
  min-width: 80px !important;
}

.stream-page .stream-video-frame .vjs-progress-holder,
.stream-compact-page .stream-video-frame .vjs-progress-holder,
.stream-page .stream-video-frame .vjs-volume-level,
.stream-compact-page .stream-video-frame .vjs-volume-level {
  pointer-events: auto !important;
}

.stream-page .stream-video-frame .vjs-play-progress,
.stream-compact-page .stream-video-frame .vjs-play-progress,
.stream-page .stream-video-frame .vjs-volume-level,
.stream-compact-page .stream-video-frame .vjs-volume-level {
  background: #99ff33 !important;
}

.stream-page .stream-video-frame .vjs-load-progress,
.stream-compact-page .stream-video-frame .vjs-load-progress {
  background: rgba(255, 255, 204, 0.28) !important;
}

.stream-page .stream-video-frame .vjs-big-play-button,
.stream-compact-page .stream-video-frame .vjs-big-play-button,
.stream-page .stream-video-frame .vjs-modal-dialog,
.stream-compact-page .stream-video-frame .vjs-modal-dialog {
  display: none !important;
}

.stream-page .stream-video-frame.is-online .stream-player-fallback,
.stream-compact-page .stream-video-frame.is-online .stream-player-fallback {
  display: none !important;
  pointer-events: none !important;
}

.stream-page .window-title .stream-records-link,
.stream-page .window-title .stream-dead-link,
.stream-page .window-title .stream-donate-link {
  display: inline-block !important;
  max-width: none !important;
  vertical-align: middle !important;
}

@media (max-width: 920px) {
  .stream-page .window-title .stream-records-link,
  .stream-page .window-title .stream-dead-link,
  .stream-page .window-title .stream-donate-link {
    display: inline-block !important;
    margin-left: 4px !important;
    padding: 0 4px !important;
    font-size: 10px !important;
    line-height: 14px !important;
  }

  body.stream-compact-page .stream-chat {
    height: 394px !important;
  }
}

/* 2026-08-26 v44: keep Video.js accessibility labels off-screen if vendor CSS is delayed. */
.stream-page .stream-video-frame .vjs-control-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
}

/* 2026-08-26 v45: self-contained Video.js controls without vendor icon fonts. */
.stream-page .stream-video-frame .vjs-control-bar {
  overflow: hidden !important;
}

.stream-page .stream-video-frame .vjs-skip-backward-10,
.stream-page .stream-video-frame .vjs-skip-forward-10,
.stream-page .stream-video-frame .vjs-chapters-button,
.stream-page .stream-video-frame .vjs-descriptions-button,
.stream-page .stream-video-frame .vjs-subs-caps-button,
.stream-page .stream-video-frame .vjs-audio-button,
.stream-page .stream-video-frame .vjs-playback-rate,
.stream-page .stream-video-frame .vjs-current-time,
.stream-page .stream-video-frame .vjs-duration,
.stream-page .stream-video-frame .vjs-time-divider,
.stream-page .stream-video-frame .vjs-remaining-time {
  display: none !important;
}

.stream-page .stream-video-frame .vjs-icon-placeholder {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
}

.stream-page .stream-video-frame .vjs-icon-placeholder:before,
.stream-page .stream-video-frame .vjs-play-progress:before,
.stream-page .stream-video-frame .vjs-volume-level:before {
  font-family: "Digraville Mono", "Courier New", monospace !important;
  font-size: 12px !important;
  line-height: 1 !important;
  color: #ffffcc !important;
  text-shadow: 1px 1px #003000 !important;
  position: static !important;
}

.stream-page .stream-video-frame .vjs-play-control .vjs-icon-placeholder:before {
  content: ">" !important;
}

.stream-page .stream-video-frame .vjs-play-control.vjs-playing .vjs-icon-placeholder:before {
  content: "II" !important;
}

.stream-page .stream-video-frame .vjs-mute-control .vjs-icon-placeholder:before {
  content: "VOL" !important;
  font-size: 10px !important;
}

.stream-page .stream-video-frame .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before {
  content: "MUTE" !important;
  font-size: 9px !important;
}

.stream-page .stream-video-frame .vjs-fullscreen-control .vjs-icon-placeholder:before {
  content: "[ ]" !important;
  font-size: 10px !important;
}

.stream-page .stream-video-frame .vjs-seek-to-live-control {
  min-width: 42px !important;
  font-size: 0 !important;
  color: #ffff66 !important;
}

.stream-page .stream-video-frame .vjs-live-control {
  display: none !important;
}

.stream-page .stream-video-frame .vjs-seek-to-live-control .vjs-control-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  margin: -1px !important;
  white-space: nowrap !important;
}

.stream-page .stream-video-frame .vjs-seek-to-live-control:before {
  content: "LIVE" !important;
  font: 11px "Digraville Mono", "Courier New", monospace !important;
  color: #ffff66 !important;
  text-shadow: 1px 1px #003000 !important;
}

.stream-page .stream-video-frame .vjs-progress-control {
  display: flex !important;
  align-items: center !important;
  height: 28px !important;
}

.stream-page .stream-video-frame .vjs-progress-holder,
.stream-page .stream-video-frame .vjs-volume-bar {
  position: relative !important;
  height: 8px !important;
  background: #172017 !important;
  border: 1px inset #d7d7b7 !important;
  box-shadow: inset 0 0 0 1px #304030 !important;
}

.stream-page .stream-video-frame .vjs-progress-holder {
  width: 100% !important;
  margin: 0 8px !important;
}

.stream-page .stream-video-frame .vjs-volume-panel {
  display: inline-flex !important;
  align-items: center !important;
  width: 100px !important;
}

.stream-page .stream-video-frame .vjs-volume-control {
  display: flex !important;
  align-items: center !important;
  width: 64px !important;
  height: 28px !important;
}

.stream-page .stream-video-frame .vjs-volume-bar {
  width: 58px !important;
  margin: 0 !important;
}

.stream-page .stream-video-frame .vjs-load-progress,
.stream-page .stream-video-frame .vjs-play-progress,
.stream-page .stream-video-frame .vjs-volume-level {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  height: 100% !important;
}

.stream-page .stream-video-frame .vjs-play-progress,
.stream-page .stream-video-frame .vjs-volume-level {
  background: #99ff33 !important;
}

.stream-page .stream-video-frame .vjs-load-progress {
  background: rgba(255, 255, 204, 0.25) !important;
}

/* 2026-08-26 v46: minimal live controls only: play/pause, volume, fullscreen. */
.stream-page .stream-video-frame .vjs-control-bar,
.stream-compact-page .stream-video-frame .vjs-control-bar {
  justify-content: flex-start !important;
  gap: 8px !important;
}

.stream-page .stream-video-frame .vjs-control-bar > *:not(.vjs-play-control):not(.vjs-volume-panel):not(.vjs-fullscreen-control),
.stream-compact-page .stream-video-frame .vjs-control-bar > *:not(.vjs-play-control):not(.vjs-volume-panel):not(.vjs-fullscreen-control),
.stream-page .stream-video-frame .vjs-progress-control,
.stream-compact-page .stream-video-frame .vjs-progress-control,
.stream-page .stream-video-frame .vjs-current-time,
.stream-page .stream-video-frame .vjs-duration,
.stream-page .stream-video-frame .vjs-time-divider,
.stream-page .stream-video-frame .vjs-remaining-time,
.stream-page .stream-video-frame .vjs-live-control,
.stream-page .stream-video-frame .vjs-seek-to-live-control,
.stream-page .stream-video-frame .vjs-playback-rate,
.stream-page .stream-video-frame .vjs-chapters-button,
.stream-page .stream-video-frame .vjs-descriptions-button,
.stream-page .stream-video-frame .vjs-subs-caps-button,
.stream-page .stream-video-frame .vjs-audio-button,
.stream-page .stream-video-frame .vjs-picture-in-picture-control {
  display: none !important;
}

.stream-page .stream-video-frame .vjs-play-control,
.stream-page .stream-video-frame .vjs-fullscreen-control {
  flex: 0 0 34px !important;
}

.stream-page .stream-video-frame .vjs-volume-panel {
  flex: 0 0 118px !important;
  width: 118px !important;
  min-width: 118px !important;
  max-width: 118px !important;
}

.stream-page .stream-video-frame .vjs-volume-control {
  width: 74px !important;
}

.stream-page .stream-video-frame .vjs-volume-bar {
  width: 68px !important;
}

/* 2026-08-26 audit3: final mobile topbar geometry override after all legacy blocks. */
@media (max-width: 920px) {
  .stream-page .topbar {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
  }

  .stream-page .topbar b {
    flex: 0 0 auto !important;
    max-width: 128px !important;
    margin-right: 8px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .stream-page .topbar-marquee {
    flex: 1 1 auto !important;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .stream-page .topbar-marquee span,
  .stream-page .topbar-marquee > span {
    display: block !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    animation: none !important;
  }
}

/* 2026-08-26 1024-fit-final: keep 1024x768 as a complete two-column desktop layout. */
@media (min-width: 921px) and (max-width: 1100px) {
  body.stream-page {
    --stream-skin-width: 1024px !important;
    --stream-skin-height: 720px !important;
    --stream-side-width: 252px !important;
  }

  .stream-compact-page .stream-shell,
  .stream-compact-page.stream-page.is-theater .stream-shell,
  .stream-records-page .stream-shell,
  .stream-bans-page .stream-shell,
  .stream-chat-popout-page .stream-chat-popout-shell {
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
    min-height: 0 !important;
    max-width: none !important;
    overflow: hidden !important;
  }

  .stream-compact-page .stream-shell > tbody {
    display: grid !important;
    grid-template-columns: calc(var(--stream-skin-width) - var(--stream-side-width)) var(--stream-side-width) !important;
    grid-template-rows: 18px 62px calc(var(--stream-skin-height) - 80px) !important;
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
  }

  .stream-compact-page .topbar,
  .stream-compact-page .header,
  .stream-records-page .topbar,
  .stream-bans-page .topbar,
  .stream-chat-popout-page .topbar,
  .stream-records-page .header,
  .stream-bans-page .header {
    width: var(--stream-skin-width) !important;
  }

  .stream-page .topbar {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .stream-page .topbar b,
  .stream-records-page .stream-top-tab,
  .stream-bans-page .stream-back-link,
  .stream-chat-popout-page .stream-chat-back-link {
    flex: 0 0 auto !important;
  }

  .stream-page .topbar-marquee {
    flex: 1 1 auto !important;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .stream-page .topbar-marquee span,
  .stream-page .topbar-marquee > span {
    display: block !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    animation: none !important;
  }

  .stream-compact-page .stream-main,
  .stream-compact-page.stream-page.is-theater .stream-main {
    width: calc(var(--stream-skin-width) - var(--stream-side-width)) !important;
    height: calc(var(--stream-skin-height) - 80px) !important;
  }

  .stream-compact-page .stream-side {
    width: var(--stream-side-width) !important;
    height: calc(var(--stream-skin-height) - 80px) !important;
  }

  .stream-compact-page .stream-video-window {
    width: 100% !important;
    height: calc(var(--stream-skin-height) - 88px) !important;
  }

  .stream-compact-page .stream-video-frame {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    max-height: 432px !important;
  }

  .stream-compact-page .stream-chat {
    width: 100% !important;
    height: calc(var(--stream-skin-height) - 88px) !important;
  }

  .stream-records-page .stream-shell > tbody,
  .stream-bans-page .stream-shell > tbody {
    display: grid !important;
    grid-template-rows: 18px 62px calc(var(--stream-skin-height) - 80px) !important;
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell > tbody {
    display: grid !important;
    grid-template-rows: 18px calc(var(--stream-skin-height) - 18px) !important;
    width: var(--stream-skin-width) !important;
    height: var(--stream-skin-height) !important;
  }

  .stream-records-main,
  .stream-bans-main,
  .stream-chat-popout-cell {
    width: var(--stream-skin-width) !important;
    height: calc(var(--stream-skin-height) - 80px) !important;
  }

  .stream-records-window,
  .stream-bans-window,
  .stream-chat-popout-page .stream-chat {
    width: 100% !important;
    height: calc(var(--stream-skin-height) - 88px) !important;
  }
}

/* 2026-08-26 controls-layout: left play/volume, right fullscreen, no volume tooltip. */
.stream-page .stream-video-frame .vjs-control-bar,
.stream-compact-page .stream-video-frame .vjs-control-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  padding: 5px 8px !important;
  overflow: hidden !important;
}

.stream-page .stream-video-frame .vjs-play-control,
.stream-compact-page .stream-video-frame .vjs-play-control {
  order: 0 !important;
  flex: 0 0 34px !important;
  margin: 0 !important;
}

.stream-page .stream-video-frame .vjs-volume-panel,
.stream-compact-page .stream-video-frame .vjs-volume-panel {
  order: 1 !important;
  display: inline-flex !important;
  flex: 0 0 132px !important;
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  height: 28px !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
}

.stream-page .stream-video-frame .vjs-mute-control,
.stream-compact-page .stream-video-frame .vjs-mute-control {
  flex: 0 0 34px !important;
  width: 34px !important;
  min-width: 34px !important;
  margin: 0 !important;
}

.stream-page .stream-video-frame .vjs-volume-control,
.stream-compact-page .stream-video-frame .vjs-volume-control {
  display: flex !important;
  flex: 0 0 86px !important;
  width: 86px !important;
  height: 28px !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

.stream-page .stream-video-frame .vjs-volume-bar,
.stream-compact-page .stream-video-frame .vjs-volume-bar {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: 82px !important;
  height: 8px !important;
  margin: 0 !important;
  transform: none !important;
}

.stream-page .stream-video-frame .vjs-volume-level,
.stream-compact-page .stream-video-frame .vjs-volume-level {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  height: 100% !important;
  margin: 0 !important;
}

.stream-page .stream-video-frame .vjs-volume-level:before,
.stream-compact-page .stream-video-frame .vjs-volume-level:before,
.stream-page .stream-video-frame .vjs-volume-tooltip,
.stream-compact-page .stream-video-frame .vjs-volume-tooltip,
.stream-page .stream-video-frame .vjs-mouse-display,
.stream-compact-page .stream-video-frame .vjs-mouse-display {
  content: "" !important;
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.stream-page .stream-video-frame .vjs-fullscreen-control,
.stream-compact-page .stream-video-frame .vjs-fullscreen-control {
  order: 99 !important;
  flex: 0 0 34px !important;
  margin-left: auto !important;
}

/* 2026-08-26 no-outer-gaps: pin stream pages to the viewport edge. */
@media (min-width: 921px) {
  body.stream-page,
  body.stream-records-page,
  body.stream-bans-page,
  body.stream-chat-popout-page {
    padding: 0 !important;
    margin: 0 !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
  }

  .stream-compact-page .stream-shell,
  .stream-compact-page.stream-page.is-theater .stream-shell,
  .stream-records-page .stream-shell,
  .stream-bans-page .stream-shell,
  .stream-chat-popout-page .stream-chat-popout-shell {
    margin: 0 !important;
    transform-origin: top left !important;
  }
}

/* 2026-08-26 full-viewport: use the whole browser viewport on stream pages. */
@media (min-width: 921px) {
  body.stream-page {
    --stream-skin-width: 100vw !important;
    --stream-skin-height: 100vh !important;
    --stream-side-width: clamp(300px, 19vw, 390px) !important;
    overflow: hidden !important;
  }

  .stream-compact-page .stream-shell,
  .stream-compact-page.stream-page.is-theater .stream-shell,
  .stream-records-page .stream-shell,
  .stream-bans-page .stream-shell,
  .stream-chat-popout-page .stream-chat-popout-shell {
    width: 100vw !important;
    height: 100vh !important;
    transform: none !important;
  }

  .stream-compact-page .stream-shell > tbody {
    grid-template-columns: minmax(0, calc(100vw - var(--stream-side-width))) var(--stream-side-width) !important;
    grid-template-rows: 18px 62px calc(100vh - 80px) !important;
    width: 100vw !important;
    height: 100vh !important;
  }

  .stream-records-page .stream-shell > tbody,
  .stream-bans-page .stream-shell > tbody {
    grid-template-rows: 18px 62px calc(100vh - 80px) !important;
    width: 100vw !important;
    height: 100vh !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell > tbody {
    grid-template-rows: 18px calc(100vh - 18px) !important;
    width: 100vw !important;
    height: 100vh !important;
  }

  .stream-compact-page .topbar,
  .stream-records-page .topbar,
  .stream-bans-page .topbar,
  .stream-chat-popout-page .topbar,
  .stream-compact-page .header,
  .stream-records-page .header,
  .stream-bans-page .header {
    width: 100vw !important;
  }

  .stream-compact-page .stream-main,
  .stream-compact-page.stream-page.is-theater .stream-main {
    box-sizing: border-box !important;
    width: calc(100vw - var(--stream-side-width)) !important;
    height: calc(100vh - 80px) !important;
  }

  .stream-compact-page .stream-side {
    box-sizing: border-box !important;
    width: var(--stream-side-width) !important;
    height: calc(100vh - 80px) !important;
  }

  .stream-compact-page .stream-video-window {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: calc(100vh - 88px) !important;
    min-height: 0 !important;
  }

  .stream-compact-page .stream-video-frame {
    flex: 1 1 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
  }

  .stream-compact-page .stream-broadcast-title,
  .stream-compact-page .stream-status-strip {
    flex: 0 0 auto !important;
  }

  .stream-compact-page .stream-chat {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: calc(100vh - 88px) !important;
    min-height: 0 !important;
  }

  .stream-compact-page .stream-auth,
  .stream-compact-page .stream-chat form,
  .stream-compact-page .stream-chat-note {
    flex: 0 0 auto !important;
  }

  .stream-compact-page .stream-chat-list {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .stream-records-main,
  .stream-bans-main {
    box-sizing: border-box !important;
    width: 100vw !important;
    height: calc(100vh - 80px) !important;
  }

  .stream-records-window,
  .stream-bans-window {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: calc(100vh - 88px) !important;
    min-height: 0 !important;
  }

  .stream-records-list,
  .stream-bans-list {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .stream-chat-popout-cell {
    box-sizing: border-box !important;
    width: 100vw !important;
    height: calc(100vh - 18px) !important;
  }

  .stream-chat-popout-page .stream-chat {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100vh - 26px) !important;
  }
}

/* 2026-08-26 player-16x9-chatwide: no side letterboxing in OBS player. */
@media (min-width: 1201px) {
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) {
    --stream-main-width: min(calc(100vw - 280px), calc(177.7778vh - 283px)) !important;
    --stream-side-width: max(280px, calc(100vw - var(--stream-main-width))) !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-shell > tbody {
    grid-template-columns: var(--stream-main-width) var(--stream-side-width) !important;
  }
}

@media (min-width: 921px) and (max-width: 1200px) {
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-video-window {
    height: auto !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-video-frame {
    flex: 0 0 auto !important;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    max-height: none !important;
  }
}

/* 2026-08-26 offline-click-hint: secondary launch prompt under offline title. */
.stream-page .stream-player-fallback,
.stream-page .stream-player-fallback.stream-player-offline {
  flex-direction: column !important;
  gap: 8px !important;
  pointer-events: none !important;
}

.stream-page .stream-player-fallback .stream-player-fallback-hint {
  display: block !important;
  max-width: min(90%, 620px) !important;
  color: #d7ff75 !important;
  font-family: var(--retro-font) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 16px !important;
  text-shadow: 1px 1px 0 #003b12 !important;
  text-transform: none !important;
  white-space: normal !important;
}

@media (min-width: 921px) {
  .stream-page .stream-player-fallback .stream-player-fallback-hint {
    font-size: 14px !important;
    line-height: 18px !important;
  }
}

/* 2026-08-26 ui-scale-125: render stream pages like browser zoom 125%. */
@media (min-width: 921px) {
  body.stream-page {
    --stream-ui-scale: 1.25 !important;
    --stream-stage-width: 80vw !important;
    --stream-stage-height: 80vh !important;
    --stream-side-width: clamp(240px, 15.2vw, 312px) !important;
  }

  .stream-compact-page .stream-shell,
  .stream-compact-page.stream-page.is-theater .stream-shell,
  .stream-records-page .stream-shell,
  .stream-bans-page .stream-shell,
  .stream-chat-popout-page .stream-chat-popout-shell {
    width: var(--stream-stage-width) !important;
    height: var(--stream-stage-height) !important;
    transform: scale(var(--stream-ui-scale)) !important;
    transform-origin: top left !important;
  }

  .stream-compact-page .stream-shell > tbody {
    grid-template-columns: minmax(0, calc(var(--stream-stage-width) - var(--stream-side-width))) var(--stream-side-width) !important;
    grid-template-rows: 18px 62px calc(var(--stream-stage-height) - 80px) !important;
    width: var(--stream-stage-width) !important;
    height: var(--stream-stage-height) !important;
  }

  .stream-records-page .stream-shell > tbody,
  .stream-bans-page .stream-shell > tbody {
    grid-template-rows: 18px 62px calc(var(--stream-stage-height) - 80px) !important;
    width: var(--stream-stage-width) !important;
    height: var(--stream-stage-height) !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell > tbody {
    grid-template-rows: 18px calc(var(--stream-stage-height) - 18px) !important;
    width: var(--stream-stage-width) !important;
    height: var(--stream-stage-height) !important;
  }

  .stream-compact-page .topbar,
  .stream-records-page .topbar,
  .stream-bans-page .topbar,
  .stream-chat-popout-page .topbar,
  .stream-compact-page .header,
  .stream-records-page .header,
  .stream-bans-page .header {
    width: var(--stream-stage-width) !important;
  }

  .stream-compact-page .stream-main,
  .stream-compact-page.stream-page.is-theater .stream-main {
    width: calc(var(--stream-stage-width) - var(--stream-side-width)) !important;
    height: calc(var(--stream-stage-height) - 80px) !important;
  }

  .stream-compact-page .stream-side {
    width: var(--stream-side-width) !important;
    height: calc(var(--stream-stage-height) - 80px) !important;
  }

  .stream-compact-page .stream-video-window {
    height: calc(var(--stream-stage-height) - 88px) !important;
  }

  .stream-compact-page .stream-chat {
    height: calc(var(--stream-stage-height) - 88px) !important;
  }

  .stream-records-main,
  .stream-bans-main {
    width: var(--stream-stage-width) !important;
    height: calc(var(--stream-stage-height) - 80px) !important;
  }

  .stream-records-window,
  .stream-bans-window {
    height: calc(var(--stream-stage-height) - 88px) !important;
  }

  .stream-chat-popout-cell {
    width: var(--stream-stage-width) !important;
    height: calc(var(--stream-stage-height) - 18px) !important;
  }

  .stream-chat-popout-page .stream-chat {
    height: calc(var(--stream-stage-height) - 26px) !important;
  }
}

@media (min-width: 1201px) {
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) {
    --stream-main-width: min(calc(var(--stream-stage-width) - 224px), calc(142.2222vh - 283px)) !important;
    --stream-side-width: max(224px, calc(var(--stream-stage-width) - var(--stream-main-width))) !important;
  }
}

/* 2026-08-26 video-no-black-outline: keep live video flush inside the retro window. */
.stream-page .stream-video-frame {
  overflow: hidden !important;
  background: #06150b !important;
}

.stream-page .stream-video-frame .video-js,
.stream-page .stream-video-frame .video-js .vjs-tech,
.stream-page .stream-video-frame .vjs-tech,
.stream-page .stream-video-frame video,
.stream-page .stream-video-frame video.vjs-tech,
.stream-page .stream-video-frame .vjs-poster {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.stream-page .stream-video-frame .video-js,
.stream-page .stream-video-frame .video-js .vjs-tech,
.stream-page .stream-video-frame video,
.stream-page .stream-video-frame video.vjs-tech {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  background: transparent !important;
  background-color: transparent !important;
}

/* 2026-08-26 video-top-strip: remove the dark inset line above live video. */
.stream-page .stream-video-frame {
  border-top: 0 !important;
}

/* 2026-08-26 auto-hide-controls: hide player UI when pointer is idle or outside. */
.stream-page .stream-video-frame .vjs-control-bar,
.stream-compact-page .stream-video-frame .vjs-control-bar {
  transition: opacity .16s linear, transform .16s linear, visibility 0s linear .16s !important;
}

.stream-page .stream-video-frame.controls-auto-hidden .vjs-control-bar,
.stream-compact-page .stream-video-frame.controls-auto-hidden .vjs-control-bar {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(10px) !important;
}

.stream-page .stream-video-frame:not(.controls-auto-hidden) .vjs-control-bar,
.stream-compact-page .stream-video-frame:not(.controls-auto-hidden) .vjs-control-bar {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
  transition-delay: 0s !important;
}

/* 2026-08-26 topbar-marquee-center: center ticker against the full topbar. */
@media (min-width: 921px) {
  .stream-page .topbar {
    position: relative !important;
  }

  .stream-page .topbar .led,
  .stream-page .topbar > b,
  .stream-page .stream-top-tab,
  .stream-page .stream-back-link,
  .stream-page .stream-chat-back-link {
    position: relative !important;
    z-index: 2 !important;
  }

  .stream-page .topbar-marquee {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 100% !important;
    padding: 0 clamp(118px, 13vw, 220px) !important;
    box-sizing: border-box !important;
    text-align: center !important;
    pointer-events: none !important;
  }

  .stream-page .topbar-marquee span,
  .stream-page .topbar-marquee > span {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    overflow: hidden !important;
    text-align: center !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    animation: none !important;
  }
}

/* 2026-08-26 stream-chat-images: show safe image URL previews in chat. */
.stream-chat-image-link {
  display: block !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin-top: 4px !important;
}

.stream-chat-image {
  display: block !important;
  max-width: 100% !important;
  max-height: 220px !important;
  border: 2px inset #bfbfbf !important;
  background: #000 !important;
  object-fit: contain !important;
}

/* 2026-08-26 stream-viewers-full-list: show every named stream viewer. */
.stream-compact-page .stream-status-strip {
  height: auto !important;
  min-height: 26px !important;
  align-items: start !important;
}

.stream-compact-page .stream-status-strip .stream-viewer-row {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  min-width: 0 !important;
  overflow: visible !important;
  white-space: normal !important;
}

.stream-compact-page #streamListeners {
  flex: 0 0 auto !important;
  min-width: 0 !important;
}

.stream-compact-page #streamViewerNames {
  display: inline-flex !important;
  flex: 1 1 auto !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0 4px !important;
  min-width: 0 !important;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.stream-compact-page #streamViewerNames .stream-viewer-name {
  flex: 0 0 auto !important;
}

.stream-compact-page #streamViewerNames .stream-viewer-separator {
  flex: 0 0 auto !important;
}

/* 2026-08-27 stream-audit: final accessibility and player interaction guard. */
.stream-page .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.stream-page .stream-video-frame {
  isolation: isolate !important;
}

.stream-page .stream-video-frame.is-offline {
  cursor: pointer !important;
}

.stream-page .stream-video-frame.is-online {
  cursor: default !important;
}

.stream-page .stream-video-frame:focus-visible {
  outline: 2px dotted #ffff66 !important;
  outline-offset: -4px !important;
}

.stream-page .stream-player-fallback {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 2 !important;
}

.stream-page .stream-video-frame.is-online .stream-player-fallback,
.stream-page .stream-player-fallback[hidden] {
  pointer-events: none !important;
  display: none !important;
}

.stream-page .stream-player-fallback .stream-player-fallback-hint {
  display: block !important;
  margin-top: 8px !important;
  font-size: clamp(12px, .46em, 18px) !important;
  line-height: 1.25 !important;
  opacity: .82 !important;
}

.stream-auth.is-logged-in .stream-auth-login-field,
.stream-auth.is-logged-in [data-auth-action],
.stream-auth.is-logged-out #streamLogoutBtn {
  display: none !important;
}

/* 2026-08-28 stream-audit final cascade: keep current stream layout above legacy rules. */
@media (max-width: 920px) {
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) {
    height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-shell {
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }
}

.stream-page .stream-video-frame > video.stream-video-tech {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  object-fit: cover !important;
  background: transparent !important;
}

/* 2026-08-28 mobile-stream-fix final: override legacy mobile rules after all old layers. */
@media (max-width: 920px) {
  .stream-page .window-title {
    min-height: 21px !important;
    padding: 1px 4px !important;
    gap: 4px !important;
    overflow: hidden !important;
  }

  .stream-page .window-title .stream-window-heading {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 4px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    scrollbar-width: none !important;
  }

  .stream-page .window-title .stream-window-heading::-webkit-scrollbar {
    display: none !important;
  }

  .stream-page .window-title .stream-donate-link,
  .stream-page .window-title .stream-records-link,
  .stream-page .window-title .stream-dead-link,
  .stream-page .window-title .stream-back-link {
    flex: 0 0 auto !important;
    min-width: max-content !important;
    padding: 1px 5px !important;
    font-size: 11px !important;
    line-height: 13px !important;
  }

  .stream-page .stream-video-window .window-title .win-buttons,
  .stream-page .stream-video-window .window-title .stream-quality-control {
    display: none !important;
  }

  .stream-page .stream-smiley-picker {
    display: flex !important;
    grid-template-columns: none !important;
    flex: 0 0 37px !important;
    width: 100% !important;
    height: 37px !important;
    min-height: 37px !important;
    max-height: 37px !important;
    gap: 2px !important;
    padding: 2px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  .stream-page .stream-smiley-picker .smiley-button {
    flex: 0 0 46px !important;
    width: 46px !important;
    min-width: 46px !important;
    height: 31px !important;
    padding: 1px !important;
  }

  .stream-page .stream-smiley-picker .smiley-button img {
    max-width: 100% !important;
    max-height: 27px !important;
    object-fit: contain !important;
  }

  body.stream-chat-popout-page {
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell {
    display: block !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-width: 2px !important;
    transform: none !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell > tbody {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 21px minmax(0, 1fr) !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell > tbody > tr {
    display: contents !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }

  .stream-chat-popout-page .topbar {
    grid-row: 1 !important;
    width: 100% !important;
    height: 21px !important;
    padding: 2px 5px !important;
    overflow: hidden !important;
  }

  .stream-chat-popout-cell {
    grid-row: 2 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 2px !important;
    overflow: hidden !important;
  }

  .stream-chat-popout-page .stream-chat {
    display: grid !important;
    grid-template-rows: 19px auto minmax(0, 1fr) auto 16px !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 3px !important;
    overflow: hidden !important;
  }

  .stream-chat-popout-page .stream-chat-list {
    height: auto !important;
    min-height: 0 !important;
    overflow: auto !important;
  }

  body.stream-bans-page {
    height: 100dvh !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
  }

  .stream-bans-page .stream-shell {
    display: block !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }

  .stream-bans-page .stream-shell > tbody {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 20px auto minmax(0, 1fr) !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  .stream-bans-page .stream-shell > tbody > tr {
    display: contents !important;
  }

  .stream-bans-page .stream-shell td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }

  .stream-bans-page .topbar {
    grid-row: 1 !important;
    width: 100% !important;
    height: 20px !important;
  }

  .stream-bans-page .header {
    grid-row: 2 !important;
    width: 100% !important;
    height: auto !important;
  }

  .stream-bans-page .stream-bans-main {
    grid-row: 3 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 3px !important;
    overflow: hidden !important;
  }

  .stream-bans-page .stream-bans-window {
    display: grid !important;
    grid-template-rows: 21px auto minmax(0, 1fr) !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .stream-bans-page .stream-bans-controls {
    margin: 3px !important;
    padding: 3px !important;
  }

  .stream-bans-page .stream-bans-list {
    display: block !important;
    width: calc(100% - 6px) !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 3px !important;
    padding: 5px !important;
    overflow: auto !important;
    box-sizing: border-box !important;
  }

  .stream-bans-page .stream-ban-card {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .stream-bans-page .stream-ban-meta {
    grid-template-columns: 1fr !important;
    gap: 2px !important;
  }
}

/* 2026-08-28 records-actions-compact: recordings must not stretch their action links. */
.stream-records-page .stream-records-list {
  align-content: start !important;
  align-items: stretch !important;
}

.stream-records-page .stream-record-item {
  align-self: start !important;
  min-height: 0 !important;
}

.stream-records-page .stream-record-actions {
  align-items: center !important;
}

.stream-records-page .stream-record-actions a,
.stream-records-page .stream-record-actions button {
  box-sizing: border-box !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 18px !important;
  max-height: 22px !important;
  padding: 1px 6px !important;
  line-height: 14px !important;
}

@media (max-width: 920px) {
  .stream-records-page .stream-records-list {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    gap: 6px !important;
  }

  .stream-records-page .stream-record-item {
    flex: 0 0 auto !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 4px !important;
    align-items: start !important;
    width: 100% !important;
    padding: 6px !important;
    box-sizing: border-box !important;
  }

  .stream-records-page .stream-record-date {
    white-space: normal !important;
  }

  .stream-records-page .stream-record-meta b,
  .stream-records-page .stream-record-meta span {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .stream-records-page .stream-record-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    margin-top: 1px !important;
  }

  .stream-records-page .stream-record-actions a,
  .stream-records-page .stream-record-actions button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    font-size: 11px !important;
  }
}

/* 2026-08-28 stream-vip: richer message style. */

.stream-page .stream-chat-entry.is-vip:not(.is-admin):not(.is-moderation) {
  margin: 2px 0 !important;
  padding: 3px 4px !important;
  border: 1px dashed #b58a00 !important;
  background: linear-gradient(90deg, #fff3a0 0%, #ffffcf 70%) !important;
  box-shadow: inset 1px 1px 0 #fffde0, inset -1px -1px 0 #d7b43a !important;
}

.stream-page .stream-chat-entry.is-vip:not(.is-admin):not(.is-moderation) b {
  color: #7c4d00 !important;
  text-shadow: 1px 1px 0 #fff5a0 !important;
}

.stream-page .stream-chat-entry.is-vip:not(.is-admin):not(.is-moderation) time {
  color: #8a5a00 !important;
}

/* 2026-08-28 mobile-scroll-final: phones must be able to scroll the whole stream page. */
@media (max-width: 920px) {
  body.stream-page,
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page),
  body.stream-records-page,
  body.stream-bans-page,
  body.stream-chat-popout-page {
    height: auto !important;
    min-height: 100dvh !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .stream-page .stream-shell,
  .stream-records-page .stream-shell,
  .stream-bans-page .stream-shell,
  .stream-chat-popout-page .stream-chat-popout-shell {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .stream-page .stream-shell > tbody,
  .stream-records-page .stream-shell > tbody,
  .stream-bans-page .stream-shell > tbody,
  .stream-chat-popout-page .stream-chat-popout-shell > tbody {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .stream-page .stream-shell > tbody > tr,
  .stream-records-page .stream-shell > tbody > tr,
  .stream-bans-page .stream-shell > tbody > tr,
  .stream-chat-popout-page .stream-chat-popout-shell > tbody > tr {
    display: block !important;
    width: 100% !important;
  }

  .stream-main,
  .stream-side,
  .stream-records-main,
  .stream-bans-main,
  .stream-chat-popout-cell {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .stream-video-window,
  .stream-chat,
  .stream-records-window,
  .stream-bans-window,
  .stream-chat-popout-page .stream-chat {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .stream-chat-list,
  .stream-records-list,
  .stream-bans-list {
    max-height: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .stream-page .stream-shell,
  .stream-chat-popout-page .stream-chat-popout-shell {
    margin-bottom: 72px !important;
  }
}

/* 2026-08-28 vip-image-icon: VIP badge is a real image, not a CSS drawing. */
.stream-page img.stream-vip-sun,
.stream-page img.stream-jec-mask {
  position: static !important;
  display: inline-block !important;
  flex: 0 0 16px !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  margin: 0 1px !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain !important;
  vertical-align: -3px !important;
}

/* 2026-08-28 test-viewers-layout: keep many viewer names neat in the bottom counter. */
.stream-compact-page .stream-status-strip .stream-viewer-row {
  align-items: center !important;
  min-width: 0 !important;
}

.stream-compact-page #streamViewerNames {
  align-items: center !important;
  gap: 0 4px !important;
  min-width: 0 !important;
}

.stream-compact-page #streamViewerNames.has-many-viewers {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
  scrollbar-width: thin !important;
  scrollbar-color: #0b5a18 #ffffc4 !important;
}

.stream-compact-page #streamViewerNames.has-many-viewers::-webkit-scrollbar {
  height: 8px !important;
}

.stream-compact-page #streamViewerNames.has-many-viewers::-webkit-scrollbar-track {
  background: #ffffc4 !important;
}

.stream-compact-page #streamViewerNames.has-many-viewers::-webkit-scrollbar-thumb {
  background: #0b5a18 !important;
  border: 1px solid #ffff9e !important;
}

.stream-compact-page #streamViewerNames.has-many-viewers .stream-viewer-name {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  gap: 3px !important;
  padding: 0 4px !important;
  border: 1px inset #d6d68a !important;
  background: #ffffd6 !important;
  line-height: 16px !important;
}

.stream-compact-page #streamViewerNames.has-many-viewers .stream-viewer-separator {
  flex: 0 0 auto !important;
}

@media (max-width: 920px) {
  .stream-compact-page .stream-status-strip .stream-viewer-row {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    gap: 4px !important;
  }

  .stream-compact-page #streamViewerNames.has-many-viewers {
    max-width: 100% !important;
    padding-bottom: 2px !important;
  }

  .stream-compact-page #streamViewerNames.has-many-viewers .stream-viewer-name {
    line-height: 18px !important;
  }
}

/* 2026-08-28 mobile-chat-input: keep the chat textarea reachable above phone keyboards. */
@media (max-width: 920px) {
  body.stream-page {
    scroll-padding-bottom: max(180px, 45dvh) !important;
  }

  .stream-page #streamChatForm {
    scroll-margin-bottom: max(180px, 45dvh) !important;
  }

  .stream-page #streamGuestMessage {
    min-height: 44px !important;
    font-size: 16px !important;
    line-height: 1.25 !important;
    scroll-margin-bottom: max(180px, 45dvh) !important;
    touch-action: manipulation !important;
  }
}

/* 2026-08-28 mobile-chat-visible: keep stream chat input writable on phones. */
@media (max-width: 920px) {
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-side {
    overflow: visible !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-chat {
    display: grid !important;
    grid-template-rows: auto auto minmax(138px, 38dvh) auto auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-chat-list {
    height: clamp(170px, 38dvh, 330px) !important;
    min-height: 138px !important;
    max-height: clamp(170px, 38dvh, 330px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamChatForm {
    display: grid !important;
    grid-template-rows: auto auto auto !important;
    gap: 4px !important;
    margin: 4px 0 0 !important;
    padding: 4px !important;
    background: #ffffbd !important;
    border-top: 2px solid #827f54 !important;
    position: relative !important;
    z-index: 4 !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamGuestMessage {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 88px !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamChatForm button[type="submit"] {
    display: block !important;
    width: 100% !important;
    min-height: 28px !important;
    line-height: 18px !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-smiley-picker {
    flex: none !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  body.stream-chat-popout-page {
    overflow: hidden !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell {
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell > tbody {
    display: grid !important;
    grid-template-rows: 21px minmax(0, 1fr) !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .stream-chat-popout-page .stream-chat-popout-shell > tbody > tr {
    display: contents !important;
  }

  .stream-chat-popout-page .stream-chat-popout-cell {
    display: block !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .stream-chat-popout-page .stream-chat {
    display: grid !important;
    grid-template-rows: 19px auto minmax(120px, 1fr) auto 16px !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .stream-chat-popout-page .stream-chat-list {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .stream-chat-popout-page #streamChatForm {
    display: grid !important;
    grid-template-rows: auto auto auto !important;
    gap: 4px !important;
    min-height: 0 !important;
  }
}

/* 2026-08-28 mobile-viewer-count: never let long viewer names hide the count. */
@media (max-width: 920px) {
  .stream-compact-page .stream-status-strip .stream-viewer-row {
    display: grid !important;
    grid-template-columns: max-content max-content !important;
    column-gap: 4px !important;
    row-gap: 2px !important;
    align-items: center !important;
    justify-content: start !important;
    overflow: visible !important;
  }

  .stream-compact-page .stream-status-strip .stream-viewer-row > b {
    grid-column: 1 !important;
    min-width: max-content !important;
    white-space: nowrap !important;
  }

  .stream-compact-page #streamListeners {
    grid-column: 2 !important;
    display: inline-block !important;
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }

  .stream-compact-page #streamViewerNames {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

/* 2026-08-28 mobile-viewer-count-v2: names stay in the third column; count stays visible. */
@media (max-width: 920px) {
  .stream-compact-page .stream-status-strip .stream-viewer-row {
    display: grid !important;
    grid-template-columns: max-content max-content minmax(0, 1fr) !important;
    column-gap: 4px !important;
    row-gap: 0 !important;
    align-items: center !important;
    justify-content: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .stream-compact-page .stream-status-strip .stream-viewer-row > b {
    grid-column: 1 !important;
    min-width: max-content !important;
    max-width: max-content !important;
    overflow: visible !important;
  }

  .stream-compact-page #streamListeners {
    grid-column: 2 !important;
    display: inline-block !important;
    width: auto !important;
    min-width: 2.5em !important;
    max-width: max-content !important;
    overflow: visible !important;
    text-align: left !important;
  }

  .stream-compact-page #streamViewerNames,
  .stream-compact-page #streamViewerNames.has-many-viewers {
    grid-column: 3 !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
}

/* 2026-08-28 mobile-viewer-count-v3: flex keeps "зрители: N:" together. */
@media (max-width: 920px) {
  .stream-compact-page .stream-status-strip .stream-viewer-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0 4px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
  }

  .stream-compact-page .stream-status-strip .stream-viewer-row > b {
    flex: 0 0 auto !important;
    display: inline !important;
    min-width: 0 !important;
    max-width: none !important;
    white-space: nowrap !important;
  }

  .stream-compact-page #streamListeners {
    flex: 0 0 auto !important;
    display: inline !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow: visible !important;
    text-align: left !important;
    white-space: nowrap !important;
  }

  .stream-compact-page #streamViewerNames,
  .stream-compact-page #streamViewerNames.has-many-viewers {
    flex: 1 1 auto !important;
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
  }
}

/* 2026-08-28 mobile-chat-input-visible-v4: put the composer where phones can reach it. */
@media (max-width: 920px) {
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-chat {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-chat .box-title {
    order: 1 !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-auth {
    order: 2 !important;
    flex: 0 0 auto !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamChatForm {
    order: 3 !important;
    flex: 0 0 auto !important;
    display: grid !important;
    grid-template-rows: auto auto auto !important;
    gap: 4px !important;
    margin: 4px 0 !important;
    padding: 4px !important;
    background: #ffffbd !important;
    border-top: 2px solid #827f54 !important;
    border-bottom: 2px solid #d8d8a8 !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-smiley-picker {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamGuestMessage {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 84px !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamChatForm button[type="submit"] {
    min-height: 28px !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-chat-list {
    order: 4 !important;
    flex: 0 0 auto !important;
    height: clamp(128px, 24dvh, 210px) !important;
    min-height: 128px !important;
    max-height: clamp(128px, 24dvh, 210px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-chat-note {
    order: 5 !important;
    flex: 0 0 auto !important;
  }
}

/* 2026-08-28 player-quality-ui-v5: quality selector lives inside the player UI. */
.stream-page .stream-video-window .window-title .stream-quality-control {
  display: none !important;
}

.stream-page .stream-video-frame .stream-quality-control-player {
  position: absolute !important;
  right: 48px !important;
  bottom: 8px !important;
  z-index: 9 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  height: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  padding: 2px 5px !important;
  border: 2px inset #d8d8d8 !important;
  border-radius: 0 !important;
  background: rgba(255, 255, 198, .92) !important;
  color: #004000 !important;
  font-family: var(--font-bold) !important;
  font-size: 10px !important;
  line-height: 12px !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  pointer-events: auto !important;
  transition: opacity .16s linear, transform .16s linear, visibility 0s linear .16s !important;
}

.stream-page .stream-video-frame .stream-quality-control-player select {
  width: 92px !important;
  height: 16px !important;
  min-height: 16px !important;
  padding: 0 1px !important;
  border: 1px inset #8c8c8c !important;
  border-radius: 0 !important;
  background: #ffffc8 !important;
  color: #004000 !important;
  font-family: var(--font-bold) !important;
  font-size: 10px !important;
  line-height: 12px !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  pointer-events: auto !important;
}

.stream-page .stream-video-frame.controls-auto-hidden .stream-quality-control-player {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(10px) !important;
}

.stream-page .stream-video-frame:not(.controls-auto-hidden) .stream-quality-control-player,
.stream-page .stream-video-frame:focus-within .stream-quality-control-player {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  transition-delay: 0s !important;
}

@media (max-width: 920px) {
  .stream-page .stream-video-frame .stream-quality-control-player {
    right: 8px !important;
    bottom: 38px !important;
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    padding: 1px 4px !important;
    font-size: 9px !important;
    line-height: 10px !important;
  }

  .stream-page .stream-video-frame .stream-quality-control-player select {
    width: 70px !important;
    height: 15px !important;
    min-height: 15px !important;
    font-size: 9px !important;
    line-height: 10px !important;
  }
}

/* 2026-08-28 mobile-chat-room-v6: make the main stream chat readable on phones. */
@media (max-width: 920px) {
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) {
    height: auto !important;
    min-height: 100dvh !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-shell {
    width: 100% !important;
    max-width: 100vw !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 auto 72px !important;
    overflow: visible !important;
    transform: none !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-shell > tbody,
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-shell > tbody > tr,
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-shell > tbody > tr > td {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-main,
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-side {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 4px 5px !important;
    overflow: visible !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-video-window {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-video-frame {
    display: block !important;
    width: calc(100% - 6px) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 16 / 9 !important;
    margin: 3px !important;
    overflow: hidden !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-broadcast-title {
    margin: 0 3px !important;
    padding: 5px 8px 4px !important;
    font-size: clamp(20px, 7.3vw, 29px) !important;
    line-height: 1.05 !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-status-strip {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 3px !important;
    min-height: 0 !important;
    margin: 0 3px 4px !important;
    padding: 5px 8px !important;
    font-size: 12px !important;
    line-height: 17px !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-status-strip span:nth-child(2) {
    display: none !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-chat {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-chat .box-title {
    order: 1 !important;
    flex: 0 0 auto !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-auth {
    order: 2 !important;
    flex: 0 0 auto !important;
    padding: 5px 7px !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-auth-state {
    font-size: 12px !important;
    line-height: 16px !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-chat-list {
    order: 3 !important;
    flex: 0 0 auto !important;
    display: block !important;
    height: clamp(280px, 48dvh, 520px) !important;
    min-height: 280px !important;
    max-height: 520px !important;
    margin: 0 !important;
    padding: 6px 7px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    font-size: 13px !important;
    line-height: 1.28 !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-chat-entry {
    padding: 3px 0 !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamChatForm {
    order: 4 !important;
    flex: 0 0 auto !important;
    display: grid !important;
    grid-template-rows: auto auto auto !important;
    gap: 4px !important;
    margin: 4px 0 0 !important;
    padding: 4px !important;
    background: #ffffbd !important;
    border-top: 2px solid #827f54 !important;
    border-bottom: 0 !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-smiley-picker {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamGuestMessage {
    height: 58px !important;
    min-height: 58px !important;
    max-height: 96px !important;
    font-size: 16px !important;
    line-height: 1.25 !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamChatForm button[type="submit"] {
    min-height: 31px !important;
    font-size: 12px !important;
    line-height: 18px !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-chat-note {
    order: 5 !important;
    flex: 0 0 auto !important;
  }
}

@media (max-width: 420px) {
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-chat-list {
    height: clamp(300px, 50dvh, 560px) !important;
    min-height: 300px !important;
  }
}

/* 2026-08-28 controlbar-quality-v7: quality selector is part of the player controls row. */
.stream-page .stream-video-frame.has-custom-controls > video.stream-video-tech::-webkit-media-controls {
  display: none !important;
}

.stream-page .stream-video-frame .stream-player-controls {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 12 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 5px 8px !important;
  border-top: 1px solid rgba(255, 255, 220, .35) !important;
  background: linear-gradient(180deg, rgba(15, 15, 15, .08), rgba(0, 0, 0, .74)) !important;
  color: #ffffcc !important;
  font: 12px/1 var(--font-bold) !important;
  box-sizing: border-box !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: opacity .16s linear, transform .16s linear, visibility 0s linear .16s !important;
}

.stream-page .stream-video-frame.controls-auto-hidden .stream-player-controls {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(8px) !important;
}

.stream-page .stream-video-frame:not(.controls-auto-hidden) .stream-player-controls,
.stream-page .stream-video-frame:focus-within .stream-player-controls {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  transition-delay: 0s !important;
}

.stream-page .stream-player-control {
  flex: 0 0 34px !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 26px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #ffffcc !important;
  font: 12px/1 var(--font-bold) !important;
  text-align: center !important;
  text-shadow: 1px 1px #003000 !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.stream-page .stream-player-control:active {
  color: #99ff33 !important;
}

.stream-page .stream-player-volume {
  flex: 0 0 150px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-width: 150px !important;
  max-width: 150px !important;
  height: 26px !important;
  color: #ffffcc !important;
  font: 10px/1 var(--font-bold) !important;
  text-shadow: 1px 1px #003000 !important;
}

.stream-page .stream-volume-toggle {
  flex: 0 0 34px !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 22px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #ffffcc !important;
  font: 10px/1 var(--font-bold) !important;
  text-align: left !important;
  text-shadow: 1px 1px #003000 !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.stream-page .stream-volume-toggle[aria-pressed="true"] {
  color: #ff6666 !important;
}

.stream-page .stream-player-volume input[type="range"] {
  flex: 1 1 auto !important;
  width: 96px !important;
  min-width: 80px !important;
  max-width: 112px !important;
  height: 10px !important;
  margin: 0 !important;
  accent-color: #99ff33 !important;
  cursor: pointer !important;
}

.stream-page .stream-video-frame .stream-player-controls .stream-quality-control-player {
  position: static !important;
  inset: auto !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  width: auto !important;
  height: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  padding: 1px 5px !important;
  border: 1px inset rgba(255, 255, 204, .72) !important;
  background: rgba(0, 32, 12, .78) !important;
  color: #ffffcc !important;
  font: 10px/1 var(--font-bold) !important;
  text-shadow: 1px 1px #003000 !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  transition: none !important;
  pointer-events: auto !important;
  margin-left: auto !important;
}

.stream-page .stream-video-frame .stream-player-controls .stream-quality-control-player select {
  width: 74px !important;
  height: 18px !important;
  min-height: 18px !important;
  padding: 0 1px !important;
  border: 1px inset #d7d7b7 !important;
  border-radius: 0 !important;
  background: #ffffc8 !important;
  color: #004000 !important;
  font: 10px/1 var(--font-bold) !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.stream-page .stream-player-fullscreen {
  margin-left: 0 !important;
}

@media (max-width: 920px) {
  .stream-page .stream-video-frame .stream-player-controls {
    gap: 5px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 4px 6px !important;
  }

  .stream-page .stream-player-control {
    flex-basis: 28px !important;
    width: 28px !important;
    min-width: 28px !important;
    height: 22px !important;
    font-size: 11px !important;
  }

  .stream-page .stream-player-volume {
    flex-basis: 116px !important;
    min-width: 116px !important;
    max-width: 116px !important;
    gap: 5px !important;
    height: 22px !important;
    font-size: 9px !important;
  }

  .stream-page .stream-volume-toggle {
    flex-basis: 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    height: 20px !important;
    font-size: 9px !important;
  }

  .stream-page .stream-player-volume input[type="range"] {
    width: 64px !important;
    min-width: 54px !important;
    max-width: 66px !important;
  }

  .stream-page .stream-video-frame .stream-player-controls .stream-quality-control-player {
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    padding: 1px 3px !important;
    gap: 3px !important;
    font-size: 9px !important;
  }

  .stream-page .stream-video-frame .stream-player-controls .stream-quality-control-player span {
    font-size: 0 !important;
  }

  .stream-page .stream-video-frame .stream-player-controls .stream-quality-control-player span::after {
    content: "Q" !important;
    font-size: 9px !important;
  }

  .stream-page .stream-video-frame .stream-player-controls .stream-quality-control-player select {
    width: 54px !important;
    height: 16px !important;
    min-height: 16px !important;
    font-size: 9px !important;
  }
}

/* 2026-08-28 controls-online-only-v8: player UI is shown only while the stream is live. */
.stream-page .stream-video-frame:not(.is-online) .stream-player-controls,
.stream-compact-page .stream-video-frame:not(.is-online) .stream-player-controls {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* 2026-08-28 audit-fix: mobile chat composer and ban details must stay usable. */
@media (max-width: 920px) {
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-chat {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-auth {
    order: 1 !important;
    flex: 0 0 auto !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamChatForm {
    order: 2 !important;
    flex: 0 0 auto !important;
    margin: 4px 0 6px !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-chat-list {
    order: 3 !important;
    flex: 0 0 auto !important;
    height: clamp(220px, 42dvh, 390px) !important;
    min-height: 220px !important;
    max-height: clamp(220px, 42dvh, 390px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-chat-note {
    order: 4 !important;
    flex: 0 0 auto !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-smiley-picker {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    max-width: 100% !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-smiley-picker button,
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-smiley-picker .smiley-button {
    flex: 0 0 42px !important;
    width: 42px !important;
    min-width: 42px !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamGuestMessage {
    width: 100% !important;
    min-height: 58px !important;
    font-size: 16px !important;
    line-height: 1.25 !important;
  }
}

.stream-bans-page .stream-bans-list,
.stream-bans-page .stream-ban-card,
.stream-bans-page .stream-ban-line,
.stream-bans-page .stream-ban-meta,
.stream-bans-page .stream-ban-messages,
.stream-bans-page .stream-bans-message-list,
.stream-bans-page .stream-bans-message-list li,
.stream-bans-page .stream-bans-message-list span {
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

.stream-bans-page .stream-bans-message-list {
  padding-left: 20px !important;
}

@media (max-width: 920px) {
  .stream-bans-page .stream-bans-controls {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    gap: 5px !important;
    align-items: center !important;
  }

  .stream-bans-page .stream-bans-controls select {
    min-width: 0 !important;
    width: 100% !important;
  }

  .stream-bans-page .stream-ban-line,
  .stream-bans-page .stream-ban-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px 10px !important;
  }

  .stream-bans-page .stream-bans-message-list {
    padding-left: 16px !important;
  }
}

/* 2026-08-28 mobile-landscape-fullscreen: keep stream fullscreen horizontal on phones. */
.stream-page .stream-video-frame.force-landscape-fullscreen:fullscreen,
.stream-page .stream-video-frame.force-landscape-fullscreen:-webkit-full-screen {
  background: #06150b !important;
  overflow: hidden !important;
}

@media (max-width: 920px) and (orientation: portrait) {
  .stream-page .stream-video-frame.force-landscape-fullscreen:fullscreen,
  .stream-page .stream-video-frame.force-landscape-fullscreen:-webkit-full-screen {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: 100vh !important;
    width: 100dvh !important;
    height: 100vw !important;
    height: 100dvw !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
    transform-origin: center center !important;
  }

  .stream-page .stream-video-frame.force-landscape-fullscreen:fullscreen .stream-player-controls,
  .stream-page .stream-video-frame.force-landscape-fullscreen:-webkit-full-screen .stream-player-controls {
    padding-bottom: max(5px, env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 920px) and (orientation: landscape) {
  .stream-page .stream-video-frame.force-landscape-fullscreen:fullscreen,
  .stream-page .stream-video-frame.force-landscape-fullscreen:-webkit-full-screen {
    width: 100vw !important;
    width: 100dvw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    transform: none !important;
  }
}

/* 2026-08-28 fullscreen-idle-ui: focus must not pin controls open in fullscreen. */
.stream-page .stream-video-frame.controls-auto-hidden:fullscreen .stream-player-controls,
.stream-page .stream-video-frame.controls-auto-hidden:-webkit-full-screen .stream-player-controls {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(8px) !important;
}

/* 2026-08-28 smiley-toggle: keep chat smilies collapsed until clicked. */
.stream-chat .stream-smiley-toggle {
  display: block !important;
  width: 100% !important;
  margin: 0 0 2px !important;
  min-height: 22px !important;
  padding: 2px 4px !important;
  border: 1px outset #fff !important;
  background: #d7d7d7 !important;
  color: #004000 !important;
  font: 700 11px/1.1 var(--retro-font) !important;
  text-align: left !important;
  cursor: pointer !important;
}

.stream-chat .stream-smiley-toggle:active {
  border-style: inset !important;
}

.stream-chat .stream-smiley-toggle:disabled {
  opacity: .55 !important;
  cursor: default !important;
}

.stream-chat .stream-smiley-picker[hidden] {
  display: none !important;
}

body.stream-page .stream-chat .stream-smiley-picker[hidden],
body.stream-page.stream-compact-page .stream-chat .stream-smiley-picker[hidden],
body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-smiley-picker[hidden] {
  display: none !important;
}

/* 2026-08-28 offline-social-poster: branded offline card with service links. */
.stream-page .stream-player-fallback.stream-player-offline {
  display: block !important;
  inset: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #06150b !important;
  color: #eaff7b !important;
  text-align: left !important;
  pointer-events: auto !important;
}

.stream-page .stream-offline-poster {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  filter: saturate(.9) contrast(1.08) brightness(.78) !important;
  pointer-events: none !important;
  user-select: none !important;
}

.stream-page .stream-player-fallback.stream-player-offline::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background:
    linear-gradient(180deg, rgba(0, 28, 8, .18), rgba(0, 0, 0, .18) 45%, rgba(0, 0, 0, .72)),
    repeating-linear-gradient(0deg, rgba(170, 255, 109, .12) 0, rgba(170, 255, 109, .12) 1px, transparent 1px, transparent 4px) !important;
  pointer-events: none !important;
}

.stream-page .stream-offline-links {
  position: absolute !important;
  z-index: 3 !important;
  top: 10px !important;
  right: 10px !important;
  display: grid !important;
  gap: 5px !important;
  width: min(360px, calc(100% - 20px)) !important;
  pointer-events: auto !important;
}

.stream-page .stream-offline-links a {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 9px !important;
  min-height: 34px !important;
  padding: 3px 8px 3px 5px !important;
  border: 2px outset #d8d8d8 !important;
  background: rgba(255, 255, 190, .92) !important;
  color: #004000 !important;
  font: 700 12px/1.1 var(--retro-font) !important;
  text-decoration: underline !important;
  text-shadow: none !important;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .42) !important;
  overflow: hidden !important;
}

.stream-page .stream-offline-links a:hover,
.stream-page .stream-offline-links a:focus-visible {
  background: #ffffcf !important;
  color: #b00000 !important;
  outline: 1px dashed #ffff00 !important;
  outline-offset: 2px !important;
}

.stream-page .stream-offline-link-logo {
  display: inline-grid !important;
  place-items: center !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 28px !important;
  padding: 3px !important;
  border: 1px solid #001b08 !important;
  background: #f7ffd1 !important;
  color: transparent !important;
  font: 0/0 var(--retro-font) !important;
  text-decoration: none !important;
  text-shadow: none !important;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #9a9a72 !important;
  overflow: visible !important;
}

.stream-page .stream-offline-link-logo img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 24px !important;
  max-height: 22px !important;
  object-fit: contain !important;
  object-position: center center !important;
  border: 0 !important;
  background: transparent !important;
  pointer-events: none !important;
}

.stream-page .stream-offline-link-text {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

.stream-page .stream-offline-caption {
  position: absolute !important;
  z-index: 2 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 28px !important;
  display: grid !important;
  justify-items: center !important;
  gap: 7px !important;
  padding: 12px 10px !important;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .58)) !important;
  text-align: center !important;
  pointer-events: none !important;
}

.stream-page .stream-player-fallback.stream-player-offline #playerFallbackText {
  display: block !important;
  color: #eeff86 !important;
  font: 900 clamp(24px, 4.2vw, 48px)/1 var(--retro-font) !important;
  letter-spacing: 0 !important;
  text-transform: lowercase !important;
  text-shadow: 3px 3px 0 #003800, 0 0 10px rgba(238, 255, 134, .35) !important;
}

.stream-page .stream-player-fallback.stream-player-offline .stream-player-fallback-hint {
  display: block !important;
  color: rgba(238, 255, 134, .82) !important;
  font: 700 clamp(12px, 1.6vw, 18px)/1.15 var(--retro-font) !important;
  text-shadow: 2px 2px 0 #002b00 !important;
}

.stream-page .stream-video-frame.is-online .stream-player-fallback.stream-player-offline {
  display: none !important;
}

@media (max-width: 700px) {
  .stream-page .stream-offline-links {
    top: 6px !important;
    right: 6px !important;
    gap: 3px !important;
    width: min(270px, calc(100% - 12px)) !important;
  }

  .stream-page .stream-offline-links a {
    min-height: 29px !important;
    padding: 2px 5px 2px 4px !important;
    gap: 6px !important;
    font-size: 10px !important;
  }

  .stream-page .stream-offline-link-logo {
    width: 31px !important;
    min-width: 31px !important;
    height: 24px !important;
    padding: 3px !important;
  }

  .stream-page .stream-offline-link-logo img {
    max-width: 21px !important;
    max-height: 18px !important;
  }

  .stream-page .stream-offline-caption {
    bottom: 16px !important;
    gap: 4px !important;
    padding: 8px 8px !important;
  }

  .stream-page .stream-player-fallback.stream-player-offline #playerFallbackText {
    font-size: clamp(22px, 7.5vw, 34px) !important;
  }
}

/* 2026-08-28 mobile-icons-only: offline links on phones must not cover the poster. */
@media (max-width: 700px) {
  .stream-page .stream-offline-links {
    top: 7px !important;
    right: 7px !important;
    left: auto !important;
    display: grid !important;
    grid-template-columns: repeat(4, 34px) !important;
    width: auto !important;
    max-width: calc(100% - 14px) !important;
    gap: 4px !important;
    justify-content: end !important;
  }

  .stream-page .stream-offline-links a {
    display: grid !important;
    grid-template-columns: 1fr !important;
    place-items: center !important;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 2px !important;
    gap: 0 !important;
    overflow: visible !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-decoration: none !important;
  }

  .stream-page .stream-offline-link-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .stream-page .stream-offline-link-logo {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    padding: 3px !important;
  }

  .stream-page .stream-offline-link-logo img {
    max-width: 22px !important;
    max-height: 22px !important;
  }
}

/* 2026-08-28 ip-ban-wall: full-screen block for banned stream-chat IPs. */
body.stream-ip-banned {
  overflow: hidden !important;
}

.stream-ip-ban-wall {
  position: fixed !important;
  z-index: 2147483647 !important;
  inset: 0 !important;
  display: grid !important;
  place-items: center !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: #2d91d5 !important;
  cursor: not-allowed !important;
}

.stream-ip-ban-wall img {
  display: block !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  border: 0 !important;
  background: #2d91d5 !important;
}

.stream-ip-ban-wall span {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

/* 2026-08-28 offline-social-icons-only-final: desktop uses the same compact icons as mobile. */
.stream-page .stream-offline-links {
  top: 7px !important;
  right: 7px !important;
  left: auto !important;
  display: grid !important;
  grid-template-columns: repeat(4, 34px) !important;
  width: auto !important;
  max-width: calc(100% - 14px) !important;
  gap: 4px !important;
  justify-content: end !important;
}

.stream-page .stream-offline-links a {
  display: grid !important;
  grid-template-columns: 1fr !important;
  place-items: center !important;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 2px !important;
  gap: 0 !important;
  overflow: visible !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-decoration: none !important;
}

.stream-page .stream-offline-link-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.stream-page .stream-offline-link-logo {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  padding: 3px !important;
}

.stream-page .stream-offline-link-logo img {
  max-width: 22px !important;
  max-height: 22px !important;
}

/* 2026-08-28 chat-reply-mention: nicknames can be clicked/tapped to mention a user. */
.stream-page .stream-chat-entry .stream-nick-reply {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit !important;
  line-height: inherit !important;
  text-align: left !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

.stream-page .stream-chat-entry .stream-nick-reply b {
  text-decoration: underline dotted !important;
  text-underline-offset: 2px !important;
}

.stream-page .stream-chat-entry .stream-nick-reply:hover b,
.stream-page .stream-chat-entry .stream-nick-reply:focus-visible b {
  color: #b00000 !important;
  background: #ffff66 !important;
}

.stream-page .stream-chat-entry .stream-nick-reply:focus-visible {
  outline: 1px dotted #b00000 !important;
  outline-offset: 1px !important;
}

/* 2026-08-28 stream-chat-features: mentions, join notices, and JEC command styling. */
.stream-page .stream-chat-entry .stream-reply-target {
  -webkit-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit !important;
  line-height: inherit !important;
  cursor: pointer !important;
}

.stream-page .stream-chat-entry .stream-chat-mention {
  display: inline !important;
  padding: 0 2px !important;
  border: 1px dotted #008c1a !important;
  background: #eaffc8 !important;
  color: #006000 !important;
  font-weight: bold !important;
  text-decoration: none !important;
}

.stream-page .stream-chat-entry .stream-chat-mention:hover,
.stream-page .stream-chat-entry .stream-chat-mention:focus-visible {
  border-color: #b00000 !important;
  background: #ffff66 !important;
  color: #b00000 !important;
}

.stream-page .stream-chat-entry .stream-chat-mention-me {
  border-color: #b00000 !important;
  background: #ffff66 !important;
  color: #b00000 !important;
}

.stream-page .stream-chat-entry.is-admin:not(.is-moderation) {
  border: 1px dashed #b00000 !important;
  background: #fff4ad !important;
  color: #7c0000 !important;
}

.stream-page .stream-chat-entry.is-admin:not(.is-moderation) b,
.stream-page .stream-chat-entry.is-admin:not(.is-moderation) time {
  color: #b00000 !important;
}

.stream-page .stream-chat-entry.is-moderation {
  border: 1px dashed #005c00 !important;
  background: #dfffc0 !important;
  color: #004000 !important;
}

.stream-page .stream-chat-entry.is-moderation b,
.stream-page .stream-chat-entry.is-moderation time {
  color: #005c00 !important;
}

.stream-page .stream-chat-entry.is-join,
.stream-page .stream-chat-entry.is-stream-start {
  border: 1px dotted #008c1a !important;
  background: #eaffd0 !important;
  color: #004000 !important;
}

.stream-page .stream-chat-entry.is-stream-start {
  border-style: double !important;
  background: #ffffb8 !important;
}

/* 2026-08-28 presence-toast: transient join/leave notices without polluting chat history. */
.stream-page .stream-presence-toast {
  display: none !important;
  position: static !important;
  box-sizing: border-box !important;
  width: 100% !important;
  margin: 4px 0 0 !important;
  padding: 4px 6px !important;
  border: 1px dotted #87875c !important;
  background: #ffffbd !important;
  color: #004000 !important;
  box-shadow: none !important;
  font: 700 11px/1.25 var(--retro-font) !important;
  text-align: left !important;
  text-shadow: none !important;
  opacity: 0 !important;
  pointer-events: auto !important;
  transition: opacity .16s linear !important;
}

.stream-page .stream-presence-toast.is-visible {
  display: block !important;
  opacity: 1 !important;
}

.stream-page .stream-presence-toast.is-leave {
  background: #f0f0d2 !important;
  color: #505000 !important;
}

.stream-page .stream-presence-toast .stream-presence-nick {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  margin: 0 3px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #008c1a !important;
  font: inherit !important;
  line-height: inherit !important;
  text-decoration: underline dotted !important;
  text-underline-offset: 2px !important;
  cursor: pointer !important;
}

.stream-page .stream-presence-toast .stream-presence-nick:hover,
.stream-page .stream-presence-toast .stream-presence-nick:focus-visible {
  color: #b00000 !important;
  background: #ffff66 !important;
  outline: 1px dotted #b00000 !important;
}

@media (max-width: 700px) {
  .stream-page .stream-presence-toast {
    margin-top: 3px !important;
    padding: 4px 6px !important;
    font-size: 11px !important;
  }
}

/* 2026-08-28 stream-header-tagline: small motto in the free green header space. */
@font-face {
  font-family: "Nicoletta Script SHA";
  src: url("/assets/fonts/nicoletta-script-sha.ttf?v=20260828-nicoletta-1") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-header-grid {
  position: relative !important;
}

body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-header-tagline {
  position: absolute !important;
  right: 14px !important;
  bottom: 7px !important;
  max-width: min(38vw, 460px) !important;
  overflow: hidden !important;
  color: #ffff66 !important;
  font-family: "Nicoletta Script SHA", "Segoe Script", "Brush Script MT", cursive !important;
  font-size: clamp(24px, 2vw, 32px) !important;
  font-weight: 400 !important;
  font-style: normal !important;
  line-height: .95 !important;
  letter-spacing: 0 !important;
  text-align: right !important;
  text-overflow: ellipsis !important;
  text-shadow: 1px 1px 0 #001800, 2px 2px 0 #003000 !important;
  text-transform: none !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

@media (max-width: 760px) {
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-header-tagline {
    display: none !important;
  }
}

/* 2026-08-28 mobile-viewers-wrap-final: many viewer names must not push or clip the counter on phones. */
@media (max-width: 920px) {
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-status-strip {
    overflow: visible !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-status-strip .stream-viewer-row {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) .stream-status-strip .stream-viewer-row > b,
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamListeners {
    display: inline !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamViewerNames,
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamViewerNames.has-many-viewers {
    display: block !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: clamp(62px, 18dvh, 126px) !important;
    margin-top: 2px !important;
    padding-right: 2px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    color: inherit !important;
    line-height: 19px !important;
    text-overflow: clip !important;
    white-space: normal !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamViewerNames.has-many-viewers::-webkit-scrollbar {
    width: 6px !important;
    height: 0 !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamViewerNames.has-many-viewers::-webkit-scrollbar-track {
    background: #ffffc4 !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamViewerNames.has-many-viewers::-webkit-scrollbar-thumb {
    background: #0b5a18 !important;
    border: 1px solid #ffff9e !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamViewerNames .stream-viewer-name,
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamViewerNames.has-many-viewers .stream-viewer-name {
    display: inline-flex !important;
    max-width: calc(100vw - 46px) !important;
    margin: 1px 0 !important;
    vertical-align: middle !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamViewerNames .stream-viewer-name span {
    display: inline-block !important;
    max-width: calc(100vw - 92px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamViewerNames .stream-viewer-separator,
  body.stream-page.stream-compact-page:not(.stream-records-page):not(.stream-bans-page):not(.stream-chat-popout-page) #streamViewerNames.has-many-viewers .stream-viewer-separator {
    display: inline !important;
  }
}

/* 2026-08-28 full-stream-audit-1: offline poster social links are icon-only visually. */
.stream-page .stream-offline-link-text {
  display: none !important;
}

.stream-page .stream-offline-links a {
  overflow: visible !important;
}

/* The ticker sets `animation: ... infinite !important` on a more specific selector than
   the global `*` reduced-motion rule, so that rule could not stop it. Match the
   specificity here so continuous scrolling honours the user's motion preference.
   Visual design is unchanged for everyone who has not asked for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .stream-page .topbar-marquee span {
    animation: none !important;
    padding-left: 0 !important;
  }
}
