.member-area-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 18px;
}
.member-area-tabs a {
  padding: 9px 14px;
  border: 1px solid #b8ccdb;
  border-radius: 12px;
  background: #fffdf8;
  color: #173f5d;
  text-decoration: none;
}
.member-area-tabs a[aria-current] {
  border-color: #f58219;
  box-shadow: inset 3px 0 #f58219;
  font-weight: 700;
}
.channel-management {
  background: #fffdf8;
  color: #173f5d;
  padding: 22px;
  border-radius: 24px;
  border-top: 3px solid #f58219;
}
.channel-management h1 {
  margin: 0 0 8px;
}
.channel-toolbar,
.channel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.channel-toolbar {
  align-items: center;
}
.channel-toolbar p {
  flex: 1 1 240px;
  margin: 4px 0;
  line-height: 1.4;
}
.channel-management button,
.channel-editor-dialog button {
  min-height: 44px;
  border: 1px solid #f58219;
  border-radius: 12px;
  padding: 10px 16px;
  background: #fffdf8;
  color: #173f5d;
  font-weight: 600;
  cursor: pointer;
}
.channel-management button:disabled,
.channel-editor-dialog button:disabled {
  opacity: .55;
  cursor: default;
}
.channel-management #channel-create,
.channel-editor-dialog #channel-save {
  background: #ffdf52;
}
.channel-management-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin-top: 16px;
}
.channel-management-card {
  border: 1px solid #c2d5e1;
  border-radius: 18px;
  overflow: hidden;
  min-width: 0;
}
.channel-card-banner {
  display: block;
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.channel-card-body {
  padding: 16px;
}
.channel-card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}
.channel-card-heading h2 {
  font-size: 18px;
  line-height: 1.4;
  margin: 0;
  overflow-wrap: anywhere;
}
.channel-card-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
}
.channel-card-description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.4;
  margin: 10px 0;
}
.channel-empty {
  grid-column: 1/-1;
}
.channel-editor-dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  box-sizing: border-box;
  overflow: auto;
  padding: 24px;
  border: 2px solid #173f5d;
  border-radius: 22px;
  background: #fffdf8;
  color: #173f5d;
}
.channel-editor-dialog::backdrop {
  background: #082b4bb3;
}
.channel-editor-dialog h2 {
  margin: 0 44px 18px 0;
  font-size: 24px;
  line-height: 1.4;
}
.channel-editor-dialog .channel-close {
  position: absolute;
  right: 12px;
  top: 10px;
  min-width: 44px;
  border: 0;
  font-size: 26px;
  background: transparent;
  padding: 0;
}
.channel-editor-dialog label {
  display: block;
  margin: 10px 0 5px;
  font-weight: 600;
}
.channel-editor-dialog input:not([type=checkbox]),
.channel-editor-dialog textarea,
.channel-editor-dialog select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #a6bfd0;
  border-radius: 10px;
  padding: 10px;
  color: #173f5d;
  background: #fff;
  font: 16px Arial, sans-serif;
}
.channel-editor-dialog textarea {
  resize: vertical;
  min-height: 88px;
}
.channel-image-fields {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 14px;
}
.channel-image-fields > div {
  min-width: 0;
}
.channel-image-fields img {
  display: block;
  max-width: 100%;
  margin: 8px 0;
  object-fit: contain;
  border: 1px solid #d7e0e5;
  border-radius: 8px;
}
.channel-image-fields img[hidden] {
  display: none;
}
#channel-picture-preview {
  width: 88px;
  height: 88px;
}
#channel-banner-preview {
  width: 100%;
  aspect-ratio: 4/1;
}
.channel-editor-dialog .fine {
  font: 13px/1.4 Arial, sans-serif;
}
.channel-editor-dialog .channel-actions {
  margin-top: 16px;
}
.channel-editor-dialog [hidden] {
  display: none !important;
}
.channel-editor-dialog .channel-delete-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font: 15px/1.4 Arial, sans-serif;
}
.channel-delete-check input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}
.channel-form-feedback {
  font: 15px/1.4 Arial, sans-serif;
  margin: 10px 0 0;
  min-height: 20px;
}
.channel-public-brand {
  margin: 0 0 14px;
}
.channel-public-brand img.channel-public-banner {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 14px;
}
.channel-public-brand .channel-public-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
  margin: 8px 12px 8px 0;
}
.channel-public-brand p {
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.channel-public-owner {
  font: 14px/1.4 Arial, sans-serif;
}
.is-error {
  color: #a52820;
}
@media (max-width: 540px) {
  .channel-management {
    padding: 16px;
  }
  .channel-image-fields {
    grid-template-columns: 1fr;
  }
  .channel-editor-dialog {
    padding: 18px;
  }
  .channel-editor-dialog h2 {
    font-size: 20px;
  }
  .channel-management-grid {
    grid-template-columns: 1fr;
  }
  .channel-toolbar p {
    flex-basis: 100%;
  }
}
#channel-dialog #channel-save {
  color: #173f5d !important;
  font: 600 15px/1.4 Arial, sans-serif;
}
.saved-version-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 12px;
}
.saved-version-grid article {
  border: 1px solid #c2d5e1;
  border-radius: 14px;
  padding: 14px;
  min-width: 0;
}
.saved-version-grid h3 {
  font-size: 18px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  margin: 0 0 8px;
}
.saved-version-grid p {
  font-size: 14px;
  line-height: 1.4;
  margin: 6px 0;
}
#member-library > h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 10px 0;
}
#member-library #space-history {
  margin-bottom: 14px;
}
