.catalog-body {
  overflow: hidden;
}

.catalog-sidebar {
  overflow: hidden;
}

.catalog-main-nav {
  flex: 0 0 auto;
  margin-top: 24px;
}

.catalog-primary-nav {
  min-height: 0;
  flex: 1 1 auto;
  align-content: start;
  grid-auto-rows: min-content;
  margin-top: 10px;
  padding-top: 10px;
  padding-right: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.catalog-primary-nav::-webkit-scrollbar {
  width: 6px;
}

.catalog-primary-nav::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.24);
}

.catalog-primary-categories {
  display: grid;
  gap: 3px;
  margin: 3px 0 7px;
  padding: 0 0 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.catalog-menu-nav {
  height: auto;
  padding: 0;
  overflow: visible;
}

.catalog-menu-nav .category-button {
  min-height: 42px;
  justify-content: flex-start;
  gap: 11px;
  padding: 0 11px;
  color: #dce7e5;
  font-size: 14px;
  font-weight: 650;
}

.catalog-menu-nav .category-button:hover,
.catalog-menu-nav .category-button.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.catalog-menu-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 4px;
  background: #070b0b;
  overflow: hidden;
  place-items: center;
}

.catalog-menu-icon img,
.catalog-menu-icon .icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.catalog-menu-icon img {
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.catalog-menu-label {
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.catalog-sidebar .privacy-status {
  flex: 0 0 auto;
}
.catalog-workspace {
  min-height: 0;
  height: 100%;
  grid-template-rows: 68px minmax(0, 1fr);
}

.catalog-topbar a.icon-button {
  text-decoration: none;
}

.catalog-main {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 28px clamp(18px, 3vw, 44px) 52px;
}

.catalog-main.is-detail {
  overflow: hidden;
  padding: 0;
}

.catalog-page {
  width: min(100%, 1540px);
  margin: 0 auto;
}

.catalog-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.catalog-page-head h1,
.catalog-detail-title h1 {
  margin: 5px 0 0;
  font-size: clamp(25px, 2.3vw, 34px);
  line-height: 1.16;
}

.catalog-page-head p,
.catalog-detail-title p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.catalog-stats {
  display: grid;
  grid-template-columns: repeat(3, auto auto);
  align-items: baseline;
  gap: 4px 9px;
  padding-bottom: 3px;
}

.catalog-stats strong {
  color: var(--teal);
  font-size: 21px;
}

.catalog-stats span {
  color: var(--muted);
  font-size: 11px;
}

.catalog-segmented,
.catalog-view-toggle {
  display: inline-flex;
  min-width: 0;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #ffffff;
}

.catalog-segmented button,
.catalog-view-toggle button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

.catalog-segmented button.active,
.catalog-view-toggle button.active {
  color: #ffffff;
  background: var(--teal);
}

.catalog-source-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 18px 0 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.catalog-source-note .icon {
  margin-top: 1px;
  color: var(--coral);
}

.catalog-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 14px;
}

.catalog-entry-card,
.catalog-review-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  box-shadow: 0 3px 12px rgba(24, 39, 43, 0.045);
}

