:root {
  --ink: #11171d;
  --surface: #1b252c;
  --line: #35454b;
  --paper: #edf2e9;
  --muted: #a0b3b8;
  --teal: #a6ece0;
  --gold: #ffce8d;
  --ui-font: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  --glass-edge: #cbdfff35;
  --glass-highlight: inset 0 1px 0 #f2f8ff40, inset 0 -1px 0 #cfe1ff12;
  --glass-popover: #19263ade;
  --catalog-tint: #a8d7ff;
  --catalog-secondary: #b2c2d7;
  --sc2-arrow: url("assets/cf/9acc787443183f51d2e8c779.png") 0 0, default;
}

body {background: var(--ink); user-select: none; -webkit-user-select: none;}
:is(input,textarea,[contenteditable]:not([contenteditable="false"])) {user-select: text; -webkit-user-select: text;}
:is(button,a[href]) {-webkit-user-drag: none;}
#stage {
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  grid-template-rows: auto minmax(0,1fr);
}
#stage, #stage * {cursor: var(--sc2-arrow) !important;}
.catalog-search input::-webkit-search-cancel-button {cursor: var(--sc2-arrow);}
#stage {
  background: radial-gradient(ellipse at 20% 23%,#52689c44,transparent 47%),
    radial-gradient(ellipse at 79% 18%,#3077a229,transparent 54%),
    linear-gradient(148deg,#070b177a,#0a112342 46%,#0b102383),
    url("assets/cf/04e28110ac1f0793405c95db.webp") center / cover no-repeat #0a1326;
}

.workspace-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 42px);
  min-width: 0;
  padding: 0 clamp(10px, 2.2vw, 38px);
  min-height: 58px;
  z-index: 10;
  background: #182128;
  border-color: var(--line);
  font-family: var(--ui-font);
}
.workspace-brand {color: var(--paper); font: 800 clamp(21px,1.55vw,27px)/1 var(--ui-font); white-space: nowrap;}
.workspace-bar nav {align-self: stretch; padding: 0; min-width: 0;}
.workspace-bar a {font: 500 14px var(--ui-font); padding: 0 clamp(7px, 1.25vw, 20px);}
.workspace-tools {margin-left: auto; display: flex; align-items: center; gap: 9px;}
.workspace-actions {display: flex; align-items: center; gap: 8px;}
#map-version {
  anchor-name: --version-control;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 39px;
  min-width: 91px;
  padding: 0 12px;
  border: 1px solid var(--glass-edge);
  border-radius: 20px;
  background: linear-gradient(150deg,#99bce647,#20334b80 68%),#131f36a8;
  box-shadow: var(--glass-highlight);
  color: #edf4ff;
  font: 600 13px var(--ui-font);
}
#map-version::after {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1.5px solid;
  border-bottom: 1.5px solid;
  rotate: 45deg;
  translate: 0 -2px;
}
#version-menu {
  position: fixed;
  position-anchor: --version-control;
  inset: anchor(bottom) anchor(right) auto auto;
  width: 165px;
  margin: 7px 0 0;
  padding: 5px;
  border: 1px solid var(--glass-edge);
  border-radius: 17px;
  background: #18283cde;
  box-shadow: var(--glass-highlight),0 11px 28px #040b1d88;
  backdrop-filter: blur(26px) saturate(1.5);
}
#version-menu:popover-open {animation: version-menu-open 185ms cubic-bezier(.19,.78,.26,1) both;}
#version-menu button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding-inline: 10px;
  border-radius: 12px;
  color: #edf4ff;
  font: 500 14px var(--ui-font);
}
#version-menu button:is(:hover,[aria-current="true"]) {background: #d2e8ff22;}
#version-menu button[aria-current="true"]::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #dfedff;
  border-bottom: 2px solid #dfedff;
  rotate: -45deg;
}
@keyframes version-menu-open {
  from {opacity: 0; transform: translateY(-4px) scale(.95); transform-origin: top right;}
  to {opacity: 1; transform: none; transform-origin: top right;}
}
@media (prefers-reduced-motion: reduce) {
  #version-menu:popover-open {animation: none;}
}
.workspace-actions button {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--paper);
  font: 600 13px var(--ui-font);
  white-space: nowrap;
}

