/* Expanded section viewer — details left, 2-column cards right */

body:has(#expandSection.show) :is(#addCard, #editCard, #webSearch, #confirm1, #reactionModel, #mediaView, #audioRecording, #commentModel) {
  z-index: 1070;
}

body:has(#expandSection.show) .modal-backdrop.show ~ .modal-backdrop.show {
  z-index: 1065;
}

#expandSection .expand-section-dialog {
  max-width: min(1120px, calc(100vw - 32px));
  width: 100%;
  margin: 1.5rem auto;
}

#expandSection .expand-section-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  height: min(80vh, 760px);
  border: none !important;
  border-radius: 16px;
  overflow: hidden;
  background: #fff !important;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
}

#expandSection .expand-section-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#expandSection .expand-section-close:hover {
  background: rgba(15, 23, 42, 0.1);
  color: #0f172a;
}

#expandSection .expand-section-aside {
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid #eef0f5;
  background: color-mix(in srgb, var(--section-color, #60a5fa) 14%, #fff);
  overflow-y: auto;
  min-width: 0;
}

#expandSection .expand-section-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--section-color, #60a5fa) 22%, #fff);
  color: #0c6af4;
}

#expandSection .expand-section-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #0f172a;
}

#expandSection .expand-section-desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #64748b;
}

#expandSection .expand-section-desc.is-empty {
  font-style: italic;
  color: #94a3b8;
}

#expandSection .expand-section-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

#expandSection .expand-section-meta .avatar,
#expandSection .expand-card-user .avatar,
#expandSection .avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #dbeafe;
  color: #0c6af4;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
}

#expandSection .avatar.sm {
  width: 28px;
  height: 28px;
  font-size: 0.62rem;
}

#expandSection .expand-section-meta-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#expandSection .expand-section-owner {
  font-size: 0.875rem;
  font-weight: 500;
  color: #0f172a;
}

#expandSection .expand-section-role {
  font-size: 0.75rem;
  color: #94a3b8;
}

#expandSection .expand-section-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(12, 106, 244, 0.08);
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 600;
}

#expandSection .expand-section-count .material-symbols-outlined {
  font-size: 16px;
}

#expandSection .expand-section-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#expandSection .expand-section-media img,
#expandSection .expand-section-media video,
#expandSection .expand-section-media .circular-player {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  cursor: pointer;
  background: #e2e8f0;
  display: block;
}

#expandSection .expand-section-media .card-audio-tile {
  grid-column: 1 / -1;
}

#expandSection .expand-section-media img.is-file {
  object-fit: contain;
  padding: 16px;
  background: #f8fafc;
}

#expandSection .expand-section-add {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: #0c6af4;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

#expandSection .expand-section-add:hover {
  background: #2580f7;
}

#expandSection .expand-section-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 72px 24px 24px 24px;
  background: #f8fafc;
}

#expandSection .expand-section-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 8px;
}

#expandSection .expand-section-aside,
#expandSection .expand-section-cards,
#expandSection .expand-card-detail-body {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

#expandSection .expand-section-aside::-webkit-scrollbar,
#expandSection .expand-section-cards::-webkit-scrollbar,
#expandSection .expand-card-detail-body::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

#expandSection .expand-section-aside::-webkit-scrollbar-track,
#expandSection .expand-section-cards::-webkit-scrollbar-track,
#expandSection .expand-card-detail-body::-webkit-scrollbar-track {
  background: transparent;
}

#expandSection .expand-section-aside::-webkit-scrollbar-thumb,
#expandSection .expand-section-cards::-webkit-scrollbar-thumb,
#expandSection .expand-card-detail-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

#expandSection .expand-section-aside::-webkit-scrollbar-thumb:hover,
#expandSection .expand-section-cards::-webkit-scrollbar-thumb:hover,
#expandSection .expand-card-detail-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

#expandSection .expand-card {
  position: relative;
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  overflow: visible;
}

#expandSection .expand-card.is-clickable {
  cursor: pointer;
}

html:not([data-theme="dark"]) #expandSection .expand-card.is-clickable:hover {
  border-color: #d5deea;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

#expandSection .expand-card:has(.dropdown-menu.show) {
  z-index: 5;
}

#expandSection .expand-card-media-wrap {
  border-radius: 10px;
  overflow: hidden;
  background: #e2e8f0;
  cursor: pointer;
}

#expandSection .expand-card-media {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #e2e8f0;
}

#expandSection .expand-card-media.is-file {
  max-height: 88px;
  object-fit: contain;
  padding: 16px;
  background: #f8fafc;
}