.catalog-entry-card:hover,
.catalog-review-card:hover {
  border-color: #b9c6c2;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.catalog-entry-open,
.catalog-review-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.catalog-entry-visual,
.catalog-review-visual {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #090d0e;
}

.catalog-entry-visual img,
.catalog-review-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.catalog-entry-visual.has-innervation-cover {
  aspect-ratio: 4 / 3;
}

.catalog-innervation-cover {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #020405;
}

.catalog-cover-tiles {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  background: #142021;
}

.catalog-cover-tiles.is-split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.catalog-cover-tile {
  display: flex;
  min-width: 0;
  min-height: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000000;
}

.catalog-innervation-crop {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  aspect-ratio: var(--crop-ratio, 1);
  background: #000000;
}

.catalog-innervation-crop.is-tall {
  height: 100%;
}

.catalog-innervation-crop.is-wide {
  width: 100%;
}

.catalog-entry-visual .catalog-innervation-crop img {
  position: absolute;
  top: var(--crop-image-top);
  left: var(--crop-image-left);
  width: var(--crop-image-width);
  max-width: none;
  height: var(--crop-image-height);
  object-fit: fill;
  pointer-events: none;
}

.catalog-innervation-base {
  z-index: 1;
}

.catalog-innervation-overlay {
  z-index: 2;
  opacity: 1;
}

.catalog-cover-caption {
  position: absolute;
  z-index: 3;
  right: 8px;
  bottom: 8px;
  left: 8px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.catalog-cover-caption span {
  min-width: 0;
  max-width: 68%;
  overflow: hidden;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 4px;
  color: #ffffff;
  background: rgba(7, 22, 24, 0.82);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-cover-caption span:last-child {
  margin-left: auto;
}


.catalog-entry-visual .catalog-no-image,
.catalog-review-visual .catalog-no-image {
  display: grid;
  place-items: center;
  gap: 8px;
  color: #91a2a1;
  font-size: 11px;
}

.catalog-entry-visual .catalog-no-image .icon,
.catalog-review-visual .catalog-no-image .icon {
  width: 32px;
  height: 32px;
}


.catalog-entry-copy,
.catalog-review-copy {
  min-height: 124px;
  padding: 14px 15px 15px;
}

.catalog-entry-copy h2,
.catalog-review-copy h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

.catalog-entry-copy p,
.catalog-review-copy p {
  min-height: 34px;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.catalog-entry-meta,
.catalog-review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 11px;
  color: #526367;
  font-size: 11px;
  font-weight: 700;
}

.catalog-entry-meta span,
.catalog-review-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.catalog-entry-meta .icon,
.catalog-review-meta .icon {
  width: 14px;
  height: 14px;
  color: var(--teal);
}

.catalog-card-favorite {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 6px;
  color: #ffffff;
  background: rgba(11, 25, 27, 0.68);
}

.catalog-card-favorite.is-favorite {
  color: #ffffff;
  background: var(--teal);
}

.catalog-card-favorite.is-favorite .icon {
  fill: currentColor;
}

.catalog-empty {
  min-height: 360px;
}

.catalog-detail {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--paper);
}

.catalog-detail-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.catalog-detail-title {
  min-width: 0;
}

.catalog-detail-title h1 {
  overflow: hidden;
  font-size: 23px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-detail-title p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-detail-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.catalog-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.catalog-detail-badges span {
  padding: 3px 7px;
  border-radius: 4px;
  color: #3d5558;
  background: var(--teal-soft);
  font-size: 10px;
  font-weight: 800;
}

.catalog-workbench {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: 244px minmax(340px, 1fr) 318px;
}

.catalog-content-rail,
.catalog-layer-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
}

.catalog-content-rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid var(--line);
}

.catalog-layer-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border-left: 1px solid var(--line);
}

.catalog-panel-head {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
}

.catalog-panel-head strong,
.catalog-panel-head small {
  display: block;
}

.catalog-panel-head strong {
  font-size: 13px;
}

.catalog-panel-head small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.catalog-panel-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.catalog-panel-actions .icon-button {
  width: 32px;
  height: 32px;
}

.catalog-next-layer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #8fc8c0;
  border-radius: 6px;
  color: #145f59;
  background: #e8f6f3;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.catalog-next-layer-button:hover:not(:disabled) {
  border-color: #258b82;
  background: #d7efeb;
}

.catalog-next-layer-button:disabled {
  color: #879694;
  border-color: #d7dfdd;
  background: #f2f4f3;
  cursor: default;
}

.catalog-next-layer-button .icon {
  width: 15px;
  height: 15px;
}

.catalog-content-list,
.catalog-layer-list {
  min-height: 0;
  height: auto;
  overflow-y: auto;
  padding: 9px;
}

.catalog-content-list {
  display: grid;
  align-content: start;
  gap: 5px;
}

