.stream-list {
  box-sizing: border-box;
  width: min(100%, 760px);
  margin: 24px auto;
  padding-inline: var(--site-text-inset-x, 12px);
}

.stream-list--page,
.member-gallery .stream-list,
.stream-list--block {
  width: 100%;
}

.stream-list--page {
  max-width: var(--site-canvas-width);
  padding-inline: var(--site-text-padding-x);
}

.stream-list--page > .discussion-comments {
  padding-inline: 0;
}

@media (min-width: 721px) {
  .stream-list__cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
  }

  .stream-list__cards > .stream-list__empty {
    grid-column: 1 / -1;
  }
}

.stream-card {
  margin: 0 0 26px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line, #ddd);
  min-width: 0;
}

.stream-card__meta {
  margin-bottom: 8px;
}

.stream-card__date {
  text-decoration: none !important;
}

.stream-card__meta .discussion-comment__author,
.stream-card__follow {
  flex-wrap: wrap;
  min-width: 0;
}

.stream-card__follow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.stream-card__follow .button {
  background: #626262;
  border: 0;
  color: #fff;
  min-height: 20px;
  min-inline-size: 7.65em;
  padding: 0 7px;
  border-radius: 6px;
  font-size: inherit;
  line-height: 1;
  white-space: nowrap;
}

.stream-card__follow .button:is(:hover, :focus-visible) {
  background: #4b4b4b;
}

.stream-card__pin-form {
  margin: 0;
}

.stream-card__pin-button,
.stream-card__edit {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.stream-card__pin-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.stream-card__pin-button[aria-pressed="true"],
.stream-card__pin-marker {
  color: var(--site-accent, #bf1717);
}

.stream-card__pin-button:is(:hover, :focus-visible),
.stream-card__edit:is(:hover, :focus-visible) {
  background: #e2e2e2;
}

.stream-card__pin-button svg,
.stream-card__pin-marker svg,
.stream-card__edit svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stream-design {
  position: relative;
  min-width: 0;
}

.stream-design__picture {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #eeece8;
  color: #333;
  text-decoration: none;
}

.stream-design__picture :is(canvas, img) {
  display: block;
  width: 100%;
  height: 100%;
}

.stream-design__picture [data-frame-status]:not(:empty) {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 15px;
  text-align: center;
}

.stream-design__controls {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
}

.stream-design__controls .save-action {
  margin: 0;
  padding: 0;
}

.stream-design__editor,
.stream-design__retry {
  border: 1px solid #dad5cc;
  border-radius: 6px;
  background: #fff;
  color: #292929;
}

.stream-design__editor,
.stream-design__controls .save-action--bookmarks .save-action__button {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
}

.stream-design__controls .bookmark-icon {
  width: 20px;
  height: 20px;
}

.stream-design__retry {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 5px 8px;
}

.stream-card__text {
  margin: 10px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.stream-card__read-more {
  margin-top: 10px;
}

.stream-card__read-more > summary {
  cursor: pointer;
  list-style: none;
  width: fit-content;
}

.stream-card__read-more > summary::-webkit-details-marker {
  display: none;
}

.stream-card__excerpt {
  display: block;
  margin: 0;
}

.stream-card__more-label,
.stream-card__less-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stream-card__less-label,
.stream-card__read-more[open] :is(.stream-card__excerpt, .stream-card__more-label) {
  display: none;
}

.stream-card__read-more[open] .stream-card__less-label {
  display: inline;
}

.stream-card__edited {
  margin: 4px 0 0;
  color: var(--site-meta-color);
  font-size: 11px;
}

.stream-card__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  font-size: 14px;
}

.stream-card__comments {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  flex: 0 0 auto;
  gap: 4px;
  margin-inline-start: auto;
  min-height: 28px;
  font-size: 12px;
  line-height: 1;
  text-decoration: none !important;
}

.stream-card__comments svg {
  display: block;
  width: 24px;
  height: 24px;
}

.stream-follow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 var(--site-text-inset-x, 12px) 14px;
}

.stream-follow__bell {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 4px;
  color: var(--text);
  background: none;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}

.stream-follow__bell[hidden] {
  display: none;
}

.stream-follow__bell svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stream-card__follow .stream-follow__bell {
  width: 24px;
  height: 24px;
  padding: 0;
}

.stream-card__follow .stream-follow__bell[hidden] {
  display: inline-grid;
  visibility: hidden;
}

.stream-card__follow .stream-follow__bell svg {
  width: 16px;
  height: 16px;
}

.stream-follow__bell[aria-pressed="true"] {
  color: #c41a1a;
}

.stream-follow__bell[aria-pressed="true"] svg {
  fill: currentColor;
}

.stream-subscription-list__row .stream-follow {
  margin-block: 0;
  margin-inline-end: 0;
}

.stream-publish {
  margin-top: 6px;
}

.stream-publish summary {
  width: fit-content;
  cursor: pointer;
}

.stream-publish summary img {
  vertical-align: middle;
}

.stream-publish__classification label {
  display: block;
  margin-top: 7px;
}

.stream-publish__classification label[hidden] {
  display: none;
}

.stream-publish__classification select {
  width: 100%;
}

.stream-publish textarea {
  display: block;
  width: 100%;
  min-height: 64px;
  margin: 7px 0;
  box-sizing: border-box;
}

.stream-publish .stream-text-count {
  margin: 0 0 7px;
}

.stream-subscription-list ul {
  list-style: none;
  margin: 16px 0;
  padding: 0;
}

.stream-subscription-list__tabs,
.stream-subscription-list__row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stream-subscription-list__row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line, #ddd);
}

