#caseGalleryPage[data-xk-shared-layout="ready"]:not(.xk-right-shell-page) {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 100%;
  padding: 0;
  border-radius: var(--xk-shell-radius, 26px);
  background: rgba(255,255,255,.91);
  box-shadow: 0 18px 48px rgba(20,31,45,.075), inset 1px 0 0 rgba(11,122,117,.06), inset -1px 0 0 rgba(11,122,117,.05), inset 0 -1px 0 rgba(11,122,117,.055);
  overflow: hidden;
}
#caseGalleryPage[data-xk-shared-layout="ready"] .case-gallery-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}
#caseGalleryPage[data-xk-shared-layout="ready"] .case-gallery-head {
  flex: 0 0 var(--xk-page-title-h, 92px);
  width: 100%;
  min-height: var(--xk-page-title-h, 92px);
  height: var(--xk-page-title-h, 92px);
  margin: 0;
  padding: 24px 26px 14px;
  border: 0;
  border-bottom: 1px solid rgba(11,122,117,.075);
  border-radius: 0;
  background: linear-gradient(180deg,rgba(255,255,255,.28),rgba(255,255,255,0));
  box-shadow: none;
  box-sizing: border-box;
}
#caseGalleryPage[data-xk-shared-layout="ready"] .case-gallery-head h2 {
  margin: 0;
  padding-left: 18px;
  color: #102033;
  font-size: var(--xk-page-title-size, 20px);
  line-height: var(--xk-page-title-line, 28px);
  font-weight: 800;
  letter-spacing: 0;
}
#caseGalleryPage[data-xk-shared-layout="ready"] .case-gallery-head .muted {
  margin: 5px 0 0 18px;
  color: #647481;
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
}
#caseGalleryPage[data-xk-shared-layout="ready"] .case-gallery-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px;
  width: calc(100% - 44px);
  height: 63px;
  min-height: 63px;
  max-height: 63px;
  margin: 12px 22px 10px;
  padding: 6px 8px;
  border: 1px solid rgba(190,226,223,.78);
  border-radius: 12px;
  background: #f7fcfc;
  box-shadow: none;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: hidden;
}
#caseGalleryPage[data-xk-shared-layout="ready"] .case-gallery-toolbar .case-gallery-drop-zone {
  flex: 0 0 auto;
  width: auto;
  min-width: 128px;
  max-width: 180px;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  padding: 1px 10px;
}
#caseGalleryPage[data-xk-shared-layout="ready"] .case-gallery-layout { min-width: 0; }
#caseGalleryPage[data-xk-shared-layout="ready"] .case-gallery-folder-panel,
#caseGalleryPage[data-xk-shared-layout="ready"] .case-gallery-main-panel { min-width: 0; }
@media (max-width: 760px) {
  #caseGalleryPage[data-xk-shared-layout="ready"] .case-gallery-layout { grid-template-columns: minmax(0, 1fr); }
  #caseGalleryPage[data-xk-shared-layout="ready"] .case-gallery-folder-list { display: flex; overflow-x: auto; }
}

