/*
 * v178 title UI.
 * The 1280x720 design canvas represents the complete game screen.
 * Runtime adaptation is uniform scale only: min(actual/design).
 */
.titleOverlay {
  position: fixed;
  z-index: 20000;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  display: block;
  overflow: hidden;
  background: transparent;
}

.titleOverlayHidden {
  display: none;
}

.titleDesignCanvas {
  --title-ui-scale: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1280px;
  height: 720px;
  transform: translate(-50%, -50%) scale(var(--title-ui-scale));
  transform-origin: 50% 50%;
  pointer-events: none;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: #3a2715;
}

.titlePanelBackground {
  position: absolute;
  z-index: 5;
  left: 180px;
  top: 80px;
  width: 940px;
  height: 560px;
  background: transparent url("../assets/ui/meridian/meridian_panel_bg.webp") center center / 100% 100% no-repeat;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .26));
  pointer-events: auto;
}

.titleMainTitle {
  position: absolute;
  z-index: 8;
  left: 560px;
  top: 110px;
  width: 180px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-size: 28px;
  line-height: 40px;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .75);
  pointer-events: none;
}

.titleCloseButton {
  position: absolute;
  z-index: 12;
  left: 1062px;
  top: 84px;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #38352f;
  color: #ff7a25;
  font-size: 38px;
  line-height: 44px;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 0 #5e1b00;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/*
 * First six items land exactly on the latest supplied coordinates:
 * x=280/480 and y=180/260/340. More rows continue at the same 80px step.
 */
.titleListViewport {
  position: absolute;
  z-index: 9;
  left: 280px;
  top: 180px;
  width: 392px;
  height: 350px;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  pointer-events: auto;
  -webkit-overflow-scrolling: touch;
}

.titleList {
  display: grid;
  grid-template-columns: 180px 180px;
  grid-auto-rows: 60px;
  grid-column-gap: 20px;
  grid-row-gap: 20px;
  width: 380px;
  padding: 0 0 4px 0;
  margin: 0;
  box-sizing: border-box;
}

.titleListItem {
  position: relative;
  width: 180px;
  height: 60px;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(129, 92, 38, .72);
  border-radius: 11px;
  background: rgba(52, 46, 37, .94);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.titleListItemSelected {
  border-color: #dfc533;
  box-shadow: 0 0 0 2px rgba(255, 224, 45, .4), inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.titleListImagePlaceholder {
  position: absolute;
  left: 0;
  top: 0;
  width: 176px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d8c49f;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .88);
  pointer-events: none;
}

.titleListImage {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 174px;
  height: 54px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.titleDetailPanel {
  position: absolute;
  z-index: 8;
  left: 720px;
  top: 160px;
  width: 320px;
  height: 340px;
  box-sizing: border-box;
  border: 3px solid rgba(59, 51, 40, .84);
  border-radius: 18px;
  background: rgba(78, 72, 62, .78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  pointer-events: none;
}

.titleConditionLabel,
.titleAttributeLabel {
  position: absolute;
  z-index: 10;
  left: 740px;
  width: 200px;
  height: 40px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  padding-left: 16px;
  color: #f1f3fa;
  font-size: 22px;
  line-height: 40px;
  font-weight: 700;
  text-shadow: 0 2px 2px rgba(0, 0, 0, .7);
  pointer-events: none;
}

.titleConditionLabel {
  top: 180px;
}

.titleAttributeLabel {
  top: 320px;
}

.titleConditionLabel:before,
.titleAttributeLabel:before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 28px;
  border-radius: 3px;
  background: rgba(230, 209, 112, .92);
  transform: skewX(-18deg);
}

.titleConditionText,
.titleAttributeText {
  position: absolute;
  z-index: 11;
  left: 740px;
  width: 200px;
  min-height: 40px;
  box-sizing: border-box;
  color: #f0ede7;
  font-size: 18px;
  line-height: 1.5;
  white-space: normal;
  word-break: break-all;
  pointer-events: none;
}

.titleConditionText {
  top: 220px;
}

.titleAttributeText {
  top: 360px;
}

.titleActionButton {
  position: absolute;
  z-index: 10;
  top: 520px;
  width: 140px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(18, 102, 87, .78);
  border-radius: 12px;
  background: linear-gradient(180deg, #49c8a6 0%, #28a88d 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .18), inset 0 -4px 0 rgba(0, 86, 74, .18);
  color: #ffffff;
  font-size: 20px;
  line-height: 36px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.titleAttributeActionButton {
  left: 730px;
}

.titleAppearanceActionButton {
  left: 890px;
}

.titleActionButtonDisabled,
.titleActionButton:disabled {
  border-color: rgba(88, 84, 77, .78);
  background: linear-gradient(180deg, #aaa69d 0%, #858078 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .09), inset 0 -4px 0 rgba(39, 37, 34, .14);
  color: rgba(255, 255, 255, .62);
  cursor: default;
}

.titleListViewport::-webkit-scrollbar {
  width: 8px;
}

.titleListViewport::-webkit-scrollbar-track {
  background: rgba(72, 55, 36, .14);
  border-radius: 4px;
}

.titleListViewport::-webkit-scrollbar-thumb {
  background: rgba(116, 85, 47, .62);
  border-radius: 4px;
}