.stream-subscription-list__row form {
  margin-inline-start: auto;
}

.stream-subscription-list [aria-current="page"] {
  font-weight: 600;
}

.stream-page-actions,
.stream-attachment__row,
.stream-picker__head,
.stream-picker__pages {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.stream-page-actions {
  margin-bottom: 12px;
}

.stream-page-actions .button,
.stream-picker__head .button,
.stream-attachment__row .button,
.stream-compose-form .discussion-comment-form__actions > .button {
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.25;
}

.button:is(.stream-new-design, .stream-attachment__open) {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #c41a1a;
  border: 1px solid #c41a1a;
  color: #fff;
  text-decoration: none;
}

.button:is(.stream-new-design, .stream-attachment__open, .stream-create-post):is(:hover, :focus-visible) {
  background: #a51111;
  border-color: #a51111;
  color: #fff;
}

.stream-new-design img {
  filter: brightness(0) invert(1);
}

.stream-page-actions .button.stream-new-design {
  background: #ededed;
  border-color: #ededed;
  color: #303030;
}

.stream-page-actions .button.stream-new-design:is(:hover, :focus-visible) {
  background: #e2e2e2;
  border-color: #e2e2e2;
}

.stream-page-actions .stream-new-design img {
  filter: none;
}

.stream-brand-symbol {
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  background: currentColor;
  /* Crop the 32 px symbol at x=8 from the 360 px site logo. */
  -webkit-mask: url("../img/chudoramki-logo.png") -4.5px center / 202.5px auto no-repeat;
  mask: url("../img/chudoramki-logo.png") -4.5px center / 202.5px auto no-repeat;
}

.stream-edit-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.stream-create-title {
  margin-bottom: 5px;
}

.stream-edit-heading > h1 {
  margin: 0;
}

.stream-draft-badge {
  border-radius: 5px;
  padding: 3px 6px;
  background: #ededed;
  color: #303030;
  font-size: 12px;
  line-height: 1.25;
}

.button.stream-delete-button {
  display: inline-grid;
  place-items: center;
  min-inline-size: 40px;
  border: 1px solid #ededed;
  background: #ededed;
  color: #c41a1a;
}

.button.stream-delete-button:is(:hover, :focus-visible) {
  border-color: #fbecec;
  background: #fbecec;
  color: #a51111;
}

.stream-delete-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stream-picker.stream-delete-dialog {
  width: min(calc(100% - 24px), 380px);
  box-sizing: border-box;
}

.stream-delete-dialog h2 {
  margin: 0;
  font-size: 20px;
}

.stream-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.button.stream-draft-button {
  border: 1px solid #ededed;
  background: #ededed;
  color: #303030;
}

.button.stream-draft-button:is(:hover, :focus-visible) {
  border-color: #dedede;
  background: #dedede;
  color: #303030;
}

.stream-compose-form {
  gap: 10px;
}

.stream-compose-classification {
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

.stream-compose-text textarea {
  display: block;
}

.stream-text-count {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.stream-text-count.is-over {
  color: #b20000;
}

.stream-attachment__remove {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  padding: 6px;
}

.stream-attachment__preview {
  margin-top: 8px;
}

.stream-picker {
  width: min(calc(100% - 24px), 860px);
  max-height: 85dvh;
  padding: 16px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
}

.stream-picker::backdrop {
  background: rgb(0 0 0 / 40%);
}

.stream-picker__head {
  margin-bottom: 14px;
}

.stream-picker__head h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 auto;
  margin: 0;
  font-size: 20px;
}

.stream-picker__head .stream-brand-symbol {
  color: #000;
}

.stream-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 14px;
}

.stream-picker .studio-frame-preview {
  position: relative;
}

.stream-picker__choice {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0;
  background: #eeeae6;
  cursor: pointer;
}

.stream-picker__choice :is(img, canvas) {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.stream-picker__choice [data-frame-status]:not(:empty) {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 6px;
}

.stream-picker__caption {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.stream-picker__pages {
  margin-top: 12px;
  justify-content: flex-end;
}

@media (max-width: 540px) {
  .stream-delete-actions > .button {
    min-height: 40px;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.25;
  }

  .stream-picker__head {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .stream-picker__head .stream-new-design {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }

  .stream-picker__head [data-stream-picker-close] {
    grid-column: 2;
    grid-row: 1;
  }

  .stream-picker__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