/* Case gallery category > folder hierarchy. */
#caseGalleryPage .case-gallery-folder-head {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2px;
  height: auto;
  margin-bottom: 12px;
}
#caseGalleryPage .case-gallery-folder-head strong {
  display: block;
  line-height: 24px;
  white-space: nowrap;
}
#caseGalleryPage .case-gallery-folder-head small {
  display: block;
  line-height: 18px;
  white-space: nowrap;
}
#caseGalleryPage .case-gallery-folder-item.is-category {
  position: relative;
  margin-top: 6px;
  font-weight: 700;
}
#caseGalleryPage .case-gallery-tree-arrow {
  width: 12px;
  color: #6d7f8e;
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform .15s ease;
}
#caseGalleryPage .case-gallery-folder-item.is-category.is-expanded .case-gallery-tree-arrow { transform: rotate(90deg); }
#caseGalleryPage .case-gallery-folder-item.is-category.active .case-gallery-tree-arrow { color: #fff; }
#caseGalleryPage .case-gallery-folder-item.is-category.active .case-gallery-node-name i {
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .28);
}
#caseGalleryPage .case-gallery-folder-item.is-folder {
  position: relative;
  width: calc(100% - 18px);
  margin-left: 18px;
  color: var(--text-secondary, #526277);
  background: color-mix(in srgb, var(--surface, #fff) 88%, var(--border, #dfe6ef));
}
#caseGalleryPage .case-gallery-folder-item.is-folder::before {
  content: "";
  position: absolute;
  left: -11px;
  top: -10px;
  width: 10px;
  height: 25px;
  border-left: 1px solid var(--border, #d7e0ea);
  border-bottom: 1px solid var(--border, #d7e0ea);
  border-radius: 0 0 0 6px;
}
#caseGalleryPage .case-gallery-folder-item.is-folder.active,
#caseGalleryPage .case-gallery-folder-item.is-folder.active:hover {
  color: #fff;
  background: #0b8b84;
  border-color: #0b8b84;
}
#caseGalleryPage .case-gallery-folder-item.is-folder.active small {
  color: #fff;
  background: rgba(255, 255, 255, .22);
}
#caseGalleryPage .case-gallery-node-name {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}
#caseGalleryPage .case-gallery-node-name i {
  position: relative;
  flex: 0 0 auto;
  width: 15px;
  height: 11px;
  border-radius: 2px;
  background: #f2b84b;
  box-shadow: inset 0 0 0 1px rgb(126 83 8 / 18%);
}
#caseGalleryPage .case-gallery-node-name i::before {
  content: "";
  position: absolute;
  left: 1px;
  top: -3px;
  width: 7px;
  height: 4px;
  border-radius: 2px 2px 0 0;
  background: inherit;
}
#caseGalleryPage .case-gallery-folder-item.is-category .case-gallery-node-name i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--primary, #2f6feb);
  box-shadow: none;
}
#caseGalleryPage .case-gallery-folder-item.is-category .case-gallery-node-name i::before,
#caseGalleryPage .case-gallery-folder-item.is-all .case-gallery-node-name i::before { display: none; }
#caseGalleryPage .case-gallery-folder-item.is-all .case-gallery-node-name i {
  border-radius: 50%;
  background: var(--text-muted, #8391a5);
}

#caseGalleryPage .case-gallery-explorer-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 42px;
  min-height: 42px;
  margin-bottom: 8px;
  padding: 4px 8px;
  border: 1px solid rgba(190, 226, 223, .78);
  border-radius: 9px;
  background: rgba(255, 255, 255, .94);
}
#caseGalleryPage .case-gallery-explorer-bar #caseGalleryUpBtn {
  width: 32px;
  min-width: 32px;
  height: 30px;
  padding: 0;
  font-size: 20px;
  line-height: 28px;
}
#caseGalleryPage .case-gallery-breadcrumb {
  min-width: 0;
  color: #263746;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#caseGalleryPage .case-gallery-drag-hint {
  margin-left: auto;
  color: #718493;
  font-size: 12px;
  white-space: nowrap;
}
#caseGalleryPage .case-gallery-explorer-folder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 154px;
  padding: 12px 8px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #fff;
  color: #243645;
  cursor: default;
  user-select: none;
}
#caseGalleryPage .case-gallery-explorer-folder:hover,
#caseGalleryPage .case-gallery-explorer-folder.is-selected {
  border-color: rgba(11, 139, 132, .28);
  background: #edf8f7;
}
#caseGalleryPage .case-gallery-explorer-folder.is-selected { box-shadow: inset 0 0 0 1px rgba(11, 139, 132, .2); }
#caseGalleryPage .case-gallery-explorer-folder-icon {
  position: relative;
  display: block;
  width: 88px;
  height: 62px;
  border-radius: 7px 7px 9px 9px;
  background: linear-gradient(180deg, #ffd86d 0%, #f4b83e 100%);
  box-shadow: inset 0 0 0 1px rgba(135, 86, 0, .16), 0 6px 14px rgba(165, 107, 6, .15);
}
#caseGalleryPage .case-gallery-explorer-folder-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: -10px;
  width: 38px;
  height: 14px;
  border-radius: 6px 6px 0 0;
  background: #f2b436;
  box-shadow: inset 0 0 0 1px rgba(135, 86, 0, .12);
}
#caseGalleryPage .case-gallery-explorer-folder-icon i {
  position: absolute;
  inset: 10px 7px 7px;
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .04));
}
#caseGalleryPage .case-gallery-explorer-folder strong {
  width: 100%;
  font-size: 13px;
  line-height: 19px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#caseGalleryPage .case-gallery-explorer-folder small { color: #748593; font-size: 11px; }