#expandSection .expand-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#expandSection .expand-card-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#expandSection .expand-card-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#expandSection .expand-card-time {
  font-size: 0.72rem;
  color: #94a3b8;
  flex-shrink: 0;
}

#expandSection .expand-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: #0f172a;
  cursor: pointer;
}

#expandSection .expand-card-desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #64748b;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

#expandSection .expand-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  font-size: 0.75rem;
  color: #94a3b8;
}

#expandSection .expand-card-open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: #0c6af4;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

#expandSection .expand-card-open .material-symbols-outlined {
  font-size: 16px;
}

#expandSection .expand-section-content.is-viewing-card .expand-section-main {
  display: none;
}

#expandSection .expand-section-card-detail {
  display: none;
}

#expandSection .expand-section-content.is-viewing-card .expand-section-card-detail {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #f8fafc;
}

#expandSection .expand-card-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 60px 16px 20px;
  border-bottom: 1px solid #eef0f4;
  flex-shrink: 0;
}

#expandSection .expand-card-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  padding: 6px 10px 6px 4px;
  margin: 0;
  color: #0c6af4;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  flex-shrink: 0;
}

#expandSection .expand-card-detail-back:hover {
  background: rgba(12, 106, 244, 0.08);
}

#expandSection .expand-card-detail-back .material-symbols-outlined {
  font-size: 20px;
}

#expandSection .expand-card-detail-heading {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#expandSection .expand-card-detail-heading h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#expandSection .expand-card-detail-heading span {
  font-size: 0.75rem;
  color: #94a3b8;
}

#expandSection .expand-card-detail-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

#expandSection .expand-card-detail-actions .icon-btn {
  width: 34px;
  height: 34px;
  color: #334155;
}

#expandSection .expand-card-detail-actions .icon-btn .material-symbols-outlined {
  font-size: 22px;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

#expandSection .expand-card-detail-actions .icon-btn:hover {
  background: #eef2f7;
  color: #0f172a;
}

#expandSection .expand-card-detail-actions .icon-btn.is-danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

#expandSection .expand-card-detail-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#expandSection .expand-card-detail-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: #0f172a;
}

#expandSection .expand-card-detail-desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #475569;
}

#expandSection .expand-card-detail-desc.is-empty {
  color: #94a3b8;
}

#expandSection .expand-card-detail-desc p {
  margin: 0 0 0.5em;
}

#expandSection .expand-card-detail-desc p:last-child {
  margin-bottom: 0;
}

#expandSection .expand-card-detail-media {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#expandSection .expand-card-detail-media-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#expandSection .expand-card-detail-preview {
  position: relative;
  width: 88px;
  height: 88px;
  border: none;
  padding: 0;
  border-radius: 10px;
  background: #e2e8f0;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}

#expandSection .expand-card-detail-preview.is-wide {
  width: min(100%, 280px);
  height: 140px;
}

#expandSection .expand-card-detail-preview:has(.card-audio-tile) {
  width: 100%;
  height: auto;
  overflow: visible;
  background: transparent;
}

#expandSection .expand-card-detail-preview img,
#expandSection .expand-card-detail-preview video,
#expandSection .expand-card-detail-preview iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#expandSection .expand-card-detail-sdg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#expandSection .expand-card-detail-sdg-item {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid #e8edf5;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}

#expandSection .expand-card-detail-sdg-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#expandSection .expand-card-detail-reactions {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 0 2px;
  overflow: visible;
}

#expandSection .expand-card-detail-reactions .emotion-icon-container {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  width: max-content;
  z-index: 6;
  padding: 6px 10px;
  gap: 6px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

#expandSection .expand-card-detail-reactions .emotion-icon-container .icon-box {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

#expandSection .expand-card-detail-reactions .emotion-icon-container .icon-box span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}

#expandSection .expand-card-detail-reactions .emotion-icon-container .icon-box span:hover,
#expandSection .expand-card-detail-reactions .emotion-icon-container .icon-box span.selected {
  background: rgba(12, 106, 244, 0.12);
  transform: scale(1.12);
}

#expandSection .expand-card-detail-reactions .emotions-icon-containetr-popup {
  width: auto;
  margin: 0;
  padding: 0;
  right: auto;
  margin-left: 0;
  gap: 6px;
}

#expandSection .expand-card-detail-reactions .icon-box-popup {
  width: 28px;
  height: 28px;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#expandSection .expand-card-detail-reactions .overlap-margin {
  margin-right: -8px;
}

#expandSection .expand-card-detail-reactions .overlap-right-plus,
#expandSection .expand-card-detail-reactions .overlap-right-plus_not {
  left: 0;
}