.catalog-content-button,
.catalog-manual-button {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.catalog-content-button:hover,
.catalog-content-button.active,
.catalog-manual-button:hover,
.catalog-manual-button.active {
  border-color: #c6ded9;
  background: var(--teal-soft);
}

.catalog-content-thumb {
  display: grid;
  width: 48px;
  height: 43px;
  place-items: center;
  overflow: hidden;
  border-radius: 4px;
  color: #9eb0ae;
  background: #111718;
}

.catalog-content-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.catalog-content-thumb .icon {
  width: 22px;
  height: 22px;
}

.catalog-content-copy {
  min-width: 0;
}

.catalog-content-copy strong,
.catalog-content-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-content-copy strong {
  font-size: 12px;
}

.catalog-content-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.catalog-content-divider {
  margin: 10px 3px 5px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.catalog-viewer {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 54px minmax(0, 1fr) auto;
  background: #0c1112;
}

.catalog-viewer-toolbar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #dbe5e3;
  background: #151d1e;
}

.catalog-viewer-title {
  min-width: 0;
}

.catalog-viewer-title strong,
.catalog-viewer-title small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-viewer-title strong {
  font-size: 12px;
}

.catalog-viewer-title small {
  margin-top: 2px;
  color: #95a6a4;
  font-size: 9px;
}

.catalog-viewer-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

.catalog-viewer-controls .icon-button {
  width: 34px;
  height: 34px;
  border-color: rgba(255, 255, 255, 0.18);
  color: #e5edeb;
  background: #202a2b;
}

.catalog-viewer-controls .icon-button.active {
  border-color: #4da99d;
  color: #ffffff;
  background: #1d756d;
}

.catalog-viewer-controls .catalog-segmented {
  border-color: rgba(255, 255, 255, 0.2);
  background: #202a2b;
}

.catalog-viewer-controls .catalog-segmented button {
  color: #bdcac8;
}

.catalog-viewer-controls .catalog-segmented button.active {
  color: #ffffff;
  background: var(--teal);
}

.catalog-stage-wrap {
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  overflow: auto;
  padding: 16px;
}

.catalog-media-stage {
  position: relative;
  width: min(100%, 1040px);
  max-height: 100%;
  aspect-ratio: var(--media-ratio, 10 / 7);
  overflow: hidden;
  background: #050708;
  container-type: inline-size;
  transform: scaleX(var(--media-flip, 1));
  transform-origin: center;
}

.catalog-media-stage.has-bilingual-labels {
  overflow: visible;
  margin-bottom: clamp(34px, 7cqw, 74px);
}

.catalog-media-stage img,
.catalog-media-stage video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.catalog-media-stage .catalog-layer-image {
  pointer-events: none;
}

.catalog-media-stage video {
  background: #000000;
}

.catalog-chinese-label {
  position: absolute;
  z-index: 60;
  display: grid;
  min-width: 18px;
  min-height: 18px;
  max-width: 72%;
  box-sizing: border-box;
  place-items: center;
  overflow: visible;
  padding: clamp(1px, 0.24cqw, 3px) clamp(3px, 0.55cqw, 7px);
  border-radius: 2px;
  color: #101718;
  background: rgba(255, 248, 205, 0.96);
  font-size: clamp(8px, 1.05vw, 14px);
  font-weight: 800;
  line-height: 1.08;
  text-align: center;
  white-space: nowrap;
  transform: scaleX(var(--media-flip, 1));
  pointer-events: none;
}

.catalog-chinese-label.light {
  color: #ffffff;
  background: rgba(15, 41, 43, 0.94);
}

.catalog-chinese-label.is-automatic::before {
  position: absolute;
  bottom: 100%;
  left: var(--connector-x, 50%);
  width: 1px;
  height: var(--label-gap, 0.6%);
  min-height: 2px;
  background: currentColor;
  content: "";
  opacity: 0.72;
  transform: translateX(-50%);
}

.catalog-chinese-label.is-manual {
  outline: 2px solid rgba(47, 189, 168, 0.72);
  outline-offset: 1px;
}

.catalog-stage-empty {
  display: grid;
  width: min(100%, 760px);
  min-height: 320px;
  place-items: center;
  padding: 28px;
  color: #a7b4b2;
  text-align: center;
}

.catalog-stage-empty .icon {
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
}

.catalog-stage-empty h2 {
  margin: 0;
  color: #eef3f2;
  font-size: 17px;
}

.catalog-stage-empty p {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.catalog-notes-view {
  width: min(100%, 900px);
  align-self: start;
  padding: 10px 4px 24px;
  color: #dfe8e6;
}

.catalog-notes-warning {
  margin-bottom: 18px;
  padding: 10px 12px;
  border-left: 3px solid var(--yellow);
  color: #c8d3d1;
  background: #172021;
  font-size: 11px;
  line-height: 1.5;
}

.catalog-notes-text {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.72;
}

.catalog-viewer-footer {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: #93a4a2;
  background: #111718;
  font-size: 10px;
}

.catalog-viewer-footer button {
  min-height: 30px;
  color: #dce6e4;
}

.catalog-layer-filter {
  margin: 9px 9px 0;
}

.catalog-layer-filter input {
  width: 100%;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #f8faf9;
  font-size: 11px;
}

.catalog-layer-filter + .catalog-layer-list {
  height: auto;
}

.catalog-layer-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 7px;
  padding: 8px 4px;
  border-bottom: 1px solid #edf0ef;
}

.catalog-layer-toggle {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--muted);
  background: #ffffff;
}