#caseGalleryPage [data-case-drop-folder-id].case-gallery-drop-target {
  border-color: #0b8b84 !important;
  background: #dff4f1 !important;
  color: #075e59 !important;
  box-shadow: 0 0 0 3px rgba(11, 139, 132, .16), 0 10px 24px rgba(11, 139, 132, .16) !important;
  transition: none !important;
}
#caseGalleryPage.case-gallery-drag-active [data-case-drop-folder-id] > * { pointer-events: none; }
#caseGalleryPage .case-gallery-image-card[draggable="true"] { cursor: grab !important; }
#caseGalleryPage .case-gallery-image-card.is-dragging { opacity: .42; cursor: grabbing !important; }
#caseGalleryPage[data-case-gallery-v259="1"] .case-gallery-image-card:hover .case-gallery-check input:checked + span {
  opacity: 1 !important;
  background: #08746f !important;
  border-color: #08746f !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 6px 14px rgba(8, 116, 111, .28) !important;
}
.case-gallery-move-modal .case-gallery-dialog { width: min(560px, 94vw); }
.case-gallery-move-modal .case-gallery-move-tip {
  margin: 10px 0 0;
  color: #667987;
  font-size: 12px;
  line-height: 18px;
}
#caseGalleryPage .case-gallery-view-list .case-gallery-explorer-folder,
#caseGalleryPage .case-gallery-view-details .case-gallery-explorer-folder {
  display: grid;
  grid-template-columns: 42px minmax(160px, 1fr) 100px;
  justify-content: stretch;
  width: 100%;
  min-height: 48px;
  padding: 5px 10px;
}
#caseGalleryPage .case-gallery-view-list .case-gallery-explorer-folder-icon,
#caseGalleryPage .case-gallery-view-details .case-gallery-explorer-folder-icon {
  width: 36px;
  height: 26px;
  border-radius: 3px;
}
#caseGalleryPage .case-gallery-view-list .case-gallery-explorer-folder-icon::before,
#caseGalleryPage .case-gallery-view-details .case-gallery-explorer-folder-icon::before {
  top: -4px;
  width: 16px;
  height: 6px;
  border-radius: 3px 3px 0 0;
}
#caseGalleryPage .case-gallery-view-list .case-gallery-explorer-folder strong,
#caseGalleryPage .case-gallery-view-details .case-gallery-explorer-folder strong { text-align: left; }

/* All-cases overview: grouped, bounded category previews. */
#caseGalleryPage[data-case-gallery-v259="1"] .case-gallery-grid.case-gallery-category-overview {
  display: block !important;
  overflow: auto !important;
  padding: 2px 2px 18px !important;
}
#caseGalleryPage .case-gallery-category-section {
  margin: 0 0 18px;
  border: 1px solid rgba(190, 226, 223, .78);
  border-radius: 12px;
  background: rgba(255, 255, 255, .92);
  overflow: hidden;
}
#caseGalleryPage .case-gallery-category-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(190, 226, 223, .6);
  background: linear-gradient(90deg, #eef9f8, #fff);
}
#caseGalleryPage .case-gallery-category-title strong { color: #163640; font-size: 14px; }
#caseGalleryPage .case-gallery-category-title span,
#caseGalleryPage .case-gallery-category-count { color: #738491; font-size: 12px; }
#caseGalleryPage .case-gallery-category-more {
  margin-left: auto;
  padding: 5px 9px;
  border: 1px solid rgba(11, 122, 117, .24);
  border-radius: 7px;
  color: #08746f;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}
