/* Shared title ornaments for the landing page, main site and recharge page. */
@font-face {
  font-family: "Chapter Brush";
  src: url("assets/fonts/chapter-brush-roster.ttf?v=f4c940a21f66") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

.g-experience .g-chapter-heading,
.recharge-reference .g-chapter-heading {
  --chapter-size: clamp(34px, 2.4vw, 60px);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}
.g-experience .g-chapter-heading .g-chapter-name,
.recharge-reference .g-chapter-heading .g-chapter-name {
  order: -1;
  margin: 0;
  font-family: "Chapter Brush", "STKaiti", "KaiTi", serif;
  font-size: var(--chapter-size);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.15;
  letter-spacing: .1em;
  white-space: nowrap;
  color: #efd6a1;
  text-shadow: 0 2px 0 #19201c, 0 3px 8px #02070ba6;
}
.g-experience .g-chapter-heading .g-chapter-en,
.recharge-reference .g-chapter-heading .g-chapter-en {
  flex: none;
  align-self: flex-end;
  padding-bottom: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(14px, .9vw, 20px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .14em;
  color: #baa98a;
  white-space: nowrap;
}
.g-chapter-seal {
  flex: none;
  display: grid;
  place-items: center;
  align-self: center;
  width: 26px;
  height: 34px;
  margin-left: 2px;
  border: 1px solid #bd875d;
  outline: 1px solid #884c36;
  outline-offset: 2px;
  border-radius: 2px;
  background: #713a2c;
  color: #f2d3a0;
  font: normal 23px/1 "Chapter Brush", "KaiTi", serif;
  transform: rotate(-4deg);
}
.g-chapter-rule {
  flex: none;
  width: clamp(90px, 8vw, 160px);
  min-width: 64px;
  height: 30px;
  margin-left: 4px;
  background: url("assets/icons/NewsCloudRule.svg?v=3c23ace402bb") left bottom / 220px 32px no-repeat;
  mask-image: linear-gradient(90deg, #000 72%, transparent);
  opacity: .8;
  pointer-events: none;
}

.g-experience .g-world-heading .g-chapter-heading { --chapter-size: clamp(40px, 3vw, 62px); }

/* Stacked headings keep the English label above the title. */
.g-experience .g-chapter-heading-stacked,
.recharge-reference .g-chapter-heading-stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.g-experience .g-chapter-heading-stacked .g-chapter-en,
.recharge-reference .g-chapter-heading-stacked .g-chapter-en {
  align-self: auto;
  padding: 0;
}
.g-chapter-title-row { display: flex; align-items: center; gap: 14px; max-width: 100%; }
.recharge-reference .g-chapter-heading { --chapter-size: clamp(40px, 3vw, 52px); }
.recharge-reference .g-chapter-heading .g-chapter-rule { flex-basis: 210px; width: 210px; }
.recharge-reference .g-chapter-heading .g-chapter-en { font-size: 12px; }

.g-experience .g-chapter-heading-centered {
  --chapter-size: clamp(40px, 3.2vw, 64px);
  width: 100%;
  align-items: center;
  gap: 8px;
}
.g-chapter-flourish { display: flex; align-items: center; justify-content: center; gap: 12px; height: 20px; pointer-events: none; }
.g-chapter-flourish:before, .g-chapter-flourish:after {
  content: "";
  width: 128px;
  height: 24px;
  background: url("assets/icons/NewsCloudRule.svg?v=3c23ace402bb") left bottom / 164px 24px no-repeat;
  opacity: .75;
}
.g-chapter-flourish:before { transform: scaleX(-1); }
.g-chapter-flourish > i { flex: none; display: block; width: 6px; height: 6px; border: 1px solid #c6ac72; background: #806b3d55; transform: rotate(45deg); }

@media (min-width: 681px) and (max-width: 1200px) {
  .g-feature-shell .g-chapter-rule { display: none; }
  .g-world-heading .g-chapter-rule { flex-basis: 100px; }
}
@media (min-width: 681px) and (max-height: 720px) {
  .g-experience .g-chapter-heading { --chapter-size: 36px; }
  .g-experience .g-world-heading .g-chapter-heading { --chapter-size: 40px; }
  .g-experience .g-chapter-heading-centered { --chapter-size: 36px; gap: 6px; }
}
@media (max-width: 680px) {
  .g-experience .g-chapter-heading, .recharge-reference .g-chapter-heading { gap: 10px; }
  .g-experience .g-chapter-heading .g-chapter-en { font-size: 12px; letter-spacing: .1em; padding-bottom: 4px; }
  .g-chapter-rule { display: none; }
  .g-chapter-seal { width: 20px; height: 27px; font-size: 18px; }
  .g-experience .g-world-heading .g-chapter-heading { --chapter-size: 36px; }
  .recharge-reference .g-chapter-heading { --chapter-size: 36px; }
  .recharge-reference .g-chapter-heading .g-chapter-en { font-size: 10px; }
  .g-experience .g-chapter-heading-centered { --chapter-size: 36px; gap: 7px; }
  .g-experience .g-chapter-heading-centered .g-chapter-en { padding: 0; }
  .g-chapter-title-row { gap: 10px; }
  .g-chapter-flourish { height: 16px; gap: 10px; }
  .g-chapter-flourish:before, .g-chapter-flourish:after { width: 86px; height: 20px; background-size: 136px 20px; }
}
@media (max-width: 370px) {
  .g-experience .g-chapter-heading { --chapter-size: 32px; gap: 8px; }
  .g-feature-shell > .g-panel-heading > div.g-chapter-heading { gap: 6px; }
  .g-experience .g-chapter-heading .g-chapter-en { font-size: 11px; }
  .g-experience .g-world-heading .g-chapter-heading { --chapter-size: 32px; }
  .g-experience .g-chapter-heading-centered { --chapter-size: 32px; }
  .g-chapter-seal { width: 18px; height: 25px; font-size: 17px; }
}