.catalog-layer-toggle.active {
  border-color: #9fd0c9;
  color: var(--teal);
  background: var(--teal-soft);
}

.catalog-layer-toggle .icon {
  width: 16px;
  height: 16px;
}

.catalog-layer-copy {
  min-width: 0;
}

.catalog-layer-name {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: start;
  gap: 6px;
}

.catalog-layer-swatch {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--swatch, #7c918e);
}

.catalog-layer-name strong,
.catalog-layer-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-layer-name strong {
  font-size: 11px;
}

.catalog-layer-name small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.catalog-layer-opacity {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.catalog-layer-opacity input {
  width: 100%;
  min-width: 0;
  accent-color: var(--teal);
}

.catalog-layer-opacity output {
  width: 30px;
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.catalog-panel-empty {
  padding: 26px 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.catalog-label-list {
  display: grid;
  align-content: start;
  gap: 6px;
}

.catalog-label-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 7px;
  padding: 7px 6px;
  border-bottom: 1px solid #edf0ef;
}

.catalog-label-code {
  display: grid;
  width: 32px;
  height: 26px;
  place-items: center;
  border-radius: 4px;
  color: #ffffff;
  background: var(--teal);
  font-size: 10px;
  font-weight: 850;
}

.catalog-label-item strong,
.catalog-label-item small {
  display: block;
  line-height: 1.35;
}

.catalog-label-item strong {
  font-size: 11px;
}

.catalog-label-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.catalog-note-box {
  margin: 12px 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.catalog-note-box label,
.catalog-note-box span {
  display: block;
}

.catalog-note-box label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.catalog-note-box textarea {
  width: 100%;
  min-height: 92px;
  margin-top: 6px;
  padding: 8px 9px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.5;
}

.catalog-note-box span {
  margin-top: 4px;
  color: var(--quiet);
  font-size: 9px;
  text-align: right;
}

.catalog-review-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 18px 0 12px;
}

.catalog-review-filter {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.catalog-review-filter select {
  min-width: 190px;
  height: 38px;
  padding: 0 34px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

.catalog-review-filter select:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(22, 124, 115, 0.1);
}
.catalog-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 13px;
}

.catalog-review-card.is-assigned {
  border-color: #9bcac4;
}

.catalog-review-copy {
  min-height: 112px;
}

.catalog-review-copy p {
  min-height: 17px;
}

.catalog-review-visual {
  background-color: #eef2f1;
  background-image:
    linear-gradient(45deg, #dce2df 25%, transparent 25%),
    linear-gradient(-45deg, #dce2df 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dce2df 75%),
    linear-gradient(-45deg, transparent 75%, #dce2df 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.catalog-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 28px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(10, 29, 31, 0.28);
}

.catalog-dialog::backdrop {
  background: rgba(8, 23, 25, 0.58);
}

.catalog-dialog-shell {
  display: grid;
  max-height: inherit;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.catalog-dialog-shell header,
.catalog-dialog-shell footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.catalog-dialog-shell header {
  border-bottom: 1px solid var(--line);
}

.catalog-dialog-shell footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.catalog-dialog-shell h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.catalog-dialog-body {
  overflow: auto;
  padding: 17px;
}

.catalog-dialog-body label {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.catalog-dialog-body input,
.catalog-dialog-body select,
.catalog-dialog-body textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--ink);
  background: #ffffff;
  font-size: 13px;
  font-weight: 500;
}

.catalog-dialog-preview {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  margin-bottom: 15px;
  background: #0b1011;
}

.catalog-dialog-preview img,
.catalog-dialog-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.catalog-dialog-meta {
  margin: -3px 0 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .catalog-workbench {
    grid-template-columns: 210px minmax(320px, 1fr) 278px;
  }

  .catalog-stats {
    grid-template-columns: repeat(2, auto auto);
  }
}

@media (max-width: 960px) {
  .catalog-detail {
    overflow: auto;
  }

  .catalog-workbench {
    grid-template-columns: 200px minmax(0, 1fr);
    grid-template-rows: minmax(540px, 1fr) auto;
  }

  .catalog-layer-panel {
    grid-column: 1 / -1;
    min-height: 320px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .catalog-layer-filter + .catalog-layer-list {
    height: auto;
    max-height: 340px;
  }
}

@media (max-width: 820px) {
  .catalog-main {
    padding: 22px 17px 44px;
  }

  .catalog-main.is-detail {
    overflow: auto;
    padding: 0;
  }

  .catalog-page-head {
    align-items: flex-start;
  }


}

@media (max-width: 700px) {
  .catalog-page-head,
  .catalog-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-stats {
    width: 100%;
    grid-template-columns: repeat(2, auto auto);
  }

  .catalog-review-toolbar {
    justify-content: stretch;
  }

  .catalog-review-filter {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-review-filter select {
    width: 100%;
  }

  .catalog-segmented {
    width: 100%;
  }

  .catalog-segmented button {
    min-width: 0;
    flex: 1;
    padding: 0 8px;
  }

  .catalog-entry-grid,
  .catalog-review-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-detail {
    height: auto;
    min-height: 100%;
  }

  .catalog-detail-head {
    gap: 12px;
    padding: 14px;
  }

  .catalog-detail-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .catalog-detail-title h1,
  .catalog-detail-title p {
    white-space: normal;
  }

  .catalog-workbench {
    display: block;
  }

  .catalog-content-rail,
  .catalog-layer-panel {
    height: auto;
    border: 0;
  }

  .catalog-content-rail {
    border-bottom: 1px solid var(--line);
  }

  .catalog-content-list {
    display: flex;
    height: auto;
    gap: 7px;
    overflow-x: auto;
    padding: 9px 12px 11px;
  }

  .catalog-content-button,
  .catalog-manual-button {
    width: 156px;
    min-height: 54px;
    flex: 0 0 auto;
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .catalog-content-thumb {
    width: 42px;
    height: 38px;
  }

  .catalog-content-divider {
    display: none;
  }

  .catalog-viewer {
    min-height: 520px;
    grid-template-rows: auto minmax(390px, 1fr) auto;
  }

  .catalog-viewer-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-viewer-controls {
    width: 100%;
    justify-content: flex-end;
  }

  .catalog-stage-wrap {
    padding: 9px;
  }

  .catalog-layer-panel {
    border-top: 1px solid var(--line);
  }

  .catalog-layer-filter + .catalog-layer-list {
    max-height: 420px;
  }
}

@media (max-width: 480px) {
  .catalog-main {
    padding: 18px 12px 38px;
  }

  .catalog-page-head h1 {
    font-size: 25px;
  }

  .catalog-stats {
    grid-template-columns: auto auto;
  }

  .catalog-viewer-controls .catalog-segmented button {
    padding: 0 7px;
  }

  .catalog-viewer {
    min-height: 470px;
    grid-template-rows: auto minmax(330px, 1fr) auto;
  }

  .catalog-viewer-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-dialog-shell footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .catalog-dialog-shell footer .command-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .catalog-entry-card,
  .catalog-review-card {
    transition: none;
  }
}