#caseGalleryPage .case-gallery-category-more:hover { background: #e8f7f5; }
#caseGalleryPage .case-gallery-category-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 150px);
  grid-template-rows: none;
  justify-content: start;
  gap: 9px;
  padding: 11px;
  overflow: hidden;
}
#caseGalleryPage .case-gallery-category-overview.case-gallery-view-extra-large .case-gallery-category-media-grid {
  grid-template-columns: repeat(auto-fill, 190px);
}
#caseGalleryPage .case-gallery-category-overview.case-gallery-view-medium .case-gallery-category-media-grid {
  grid-template-columns: repeat(auto-fill, 122px);
}
#caseGalleryPage .case-gallery-category-overview.case-gallery-view-small .case-gallery-category-media-grid {
  grid-template-columns: repeat(auto-fill, 96px);
}
#caseGalleryPage .case-gallery-category-overview.case-gallery-view-list .case-gallery-category-media-grid,
#caseGalleryPage .case-gallery-category-overview.case-gallery-view-details .case-gallery-category-media-grid {
  grid-template-columns: minmax(0, 1fr);
}
#caseGalleryPage .case-gallery-category-overview .case-gallery-image-card {
  position: relative;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
}
#caseGalleryPage .case-gallery-category-overview .case-gallery-location-badge {
  position: absolute;
  right: 9px;
  bottom: 33px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: calc(100% - 18px);
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  color: #fff;
  background: rgba(14, 54, 63, .76);
  box-shadow: 0 2px 9px rgba(12, 43, 52, .2);
  backdrop-filter: blur(5px);
  pointer-events: none;
  white-space: nowrap;
}
#caseGalleryPage .case-gallery-category-overview .case-gallery-location-badge b,
#caseGalleryPage .case-gallery-category-overview .case-gallery-location-badge em {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
  font-style: normal;
  line-height: 15px;
}
#caseGalleryPage .case-gallery-category-overview .case-gallery-location-badge b { font-weight: 700; }
#caseGalleryPage .case-gallery-category-overview .case-gallery-location-badge em {
  max-width: 88px;
  color: rgba(255, 255, 255, .86);
}

/* Keep the right-click flyout attached to its parent row, with no hover gap. */
body .case-gallery-context-menu .case-gallery-menu-row.has-submenu > .case-gallery-submenu {
  left: calc(100% - 1px) !important;
  right: auto !important;
}
body .case-gallery-context-menu.case-gallery-submenu-left .case-gallery-menu-row.has-submenu > .case-gallery-submenu {
  left: auto !important;
  right: calc(100% - 1px) !important;
}
body .case-gallery-context-menu .case-gallery-menu-row.has-submenu:hover > .case-gallery-submenu,
body .case-gallery-context-menu .case-gallery-menu-row.has-submenu:focus-within > .case-gallery-submenu {
  display: block !important;
}
#caseGalleryPage .case-gallery-overview-media {
  position: relative;
  width: 132px;
  height: 92px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: #edf5f5;
  overflow: hidden;
  cursor: pointer;
}
#caseGalleryPage .case-gallery-overview-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .16s ease;
}
#caseGalleryPage .case-gallery-overview-media:hover img { transform: scale(1.04); }
#caseGalleryPage .case-gallery-overview-video {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #0c6e74, #173149);
  font-size: 13px;
  font-weight: 700;
}
@media (max-width: 760px) {
  #caseGalleryPage .case-gallery-category-title { flex-wrap: wrap; }
  #caseGalleryPage .case-gallery-category-more { margin-left: 0; }
  #caseGalleryPage .case-gallery-category-media-grid { grid-template-columns: repeat(auto-fill, 132px); }
}
@media (max-width: 760px) {
  #caseGalleryPage .case-gallery-folder-item.is-folder {
    width: auto;
    margin-left: 0;
    flex: 0 0 auto;
  }
  #caseGalleryPage .case-gallery-folder-item.is-folder::before { display: none; }
  #caseGalleryPage .case-gallery-drag-hint { display: none; }
}