#expandSection .expand-card-detail-react {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#expandSection .expand-card-detail-react .material-symbols-outlined {
  font-size: 20px;
}

#expandSection .expand-card-detail-rating {
  margin-left: auto;
}

#expandSection .expand-card-detail-composer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px 18px;
  border-top: 1px solid #eef0f4;
  background: #fff;
  flex-shrink: 0;
}

#expandSection .expand-card-detail-composer-box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 8px 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
}

#expandSection .expand-card-detail-composer-box:focus-within {
  border-color: #93c5fd;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(12, 106, 244, 0.12);
}

#expandSection .expand-card-detail-composer-box input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.875rem;
  color: #0f172a;
}

#expandSection .expand-card-detail-composer-box input::placeholder {
  color: #94a3b8;
}

#expandSection .expand-card-detail-composer-box button {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #0c6af4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#expandSection .expand-card-detail-composer-box button:disabled {
  color: #cbd5e1;
  cursor: default;
}

#expandSection .expand-card-detail-composer-box button .material-symbols-outlined {
  font-size: 18px;
}

#expandSection .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
}

#expandSection .icon-btn.dropdown-toggle::after {
  display: none;
}

#expandSection .icon-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

#expandSection .header-dropdown,
#expandSection .card-menu {
  min-width: 180px;
  width: max-content;
  max-width: 260px;
  padding: 6px !important;
  border: 1px solid #e8edf5 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14) !important;
  overflow: hidden;
  z-index: 1060;
}

#expandSection .card-menu .header-dropdown-body,
#expandSection .header-menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px;
}

#expandSection .header-menu-item {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 12px !important;
  margin: 0;
  border: none;
  border-radius: 10px;
  background: transparent !important;
  color: #334155 !important;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

#expandSection .header-menu-item .material-symbols-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  font-size: 20px;
  line-height: 1;
  color: #64748b;
}

#expandSection .header-menu-item:hover,
#expandSection .header-menu-item:active,
#expandSection .header-menu-item.dropdown-item:active {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

#expandSection .header-menu-item.is-danger {
  color: #dc2626 !important;
}

#expandSection .header-menu-item.is-danger .material-symbols-outlined {
  color: #ef4444;
}

#expandSection .header-menu-item.is-danger:hover,
#expandSection .header-menu-item.is-danger:active,
#expandSection .header-menu-item.is-danger.dropdown-item:active {
  background: #fef2f2 !important;
  color: #b91c1c !important;
}

#expandSection .expand-section-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #94a3b8;
  text-align: center;
}

#expandSection .expand-section-empty .material-symbols-outlined {
  font-size: 36px;
}

#expandSection .expand-section-empty p {
  margin: 0;
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  #expandSection .expand-section-content {
    grid-template-columns: 1fr;
    height: min(88vh, 820px);
  }

  #expandSection .expand-section-aside {
    border-right: none;
    border-bottom: 1px solid #eef0f5;
    max-height: 38%;
  }

  #expandSection .expand-section-cards {
    grid-template-columns: 1fr;
  }
}

html[data-theme="dark"] #expandSection .expand-section-content {
  background: #1e293b !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] #expandSection .expand-section-close {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}

html[data-theme="dark"] #expandSection .expand-section-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

html[data-theme="dark"] #expandSection .expand-section-aside {
  background: color-mix(in srgb, var(--section-color, #60a5fa) 16%, #1e293b);
  border-right-color: #334155;
}

html[data-theme="dark"] #expandSection .expand-section-title,
html[data-theme="dark"] #expandSection .expand-section-owner,
html[data-theme="dark"] #expandSection .expand-card-name,
html[data-theme="dark"] #expandSection .expand-card-title {
  color: #f1f5f9;
}

html[data-theme="dark"] #expandSection .expand-section-desc,
html[data-theme="dark"] #expandSection .expand-card-desc {
  color: #94a3b8;
}

html[data-theme="dark"] #expandSection .expand-section-main {
  background: #0f172a;
}

html[data-theme="dark"] #expandSection .expand-card {
  background: #1e293b;
  border-color: #334155;
}

html[data-theme="dark"] #expandSection .expand-card.is-clickable:hover {
  border-color: #334155;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
  background: #243044;
}

html[data-theme="dark"] #expandSection .icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}

html[data-theme="dark"] #expandSection .header-dropdown,
html[data-theme="dark"] #expandSection .card-menu {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] #expandSection .header-menu-item {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] #expandSection .header-menu-item .material-symbols-outlined {
  color: #94a3b8;
}