.workspace-bar {
  background: linear-gradient(180deg,#101728a8,#1017282b);
  border-color: #b5d5ff18;
  & .workspace-brand {letter-spacing: .025em; color: #f5f9ff;}
  & nav, & .workspace-actions {
    background: linear-gradient(160deg,#748da44d,#2533496c 54%,#748aa243), #141f3382;
    border: 1px solid var(--glass-edge);
    box-shadow: var(--glass-highlight),0 4px 12px #02091d40;
    backdrop-filter: blur(20px) saturate(1.32);
    border-radius: 28px;
  }
  & nav {align-self: center; height: auto; gap: 2px; padding: 3px;}
  & nav a {min-height: 34px; border: 0; border-radius: 20px; color: #e5eefb;}
  & nav a:hover {background: #eef7ff19;}
  & nav a[aria-current] {border: 0; color: #f5faff; font-weight: 650; background: #d4eaff28; box-shadow: inset 0 1px #eaf6ff30;}
  & .workspace-actions {gap: 1px; padding: 2px;}
  & .workspace-actions button {border: 0; border-radius: 23px; background: transparent;}
  & .workspace-actions button:hover {background: #e5f2ff21;}

}
#fullscreen {display: inline-flex; align-items: center; justify-content: center; gap: 6px;}
#fullscreen span:first-child {font: 19px system-ui;}
#workspace-status {
  position: absolute;
  right: 12px;
  top: 100%;
  z-index: 1;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
}

#modern-view {
  --catalog-paper: #eff6ff;
  --catalog-rule: #accced32;
  display: grid;
  grid-template: minmax(0,1fr) / clamp(176px,16vw,232px) minmax(0,1fr);
  position: relative;
  height: 100%;
  overflow: hidden;
  color: var(--catalog-paper);
  font-family: var(--ui-font);
}
.catalog-rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  scrollbar-width: none;
  margin: 9px 0 9px 8px;
  background: linear-gradient(154deg,#d8eaff32,#29467b28 48%,#1024424c);
  backdrop-filter: blur(14px) saturate(1.45);
  border: 1px solid var(--glass-edge);
  border-radius: 23px;
  box-shadow: var(--glass-highlight),inset 1px 0 1px #bdd9ff23,0 8px 22px #00091f4d;
}
.catalog-rail > * {flex: 0 0 auto;}
.catalog-rail::-webkit-scrollbar {display: none;}
#catalog-nav {
  position: relative;
  display: grid;
  gap: 1px;
  padding: 8px 10px;
  background: transparent;
}
.catalog-category {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 33px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #e7effa;
  font-size: 14px;
  white-space: nowrap;
}
.catalog-category:hover {background: #eef6ff13;}
.catalog-category[aria-current] {color: #f1f8ff; font-weight: 680; background: transparent;}
.catalog-category-highlight {
  position: absolute;
  top: 0;
  left: 0;
  border: 1px solid #deedff26;
  border-radius: 13px;
  background: #9fc9ff29;
  box-shadow: inset 0 1px #e8f4ff25;
  pointer-events: none;
  transition: transform 255ms cubic-bezier(.2,.72,.2,1), width 255ms ease, height 255ms ease;
}
@media (prefers-reduced-motion: reduce) {
  .catalog-category-highlight {transition: none;}
}
.catalog-category-count {color: #ccdff5; font: 11px var(--ui-font); font-variant-numeric: tabular-nums;}
.catalog-main {
  position: relative;
  min-width: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: none;
}
.catalog-main::-webkit-scrollbar {display: none;}
#modern-view:not(.is-mobile-catalog) .catalog-main:has(.catalog-card-grid,.catalog-profile-grid) {overflow: hidden;}
#modern-view .catalog-main:has(#catalog-route-view:not([hidden])) {overflow: auto; touch-action: pan-x pan-y;}
#catalog-route-view {min-height: 100%; padding: 10px clamp(10px,2vw,24px) 18px;}
.route-graph {position: relative; display: grid; gap: 26px; padding: 12px 5px;}
.route-lines {position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0;}
.route-round {display: grid; grid-template-columns: clamp(64px,10vw,151px) minmax(0,1fr); align-items: center; isolation: isolate;}
.route-round h3 {margin: 0; font: 700 clamp(15px,2vw,32px)/1.15 UGC,sans-serif; -webkit-text-stroke: 2px #000; paint-order: stroke fill;}
.route-nodes {display: flex; flex-wrap: wrap; justify-content: center; gap: 5px;}
.route-node {
  position: relative;
  container-type: inline-size;
  perspective: 500px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 3px;
  width: clamp(55px,6vw,96px);
  padding: 3px 0;
  background: transparent;
  color: #e8eef5;
  font: 400 clamp(13px,1.25vw,21px)/1.2 UGC,sans-serif;
}
.route-node.is-hovered {z-index: 2; --card-hover-scale: 1.08; --card-lift: -2px;}
.route-node.is-untilting .route-portrait {transition-duration: 260ms;}
.route-portrait {position: relative; display: block; width: 88%; aspect-ratio: 1;}
.route-portrait img {position: absolute; object-fit: contain;}
.route-face {inset: 6%; width: 88%; height: 88%; filter: brightness(.19);}
.route-frame {inset: 0; width: 100%; height: 100%; opacity: .45;}
.route-frame-selected {display: none;}
.route-enemy-name {
  font-size: min(18px,calc(92cqw / var(--route-name-length,4)));
  white-space: nowrap;
  -webkit-text-stroke: 1.5px #000;
  paint-order: stroke fill;
}
.route-node.is-candidate .route-face {filter: none;}
.route-node.is-candidate .route-frame {opacity: 1;}
.route-node[aria-pressed="true"] .route-frame-selected {display: block;}
.route-node[aria-pressed="true"] .route-portrait:has(.route-frame-selected) .route-frame:not(.route-frame-selected) {visibility: hidden;}
.route-boss .route-node {width: clamp(92px,11vw,156px);}
.catalog-content {padding: 8px clamp(12px,2vw,26px) 44px; margin: 0 auto;}
.catalog-content:has(.catalog-card-grid,.catalog-profile-grid) {padding-bottom: 4px;}
.catalog-content:has(#catalog-page:not([hidden])) {display: flex; flex-direction: column; min-height: 100%;}
.catalog-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}
#catalog-title {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  color: #f4f8ff;
  font: 750 24px/1.14 var(--ui-font);
  text-shadow: none;
  text-align: left;
  letter-spacing: -.035em;
}
.catalog-controls {margin-inline: 10px; padding: 12px 0 14px; border-top: 1px solid #cae3ff35;}
.catalog-search, .catalog-search span {display: block; min-width: 0;}
.catalog-search span {position: relative;}
.catalog-search input {
  background: #07102041;
  border: 1px solid #c8dbf333;
  border-radius: 11px;
  color: #f1f7ff;
  font: 500 15px var(--ui-font);
}
.catalog-search span::before, .catalog-search span::after {content: ""; position: absolute; z-index: 1; left: 11px; pointer-events: none;}
.catalog-search span::before {width: 10px; height: 10px; top: 50%; translate: 0 -65%; border: 1.5px solid #bed2ec; border-radius: 50%;}
.catalog-search span::after {width: 5px; height: 1.5px; top: calc(50% + 4px); left: 19px; rotate: 45deg; background: #bed2ec; border-radius: 2px;}
.catalog-search input {width: 100%; min-height: 36px; padding: 6px 35px 6px 30px; border-radius: 19px;}
.catalog-search input::placeholder {color: var(--catalog-secondary);}
.catalog-search kbd {position: absolute; right: 10px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid #c8dbf33d; border-radius: 5px; color: var(--catalog-secondary); pointer-events: none;}
.catalog-search span:focus-within kbd, .catalog-search span:has(input:not(:placeholder-shown)) kbd {display: none;}
.catalog-toolbar {display: grid; gap: 6px;}
.catalog-fieldset {display: grid; grid-template-columns: minmax(0,1fr); gap: 6px; padding-top: 7px;}
#catalog-gold-hint {
  margin: auto 10px 0;
  padding: 8px 0 14px;
  color: var(--catalog-secondary);
  font: 400 14px/1.5 var(--ui-font);
  letter-spacing: .02em;
  text-align: center;
}
#catalog-filter-toggle {display: none;}
.catalog-filter-field {
  display: grid;
  grid-template-columns: 26px minmax(0,1fr);
  align-items: center;
  column-gap: 6px;
  font-size: 12px;
}
.catalog-filter-label {color: #d5e1f0;}
.catalog-filter-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  min-width: 0;
  padding: 4px 9px;
  border: 1px solid #cbddf335;
  border-radius: 10px;
  background: #07102041;
  color: #f1f7ff;
  text-align: left;
  font-size: 13px;
}
.catalog-filter-trigger:hover, .catalog-filter-trigger[aria-expanded="true"] {background: #d7e8ff21;}
.catalog-filter-trigger::after {
  content: "";
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid #d3e2f5;
  border-bottom: 1.5px solid #d3e2f5;
  rotate: 45deg;
  margin: -3px 2px 0 5px;
  transition: rotate 180ms ease;
}
.catalog-filter-trigger[aria-expanded="true"]::after {rotate: 225deg;}
.catalog-rail > * {transition: opacity 160ms ease;}
.catalog-rail.is-filter-open > * {opacity: 0;}
#catalog-filter-sheet {
  position: absolute;
  z-index: 7;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 8px;
  border: 1px solid #c4ddff40;
  border-radius: 20px;
  background: linear-gradient(155deg,#2f4668c9,#101b32ed 65%);
  backdrop-filter: blur(25px) saturate(1.3);
  box-shadow: var(--glass-highlight),0 8px 24px #030b235f;
}
.catalog-filter-sheet-header {display: grid; grid-template-columns: 38px minmax(0,1fr) 38px; align-items: center; margin-bottom: 8px; color: #f1f7ff;}
.catalog-filter-sheet-header strong {justify-self: center; font-size: 16px;}
.catalog-filter-back {display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #cde5ff17;}
.catalog-filter-back::before {content: ""; width: 7px; height: 7px; border-left: 2px solid; border-bottom: 2px solid; rotate: 45deg; translate: 1px 0;}
.catalog-filter-back:hover {background: #d2e8ff30;}
.catalog-filter-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  border-radius: 13px;
}
.catalog-filter-list::-webkit-scrollbar {display: none;}
.catalog-filter-option {
  display: flex;
  width: calc(100% - 8px);
  min-height: 34px;
  margin: 2px 4px;
  padding: 5px 9px;
  align-items: center;
  gap: 8px;
  text-align: left;
  color: #edf5ff;
  font-size: 13px;
  border-radius: 8px;
}
.catalog-filter-option:is(:hover,:focus-visible) {background: #eaf4ff1a;}
.catalog-filter-option[aria-pressed="true"] {background: #9fc9ff29;}
.catalog-filter-option[aria-pressed="true"]::after {content: "✓"; margin-left: auto; color: #deefff;}
.catalog-filter-icon {width: 26px; height: 26px; object-fit: contain;}
#catalog-count {font-size: 11px; color: var(--catalog-secondary); white-space: nowrap; margin: 0;}
#catalog-results {margin-top: 8px;}
#catalog-results {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(min(100%,258px),1fr));
  align-items: stretch;
  gap: 12px;
}
#catalog-results.catalog-gallery {
  grid-template-columns: repeat(auto-fill,minmax(min(100%,350px),1fr));
  gap: 24px;
}
#catalog-results.catalog-card-grid {
  --card-grid-columns: 4;
  --card-grid-gap: 12px;
  --card-row-gap: 24px;
  width: min(100%,calc(var(--card-grid-columns) * var(--catalog-card-width,160px) + (var(--card-grid-columns) - 1) * var(--card-grid-gap)));
  margin-inline: auto;
  grid-template-columns: repeat(var(--card-grid-columns),minmax(0,1fr));
  gap: var(--card-row-gap) var(--card-grid-gap);
}
#catalog-results.catalog-card-grid:has(.catalog-gallery-item) {flex: 1; align-content: center;}
#catalog-results.catalog-profile-grid {
  position: relative;
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  grid-template-columns: repeat(2,minmax(0,1fr));
  grid-auto-rows: var(--catalog-profile-height,188px);
  gap: clamp(22px,3vh,38px) clamp(27px,5vw,95px);
}
#modern-view:not(.is-mobile-catalog) #catalog-results.catalog-profile-grid:has(.catalog-profile-record) {
  flex: 1;
  grid-template-rows: repeat(var(--profile-rows,3),var(--catalog-profile-height,188px));
  align-content: space-evenly;
}
.tone-terr {--record-accent: #a6defc;}
.tone-prot {--record-accent: #e2d0ff;}
.tone-zerg {--record-accent: #e5aee7;}
.tone-rand {--record-accent: #a6ece0;}
.catalog-record {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0,1fr);
  align-content: start;
  gap: 12px;
  min-height: 126px;
  padding: 13px 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-top: 2px solid color-mix(in srgb,var(--record-accent) 60%,var(--line));
  border-radius: 8px 8px 4px 4px;
  background: var(--surface);
  color: var(--paper);
}
.catalog-record:hover, .catalog-record.is-selected {
  border-color: var(--record-accent);
  background: #24323a;
}
.catalog-record.catalog-profile-record {
  --profile-accent: #8fc9ff;
  display: block;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  perspective: 850px;
}
.catalog-profile-plane {
  display: grid;
  grid-template-columns: min(43%,calc(var(--catalog-profile-height,188px) - 2px)) minmax(0,1fr);
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid #aecff32f;
  border-radius: inherit;
  background: linear-gradient(124deg,#233b56,#141c31e8 58%);
  color: #f2f7ff;
  box-shadow: 0 6px 16px #03071360,inset 0 1px #d2e5ff14;
}
.catalog-profile-record.profile-enemies {--profile-accent: #fbb488;}
.profile-terms .catalog-profile-plane {grid-template-columns: minmax(0,1fr); border-left: 3px solid var(--profile-accent);}
.catalog-profile-record:is(:hover,.is-selected) {background: transparent;}
.catalog-profile-record.is-hovered {z-index: 2; --card-lift: -4px; --card-hover-scale: 1.035;}
.catalog-profile-record.is-untilting {z-index: 1;}
.catalog-profile-record.is-untilting .catalog-card-plane {transition: transform 300ms cubic-bezier(.2,.67,.24,1);}
.catalog-profile-art {
  position: relative;
  display: block;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #202b42;
}
.catalog-profile-art img {position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain;}
.catalog-profile-body {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 0;
  align-content: safe center;
  padding: 10px clamp(12px,2vw,25px);
  overflow: auto;
  scrollbar-width: none;
}
.catalog-profile-meta {font-size: 12px; color: var(--profile-accent);}
.catalog-profile-body .catalog-record-title {margin: 0; font-size: clamp(19px,2vw,28px); font-weight: 750;}
.catalog-profile-copy {
  color: #c5d5ea;
  font-size: 14px;
  line-height: 1.48;
  overflow-wrap: anywhere;
}
.catalog-gallery .catalog-gallery-item {
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: none;
  perspective: 650px;
}
.catalog-gallery-art {
  position: relative;
  width: 100%;
  aspect-ratio: 340/430;
  overflow: hidden;
  will-change: transform;
}
.catalog-gallery-art > .entry {
  position: absolute;
  inset: 0 auto auto 0;
  width: 340px;
  height: 430px;
  transform-origin: 0 0;
  transform: scale(var(--preview-scale,1));
  pointer-events: none;
}
.catalog-gallery-trigger {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 7px;
}
.catalog-gallery-trigger > span {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.catalog-card-plane {
  pointer-events: none;
  transform: translate(var(--gallery-drag-x,0px),calc(var(--gallery-drag-y,0px) + var(--card-lift,0px)))
    rotateX(var(--card-pitch,0deg)) rotateY(var(--card-yaw,0deg)) scale(var(--card-hover-scale,1));
  transition: transform 150ms cubic-bezier(.2,.75,.27,1);
}
.catalog-gallery-item:focus-within, .catalog-gallery-item.is-untilting {z-index: 1;}
.catalog-gallery-item.is-hovered {
  z-index: 2;
  --card-lift: -5px;
  --card-hover-scale: 1.12;
}
.catalog-gallery-item.is-untilting .catalog-card-plane {transition: transform 310ms cubic-bezier(.2,.67,.24,1);}
.catalog-gallery-item.is-dragging, .catalog-gallery-item.is-returning {z-index: 3;}
.catalog-gallery-item.is-dragging .catalog-card-plane {
  transform: translate3d(var(--gallery-drag-x,0px),var(--gallery-drag-y,0px),0) var(--card-drag-pose);
  transition: none;
}
.catalog-gallery-item.is-returning .catalog-card-plane {transition: transform 425ms cubic-bezier(.22,.78,.22,1);}
#catalog-card-terms {
  position: fixed;
  z-index: 4;
  width: min(330px,calc(100vw - 24px));
  max-height: min(78dvh,calc(100dvh - 76px));
  overflow: auto;
  scrollbar-width: none;
  overscroll-behavior: contain;
  pointer-events: none;
  filter: drop-shadow(0 5px 12px #0005);
}
#catalog-card-terms.can-scroll:not(.unit-skills) {pointer-events: auto;}
#catalog-card-terms.unit-skills {max-height: none; overflow: visible;}
#catalog-card-terms::-webkit-scrollbar {display: none;}
#catalog-card-terms .catalog-term {background: #171815;}
#catalog-card-terms .unit-skill-panels {gap: 8px;}
#catalog-card-terms .unit-skill-panel {
  grid-template-columns: 44px minmax(0,1fr);
  gap: 13px;
  align-items: center;
  padding: 13px 14px;
  line-height: 1.38;
}
#catalog-card-terms .unit-skill-name {margin-bottom: 6px; color: #83d5ce;}
#catalog-card-terms .unit-skill-icon img {width: 44px; height: 44px;}
#catalog-card-terms:not([hidden]) {animation: catalog-term-reveal 105ms ease-out both;}
.enemy-reward-preview {display: grid; align-items: start; gap: 8px; width: 100%;}
.enemy-reward-preview.is-wide {grid-template-columns: var(--reward-card-width) minmax(0,330px);}
.enemy-reward-preview.is-wide.is-left {grid-template-columns: minmax(0,330px) var(--reward-card-width);}
.enemy-reward-preview.is-wide.is-left .catalog-gallery-art {grid-area: 1 / 2;}
.enemy-reward-preview.is-wide.is-left .enemy-reward-notes {grid-area: 1 / 1;}
.enemy-reward-notes {display: grid; gap: 6px;}
.enemy-reward-preview .catalog-gallery-art {width: min(100%,var(--reward-card-width,340px));}
@keyframes catalog-term-reveal {
  from {opacity: .82;}
  to {opacity: 1;}
}
.catalog-art {
  display: grid;
  place-items: center;
  justify-content: stretch;
  width: 52px;
  aspect-ratio: 1;
  background: #162026;
  border: 1px solid #466069;
  border-radius: 7px;
  color: var(--record-accent,var(--teal));
  font-size: 21px;
}
.catalog-art-image {width: 100%; height: 100%; object-fit: contain;}
.catalog-record-text {display: flex; flex-direction: column; min-width: 0;}
.catalog-record-title {font-size: 17px; line-height: 1.28; overflow-wrap: anywhere;}
.catalog-record-meta {font-size: 11px; color: var(--record-accent,var(--teal)); margin: 3px 0 6px; overflow-wrap: anywhere;}
.catalog-record-copy {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.52;
  color: #cbd7da;
}
.catalog-record-value {position: absolute; left: 14px; top: 72px; width: 52px; color: var(--gold); text-align: center; font: 11px Eurostile,var(--ui-font);}
#catalog-more {
  display: block; margin: 20px auto 0; padding: 0 18px; min-height: 40px;
  border-radius: 20px; color: var(--catalog-paper); border: 1px solid var(--catalog-rule); background: #a9c6ed26;
}
#catalog-page {
  --dot-size: 6px;
  --dot-step: clamp(8px,1.10vw,16px);
  position: relative;
  z-index: 3;
  display: flex;
  flex: none;
  align-self: center;
  align-items: center;
  gap: 5px;
  width: max-content;
  max-width: 100%;
  margin-top: auto;
  padding: 2px 5px;
  border: 1px solid transparent;
  border-radius: 26px;
}
.catalog-page-arrow {
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  height: 30px;
  border-radius: 50%;
  color: #f0f6ff;
  transition: color 145ms ease-out;
}
.catalog-page-arrow::before {
  content: "";
  width: 7px;
  aspect-ratio: 1;
  border-top: 2px solid;
  border-right: 2px solid;
  rotate: 45deg;
}
#catalog-page-prev::before {rotate: -135deg;}
.catalog-page-arrow:not(:disabled):hover {color: var(--catalog-tint);}
.catalog-page-arrow:disabled {opacity: .32;}
#catalog-page-dots {display: flex; flex-wrap: wrap; justify-content: center; min-width: 0;}
.catalog-page-dot {
  display: grid;
  place-items: center;
  flex: 0 0 var(--dot-step);
  height: 17px;
  border-radius: 50%;
}
.catalog-page-dot::before {
  content: "";
  width: var(--dot-size);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #9cafc8;
  box-shadow: 0 0 4px #b3d3ff69;
  transition: background-color 145ms ease-out, box-shadow 145ms ease-out, scale 145ms ease-out;
}
.catalog-page-dot:hover::before {background: #e2f0ff; scale: 1.14;}
.catalog-page-dot[aria-current="page"]::before {
  background: #fff3aa;
  box-shadow: 0 0 4px 1px #ffe26a, 0 0 11px 3px #eada5760;
  scale: 1.23;
}
#modern-view #catalog-page button:focus-visible {outline-color: #fff3aa; outline-offset: 0;}
#catalog-page-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}
.catalog-empty {grid-column: 1 / -1; padding: 24px 0; color: var(--catalog-paper);}
.catalog-empty button {display: block; min-height: 44px; text-decoration: underline;}

#catalog-shade {position: absolute; inset: 0; z-index: 4; background: #080e18ca; backdrop-filter: blur(4px);}
#catalog-detail {
  position: absolute;
  z-index: 5;
  inset: clamp(14px,4vh,48px) 0;
  margin-inline: auto;
  width: min(520px,calc(100% - 36px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 28px 28px;
  background: radial-gradient(ellipse at 12% 18%,#25384d,transparent 57%),#171f2b;
  border: 1px solid #586d82;
  border-radius: 14px;
  box-shadow: 0 22px 100px #000b;
  color: var(--paper);
}
#catalog-detail:has(.with-preview) {width: min(960px,calc(100% - 36px));}
.catalog-card-flight {
  position: fixed;
  z-index: 8;
  transform-origin: top left;
  pointer-events: none;
  filter: drop-shadow(0 14px 28px #0007);
}
.catalog-page-flight {
  position: fixed;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
  color: var(--paper);
}
.catalog-page-flight > :is(.catalog-gallery-art,.catalog-profile-record) {
  position: absolute;
}
.catalog-page-flight .catalog-profile-plane {transform: none; transition: none;}
#catalog-hold-preview {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: #080d1bb0;
  backdrop-filter: blur(7px);
  color: var(--paper);
}
#catalog-hold-preview .catalog-gallery-art {
  transform-origin: top left;
  filter: drop-shadow(0 14px 22px #070a07a6);
}
.with-preview {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 30px;
  align-items: start;
  padding-top: 22px;
}
.with-preview > .catalog-gallery-art {order: -1; margin-top: 2px;}
.with-preview .catalog-identity {margin-top: 0;}
.catalog-detail-actions {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  background: #171f2bee;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.catalog-detail-actions button {
  border: 1px solid #4d6369;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 4px;
}
#catalog-close {margin-left: auto;}
#catalog-detail-neighbors {display: flex; gap: 6px;}
#catalog-detail-neighbors button:disabled {color: #7f9199; opacity: .6; cursor: default;}
.catalog-identity {display: flex; align-items: center; gap: 16px; margin: 22px 0 17px;}
.catalog-identity h2 {font-size: 32px; margin: 0; line-height: 1.18; overflow-wrap: anywhere;}
.catalog-identity .catalog-art {flex: 0 0 66px; width: 66px;}
#catalog-detail h3 {font-size: 14px; margin: 20px 0 8px; color: var(--teal);}
.catalog-detail-copy, .catalog-stats {color: #e5eeec; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere;}
.catalog-stats .foot {padding-top: 12px;}
.catalog-terms {display: grid; width: min(330px,100%); gap: 6px; --term-border: #0080ff;}
.catalog-mobile-terms {display: none;}
.catalog-terms.red {--term-border: #c10000;}
.catalog-terms.gold {--term-border: #ff8040;}
.catalog-terms.merge {--term-border: #00ffff;}
.catalog-terms.upgrades {--term-border: #42dfb5;}
.catalog-terms.prophecies {--term-border: #b57aff;}
.catalog-term {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  border: 3px solid var(--term-border);
  padding: 7px;
  /* Translate the SC2 Bold flag on UGCSG00M to a small glyph emboldening. */
  color: #fff;
  font: 400 19px/1.24 UGC,"Microsoft YaHei",sans-serif;
  -webkit-text-stroke: .4px currentColor;
  text-shadow: 1px 1px #000;
}
.catalog-term::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: #000 var(--term-black,none) center/100% 100%;
  opacity: .7;
}
.catalog-upgrade-term-header {display: flex; min-height: 34px; align-items: center; gap: 10px; margin-bottom: 8px;}
.catalog-upgrade-term-icon {flex: 0 0 34px; width: 34px; height: 34px; object-fit: contain;}
.unit-skill-panels {--term-border: #2f8a84; align-items: start;}
.unit-skill-column {display: grid; gap: inherit;}
.unit-skill-panel {
  display: grid;
  grid-template-columns: 70px minmax(0,1fr);
  gap: 10px;
  align-items: center;
  padding: 7px 11px 7px 10px;
  font-size: 17px;
  -webkit-text-stroke: .22px currentColor;
  overflow-wrap: anywhere;
}
.unit-skill-icon img {display: block; width: 70px; height: 70px; object-fit: contain;}
.unit-skill-name {color: #2f8a84;}
#modern-view :focus-visible {outline: 2px solid var(--catalog-tint); outline-offset: 2px;}
#modern-view .catalog-rail :focus-visible {outline-offset: -2px;}
.workspace-bar :focus-visible, #catalog-detail :focus-visible {outline: 2px solid var(--teal); outline-offset: 2px;}
#catalog-detail:not([hidden]) {animation: catalog-panel-enter 290ms ease-out both;}
#catalog-shade:not([hidden]) {animation: catalog-fade 240ms ease-out both;}
#modern-view:not([hidden]) {animation: catalog-fade 155ms ease-out both;}
@keyframes catalog-panel-enter {from {opacity: .15;} to {opacity: 1;}}
@keyframes catalog-fade {from {opacity: .15;} to {opacity: 1;}}

#diy-view iframe {position: relative; opacity: 0; transition: opacity 300ms ease;}
#diy-view iframe.diy-buffer {position: absolute; inset: 0; visibility: hidden; pointer-events: none;}
#diy-view.is-ready iframe {opacity: 1;}
.workspace-loading {
  position: absolute;
  z-index: 1;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  width: min(320px,calc(100% - 36px));
  padding: 19px 22px;
  border: 1px solid var(--glass-edge);
  border-radius: 21px;
  background: var(--glass-popover);
  box-shadow: var(--glass-highlight),0 8px 28px #03091e70;
  backdrop-filter: blur(16px);
  color: #eef6ff;
  font: 14px var(--ui-font);
  transition: opacity 220ms ease 150ms;
}
.workspace-loading.is-ready {opacity: 0; pointer-events: none;}
.workspace-loading-track {height: 4px; border-radius: 4px; margin-top: 13px; overflow: hidden; background: #c6deff2d;}
.workspace-loading-track span {
  display: block;
  width: var(--load-progress,12%);
  height: 100%;
  border-radius: inherit;
  background: #a5d4ff;
  transition: width 390ms cubic-bezier(.18,.72,.23,1);
}
#diy-retry {margin-top: 11px; padding: 6px 12px; border-radius: 12px; background: #7eb8ff33;}
#updates-view {
  display: block;
  background: linear-gradient(115deg,#0b1425ec,#151e39ab 55%,#142c3e91),
    var(--patch-background,none) center/cover no-repeat #111c30;
}
#update-panel {
  display: grid;
  grid-template: auto minmax(0,1fr) / clamp(144px,16vw,222px) minmax(0,1fr);
  gap: 14px clamp(18px,4vw,66px);
  width: 100%;
  height: 100%;
  padding: 16px clamp(10px,3vw,42px) 12px clamp(8px,1.8vw,24px);
  color: #f1f6fe;
  font-family: var(--ui-font);
}
#update-title {grid-column: 1 / -1; margin: 0; font-size: 30px; font-weight: 680; letter-spacing: -.025em;}
#update-nav {
  align-self: start;
  display: grid;
  gap: 3px;
  padding: 7px;
  max-height: 100%;
  scrollbar-width: none;
  border: 1px solid var(--glass-edge);
  border-radius: 22px;
  background: linear-gradient(154deg,#d8eaff32,#29467b28 48%,#1024424c);
  box-shadow: var(--glass-highlight),0 5px 20px #050e233e;
  backdrop-filter: blur(15px) saturate(1.35);
}
#update-nav button {
  min-height: 39px;
  padding: 3px 10px;
  border-radius: 13px;
  color: #e5efff;
  font-size: 14px;
  text-align: left;
}
#update-nav button:hover {background: #eaf4ff17;}
#update-nav [aria-current] {background: #a6ceff35; color: #fff; box-shadow: inset 0 1px #e8f4ff2d;}
#update-list {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 0 16px 0 0;
  scrollbar-width: auto;
  scrollbar-color: auto;
}
#update-list::-webkit-scrollbar {width: 14px;}
#update-list::-webkit-scrollbar-track, #update-list::-webkit-scrollbar-thumb {cursor: var(--sc2-arrow);}
#update-list::-webkit-scrollbar-button {display: none; width: 0; height: 0;}
#update-list::-webkit-scrollbar-track {border: 3px solid transparent; border-radius: 12px; background: #cadeff20; background-clip: padding-box;}
#update-list::-webkit-scrollbar-thumb {
  min-height: 48px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #bddcffbc;
  background-clip: padding-box;
}
#update-list::-webkit-scrollbar-thumb:hover, #update-list::-webkit-scrollbar-thumb:active {background-color: #e4f1ff;}
@supports not selector(::-webkit-scrollbar) {
  #update-list {scrollbar-color: #bddcff #cadeff20;}
}
#update-list .patch-group {margin: 0; padding: 2px 0 22px; max-width: 990px;}
#update-list .patch-group:last-child {min-height: 100%;}
#update-list .patch-category {margin: 0 0 9px; color: #f1f7ff; font: 680 27px/1.2 var(--ui-font);}
#update-list article {padding: 15px 0 19px; border: 0; border-bottom: 1px solid #d1e6ff2d; overflow-wrap: anywhere;}
#update-list .patch-entry-title {color: #fed4a1; font: 700 24px/1.22 Tavern,sans-serif; margin: 0;}
.patch-entry-link {color: inherit; text-decoration: none; text-underline-offset: .18em;}
.patch-entry-link:is(:hover,:focus-visible) {color: #ffebca; text-decoration: underline;}
#update-list p {margin-top: 6px; font: 400 20px/1.4 Tavern,sans-serif; color: #f1f5fd;}

@media (min-width: 1101px) {
  .workspace-bar {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    column-gap: clamp(9px,1.4vw,24px);
  }
  .workspace-bar nav {justify-self: center;}
  .workspace-tools {justify-self: end;}
}
@media (max-width: 900px) {
  .workspace-brand {display: none;}
}
@media (max-width: 700px) {
  .workspace-bar {flex-wrap: wrap; justify-content: center; gap: 4px; padding: 4px 5px;}
  .workspace-tools {justify-content: center; width: 100%; margin-left: 0; gap: 5px;}
  #map-version {min-height: 44px;}
  #version-menu {left: anchor(left); right: auto;}
  .workspace-bar a {padding: 0 6px; font-size: 12px;}
  .workspace-actions {gap: 5px;}
  .workspace-actions button {min-height: 44px; padding: 0 7px; font-size: 12px;}
  #mobile-mode {padding-inline: 6px;}
  #fullscreen {min-width: 40px;}
  .fullscreen-text {display: none;}
  #update-panel {grid-template: auto auto minmax(0,1fr) / minmax(0,1fr); gap: 9px; padding: 12px 10px 8px;}
  #update-title {font-size: 23px;}
  #update-nav {display: flex; gap: 3px; overflow-x: auto;}
  #update-nav button {flex: 0 0 auto; width: auto; padding-inline: 10px; white-space: nowrap; min-height: 39px; margin: 0;}
  #update-list {padding-right: 3px;}
  #update-list .patch-category {font-size: 22px;}
  #update-list .patch-entry-title {font-size: 21px;}
  #update-list p {font-size: 17px; line-height: 1.46;}
}

@media (400px <= width <= 700px) {
  .workspace-tools {width: auto; margin-left: auto;}
}

#modern-view.is-mobile-catalog {
  grid-template: auto minmax(0,1fr) / minmax(0,1fr);
  width: min(100%,460px);
  margin-inline: auto;
  & .catalog-rail {position: relative; z-index: 5; overflow: visible; margin: 5px 6px 0; border-radius: 20px;}
  & #catalog-nav {display: flex; padding: 4px 9px; overflow-x: auto; scrollbar-width: none; touch-action: pan-x;}
  & .catalog-category-count {display: none;}
  & .catalog-category {flex: 0 0 auto; width: auto; min-height: 36px; padding-inline: 11px; font-size: 14px;}
  & .catalog-content {display: flex; flex-direction: column; padding: 8px 12px max(6px,env(safe-area-inset-bottom));}
  & .catalog-heading {margin-bottom: 4px;}
  & #catalog-title {font-size: 28px;}
  & .catalog-search kbd {display: none;}
  & .catalog-search input {min-height: 42px; font-size: 16px; padding-right: 12px;}
  & .catalog-controls {padding: 7px 0;}
  & .catalog-toolbar {grid-template-columns: minmax(0,1fr) auto; gap: 8px;}
  & #catalog-gold-hint {margin-top: 0; padding: 0 0 7px; font-size: 13px;}
  & #catalog-filter-toggle {
    display: block;
    min-height: 44px;
    padding-inline: 11px;
    border: 1px solid var(--glass-edge);
    border-radius: 12px;
    background: #d0e6ff1d;
    color: #f2f7ff;
    font-size: 13px;
  }
  & #catalog-filter-toggle[aria-expanded="true"] {border-color: var(--catalog-tint);}
  & #catalog-filter-panel {
    position: absolute;
    inset: calc(100% + 4px) 8px auto;
    display: none;
    max-height: max(120px,calc(100dvh - 164px));
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    padding: 10px;
    border: 1px solid #ffffff35;
    border-radius: 16px;
    background: var(--glass-popover);
    backdrop-filter: blur(24px) saturate(1.35);
    box-shadow: 0 12px 28px #03091988,var(--glass-highlight);
  }
  & #catalog-filter-toggle[aria-expanded="true"] + #catalog-filter-panel {display: grid; gap: 8px;}
  & .catalog-filter-trigger, & .catalog-filter-option {min-height: 44px;}
  & #catalog-results {gap: 8px;}
  & #catalog-results.catalog-gallery:not(.catalog-card-grid) {grid-template-columns: minmax(0,1fr); gap: 15px;}
  & #catalog-results.catalog-card-grid {--card-grid-columns: 1; --card-grid-gap: 8px; --card-row-gap: 8px;}
  & .catalog-mobile-terms {display: block; flex: none; max-width: 100%; margin: auto auto 4px; pointer-events: none;}
  & .catalog-mobile-terms .catalog-terms {width: 100%;}
  & .catalog-mobile-terms:not([hidden]) + #catalog-results.catalog-card-grid {flex: none; margin-top: 0;}
  & .catalog-main {touch-action: pan-y;}
  & #catalog-results.catalog-profile-grid {order: 1; width: 100%; grid-template-columns: minmax(0,1fr); grid-auto-rows: 129px; gap: 16px;}
  & .catalog-profile-record:not(.profile-terms) .catalog-profile-plane {grid-template-columns: min(38%,127px) minmax(0,1fr);}
  & .catalog-profile-body {padding: 10px 12px;}
  & #catalog-more {order: 2;}
  & #catalog-page {order: 2; position: sticky; bottom: 6px; --dot-step: 10px; --dot-size: 4px;}
  & #catalog-page-dots {position: relative; flex-wrap: nowrap; justify-content: start; overflow-x: auto; scrollbar-width: none;}
  & .catalog-page-dot {height: 12px;}
  & .catalog-page-arrow {flex-basis: 42px; height: 42px;}
  & .catalog-gallery-trigger {touch-action: pan-y; -webkit-touch-callout: none; user-select: none;}
  & .catalog-record:not(.catalog-gallery-item) {min-height: 106px;}
  & #catalog-detail, & #catalog-detail:has(.with-preview) {
    inset: 0;
    width: 100%;
    border: 0;
    border-radius: 0;
    padding-inline: 17px;
    padding-bottom: max(24px,env(safe-area-inset-bottom));
  }
  & .with-preview {grid-template-columns: minmax(0,1fr); gap: 15px;}
  & .catalog-detail-actions button {min-height: 44px;}
}

@media (prefers-reduced-motion: reduce) {
  #catalog-detail:not([hidden]), #catalog-shade:not([hidden]), #catalog-card-terms:not([hidden]),
  #modern-view:not([hidden]) {animation: none;}
  .catalog-card-plane, .catalog-gallery-item.is-untilting .catalog-card-plane, .catalog-gallery-item.is-returning .catalog-card-plane,
  .catalog-profile-record.is-untilting .catalog-card-plane {transition: none;}
  .catalog-gallery .catalog-gallery-item {transition: none;}
  .catalog-profile-grid .catalog-profile-record, .catalog-page-dot::before, .catalog-page-arrow {transition: none;}
  .catalog-rail > *, .catalog-filter-trigger::after, #diy-view iframe, .workspace-loading,
  .workspace-loading-track span {transition: none;}
}
