.galleryPage {
  min-height: 100vh;
  background: #111416;
}
.galleryPage header {
  padding: 0 5%;
  height: 76px;
  gap: 55px;
}
.galleryNav {
  height: 100%;
  display: flex;
  align-items: center;
}
.galleryNav a {
  color: #cddaac;
  text-decoration: none;
  padding: 26px 4px;
  border-bottom: 2px solid var(--accent);
}
.galleryAccount {
  margin-left: auto;
  color: #89939a;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 11px;
}
.avatar {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: #303d2d;
  color: var(--accent);
  display: grid;
  place-items: center;
}
.galleryMain {
  max-width: 1350px;
  margin: auto;
  padding: 48px 5% 20px;
  display: block;
  background: none;
}
.galleryIntro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 20px;
}
.galleryIntro .eyebrow {
  color: #a8be81;
  letter-spacing: 1.7px;
  margin-top: 0;
}
.galleryIntro h1 {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -1.3px;
  font-weight: 600;
  margin: 13px 0;
}
.galleryIntro p {
  font-size: 13px;
  color: #8a959d;
  margin: 0;
}
.galleryBadge {
  padding: 8px 12px;
  border: 1px solid #303a2c;
  border-radius: 20px;
  color: #aabb91;
  font-size: 10px;
  white-space: nowrap;
}
.libraryBar {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.categoryTabs {
  display: flex;
  gap: 7px;
}
.categoryTabs button {
  border: 0;
  background: none;
  color: #8f9aa2;
  padding: 8px 14px;
  font-size: 11px;
}
.categoryTabs button.active {
  background: #2a3321;
  color: #d4ff62;
}
.libraryBar input {
  width: 235px;
  background: #1b2024;
  font-size: 11px;
  padding: 9px 12px;
}
.libraryMeta {
  display: flex;
  justify-content: space-between;
  color: #78858f;
  font-size: 10px;
  margin: 19px 0;
}
.templateGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.templateCard {
  display: block;
  border: 1px solid #2a3237;
  border-radius: 10px;
  overflow: hidden;
  background: #191e22;
  color: #e8eeef;
  text-decoration: none;
  transition:
    transform 0.2s,
    border-color 0.2s;
}
.templateCard:hover {
  border-color: #83995a;
  transform: translateY(-3px);
}
.templateCard:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.templateThumbnail {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.templateThumbnail canvas {
  cursor: pointer;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.thumbnailTag {
  position: absolute;
  left: 12px;
  top: 12px;
  font-size: 8px;
  background: #1118;
  border: 1px solid #ffffff24;
  color: #ced8d9;
  border-radius: 4px;
  padding: 3px 6px;
  backdrop-filter: blur(10px);
}
.thumbnailEdit {
  position: absolute;
  bottom: 13px;
  right: 13px;
  padding: 5px 8px;
  background: #d4ff62;
  color: #25350b;
  font-size: 9px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}
.templateCard:hover .thumbnailEdit,
.templateCard:focus-visible .thumbnailEdit {
  opacity: 1;
}
.templateCardInfo {
  padding: 17px;
}
.templateCardInfo > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.templateCardInfo h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.2px;
}
.categoryPill {
  font-size: 8px;
  color: #91a279;
  border: 1px solid #34402f;
  border-radius: 4px;
  padding: 2px 6px;
}
.templateCardInfo p {
  color: #929da6;
  font-size: 10px;
  line-height: 1.65;
  margin: 9px 0 15px;
  min-height: 33px;
}
.templateCardMeta {
  color: #78858e;
  font-size: 9px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.templateArrow {
  margin-left: auto;
  font-size: 16px;
  color: #a3b77e;
}
.galleryFooter {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #667680;
  padding: 24px 0;
  margin-top: 42px;
}
#emptyTemplates {
  text-align: center;
  color: #8f9aa2;
  padding: 60px;
}
.railHome {
  color: #86917d;
  text-decoration: none;
  width: 54px;
  text-align: center;
  font-size: 20px;
  line-height: 1.4;
}
.railHome small {
  display: block;
  font-size: 9px;
}
.crumb a {
  color: #a3b781;
  text-decoration: none;
}
.sceneLayerButton {
  margin-top: 6px;
  border-color: #30373a;
  background: #1b2023;
}
.sceneLayerButton.selected {
  border-color: #637b43;
  background: #26321e;
}
.sceneLayerButton .elementicon {
  font-size: 16px;
  width: 17px;
}
.sceneLayerButton small {
  max-width: 145px;
}
.sceneBgButton {
  margin: 12px 0;
}
.sceneBackgroundThumb {
  height: 75px;
  border: 1px solid #3b454b;
  border-radius: 6px;
  background-position: center;
  background-size: cover;
  margin-bottom: 12px;
}
.backgroundUpload {
  display: flex;
  gap: 6px;
  margin: 10px 0;
}
.backgroundUpload button {
  flex: 1;
  font-size: 10px;
}
.bgUrlInput {
  width: 100%;
  margin: 7px 0;
  font-size: 10px;
}
#addSceneText {
  margin-top: 12px;
}
.inspectorTop [data-selected-name] {
  font-size: 12px;
}
@media (max-width: 950px) {
  .templateGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .galleryBadge {
    display: none;
  }
  .galleryIntro h1 {
    font-size: 28px;
  }
  .galleryPage header {
    gap: 28px;
  }
}
@media (max-width: 600px) {
  .templateGrid {
    grid-template-columns: 1fr;
  }
  .galleryAccount {
    display: none;
  }
  .galleryMain {
    padding: 30px 18px;
  }
  .galleryPage header {
    padding: 0 18px;
  }
  .libraryBar {
    flex-direction: column;
    align-items: stretch;
  }
  .categoryTabs {
    justify-content: space-between;
  }
  .categoryTabs button {
    padding: 8px;
    font-size: 10px;
  }
  .libraryBar input {
    width: 100%;
  }
  .galleryIntro h1 {
    font-size: 28px;
  }
  .galleryFooter {
    gap: 20px;
  }
  .libraryMeta span:last-child {
    font-size: 9px;
  }
}
.layerRow {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-bottom: 7px;
}
.layerRow .element {
  flex: 1;
  margin: 0;
  min-width: 0;
}
.layerEye {
  flex: 0 0 28px;
  padding: 5px;
  background: transparent;
  color: #bdc9ad;
  border: 0;
  cursor: pointer;
}
#headlineEye {
  float: right;
  margin-top: -48px;
  position: relative;
  margin-right: 8px;
}
.layerRow .element small {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}
#backgroundEye {
  float: right;
  position: relative;
  margin-top: -45px;
  margin-right: 8px;
}
.sceneBgButton {
  padding-right: 35px !important;
}
.newsCanvasTools {
  display: flex;
  gap: 5px;
  align-items: center;
}
.newsCanvasTools button,
.newsCanvasTools select {
  font-size: 11px;
  background: #202429;
  color: #c4c8ce;
  border: 1px solid #34383c;
  border-radius: 5px;
  padding: 5px;
}
.newsCanvasTools .active {
  color: #d4ff62;
  border-color: #798943;
}
.descriptionHighlight {
  border-top: 1px solid #333;
  padding-top: 10px;
  margin-top: 10px;
}
.matchPresetGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.matchPresetGrid > button {
  background: #212428;
  border: 1px solid #33383d;
  border-radius: 6px;
  padding: 7px;
  color: #bdc3c7;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}
.matchPresetGrid > button.active {
  border-color: #8ca24e;
  color: #d4ff62;
}
.matchPresetGrid > button > span {
  display: block;
  height: 45px;
  border-radius: 3px;
  padding: 8px;
  font-family: Georgia;
  font-size: 13px;
  margin-bottom: 7px;
}
.matchPresetGrid > button > span > span {
  margin-left: 5px;
  padding: 1px;
  font-family: Arial;
  font-weight: bold;
  font-size: 10px;
}
.matchRange {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  background: #242827;
  border: 1px solid #40493b;
  border-radius: 5px;
  margin-top: 6px;
  color: #d4ff62;
  font-size: 12px;
}
.matchRange button {
  border: 0;
  background: none;
  color: #b4bcaf;
  cursor: pointer;
  font-size: 17px;
}
#matchText {
  min-height: 135px;
  resize: vertical;
}
.matchArticleSource {
  margin-bottom: 0;
}