html[data-theme="dark"] #expandSection .header-menu-item:hover,
html[data-theme="dark"] #expandSection .header-menu-item:active,
html[data-theme="dark"] #expandSection .header-menu-item.dropdown-item:active {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #f1f5f9 !important;
}

html[data-theme="dark"] #expandSection .header-menu-item.is-danger {
  color: #fca5a5 !important;
}

html[data-theme="dark"] #expandSection .header-menu-item.is-danger .material-symbols-outlined {
  color: #f87171;
}

html[data-theme="dark"] #expandSection .header-menu-item.is-danger:hover,
html[data-theme="dark"] #expandSection .header-menu-item.is-danger:active,
html[data-theme="dark"] #expandSection .header-menu-item.is-danger.dropdown-item:active {
  background: rgba(239, 68, 68, 0.14) !important;
  color: #fecaca !important;
}

html[data-theme="dark"] #expandSection .expand-card-open {
  color: #93c5fd;
}

html[data-theme="dark"] #expandSection .expand-section-count {
  background: rgba(12, 106, 244, 0.16);
  color: #93c5fd;
}

html[data-theme="dark"] #expandSection .avatar {
  background: rgba(12, 106, 244, 0.2);
  color: #93c5fd;
}

html[data-theme="dark"] #expandSection .expand-section-media img,
html[data-theme="dark"] #expandSection .expand-section-media video,
html[data-theme="dark"] #expandSection .expand-section-media .circular-player {
  background: #0f172a;
}

html[data-theme="dark"] #expandSection .expand-section-media img.is-file {
  background: #1e293b;
}

html[data-theme="dark"] #expandSection .expand-section-aside,
html[data-theme="dark"] #expandSection .expand-section-cards {
  scrollbar-color: #475569 transparent;
}

html[data-theme="dark"] #expandSection .expand-section-aside::-webkit-scrollbar-thumb,
html[data-theme="dark"] #expandSection .expand-section-cards::-webkit-scrollbar-thumb {
  background: #475569;
}

html[data-theme="dark"] #expandSection .expand-section-aside::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] #expandSection .expand-section-cards::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

html[data-theme="dark"] #expandSection .expand-section-content.is-viewing-card .expand-section-card-detail {
  background: #0f172a;
}

html[data-theme="dark"] #expandSection .expand-card-detail-header,
html[data-theme="dark"] #expandSection .expand-card-detail-composer {
  background: #1e293b;
  border-color: #334155;
}

html[data-theme="dark"] #expandSection .expand-card-detail-back {
  color: #93c5fd;
}

html[data-theme="dark"] #expandSection .expand-card-detail-back:hover {
  background: rgba(12, 106, 244, 0.18);
}

html[data-theme="dark"] #expandSection .expand-card-detail-heading h3,
html[data-theme="dark"] #expandSection .expand-card-detail-title {
  color: #f1f5f9;
}

html[data-theme="dark"] #expandSection .expand-card-detail-desc {
  color: #cbd5e1;
}

html[data-theme="dark"] #expandSection .expand-card-detail-desc.is-empty {
  color: #94a3b8;
}

html[data-theme="dark"] #expandSection .expand-card-detail-react {
  background: #0f172a;
  color: #94a3b8;
}

html[data-theme="dark"] #expandSection .expand-card-detail-reactions .emotion-icon-container {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] #expandSection .expand-card-detail-reactions .emotion-icon-container .icon-box span:hover,
html[data-theme="dark"] #expandSection .expand-card-detail-reactions .emotion-icon-container .icon-box span.selected {
  background: rgba(12, 106, 244, 0.22);
}

html[data-theme="dark"] #expandSection .expand-card-detail-sdg-item {
  background: #0f172a;
  border-color: #334155;
}

html[data-theme="dark"] #expandSection .expand-card-detail-composer-box {
  background: #0f172a;
  border-color: #334155;
}

html[data-theme="dark"] #expandSection .expand-card-detail-composer-box:focus-within {
  background: #0f172a;
  border-color: rgba(12, 106, 244, 0.55);
}

html[data-theme="dark"] #expandSection .expand-card-detail-composer-box input {
  color: #f1f5f9;
}

html[data-theme="dark"] #expandSection .expand-card-detail-actions .icon-btn {
  color: #e2e8f0;
}

html[data-theme="dark"] #expandSection .expand-card-detail-actions .icon-btn:hover {
  background: #334155;
  color: #f8fafc;
}

html[data-theme="dark"] #expandSection .expand-card-detail-actions .icon-btn.is-danger:hover {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
}
