@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

* {
  padding: 0;
  margin: 0;
  border: none;
  outline: none;
  font-family: "Inter", sans-serif;
}

body {
  background-image: url(img/bac\ 4.png);
  background-size: cover;
  background-position: top;
  background-repeat: no-repeat;
  overflow: hidden;
}

body::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  background: linear-gradient(transparent 50%, rgb(0, 0, 0));
}

/* Background-images */

.content img {
  position: absolute;
  bottom: -12%;
}

header {
  position: absolute;
  top: 0;
  z-index: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 5%;
  background-color: rgba(255, 255, 255, 0.2);
  height: 30px;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

nav a {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 2px;
  color: rgb(53, 53, 53);
  text-decoration: none;
  width: 110px;
  text-align: center;
  padding: 15px 0;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.active {
  background-color: #16423c;
  color: white;
}

nav a:hover {
  background-color: #16423c;
  color: white;
}

nav:hover>a:not(:hover) {
  background-color: transparent;
  color: rgb(53, 53, 53);
}

.title {
  position: absolute;
  top: 40%;
  right: 50%;
  transform: translate(50%, -50%);

}

.title h3 {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 15px;
  color: white;
  text-align: center;
}

.title h1 {
  font-size: 13.5rem;
  font-weight: 800;
  letter-spacing: 50px;
  text-transform: uppercase;
  color: white;
  text-align: center;
  margin: -20px 0;
}

p {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 1px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
  width: 70%;
  text-align: center;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.info-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  position: absolute;
  bottom: 18%;
  z-index: 1;
}

.cta {
  position: absolute;
  bottom: 8%;
  display: flex;
  justify-content: center;
  width: 100%;
  z-index: 1;
}

.cta button {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50px;
  height: 50px;
  width: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  cursor: pointer;
}

.cta button:hover {
  background-color: rgba(255, 255, 255, 0.8);
  color: rgb(53, 53, 53);
}

.slider {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.slider i {
  padding: 0 5%;
  font-size: 36px;
  color: rgba(255, 255, 255, 0.4);
}

/* Animations */
@keyframes bottomIn {
  from {
    transform: translateY(200px);
  }

  to {
    transform: translateY(0);
  }
}

.back-1 {
  animation: bottomIn 1s ease-out forwards;
}

.back-2 {
  animation: bottomIn 1.3s ease-out forwards;
}

.back-3 {
  animation: bottomIn 1.5s ease-out forwards;
}

@keyframes bottomInText {
  from {
    transform: translateY(500px);
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

h3 {
  animation: bottomInText 1s ease-out forwards;
}

h1 {
  animation: bottomInText 1.2s ease-out forwards;
}

p {
  animation: bottomInText 1.2s ease-out forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

button {
  animation: bottomInText 1.2s ease-out forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

@keyframes backgroundImage {
  from {
    background-position: top;
  }

  to {
    background-position: 50% 14%;
  }
}

body {
  animation: backgroundImage 1.6s ease-out forwards;
}

@keyframes topIn {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

nav {
  animation: topIn 1.2s ease-out forwards;
}

@keyframes zoomOut {
  from {
    transform: scale(1.5);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.slider {
  animation: zoomOut 1.2s ease-out forwards;
}

/* Interactive water background */
body {
  position: relative;
  width: 100%;
  min-height: 100vh;
  height: 100vh;
  background-color: #0c514b;
  background-image: none;
  isolation: isolate;
}

body::after {
  z-index: -90;
  pointer-events: none;
}

.water-stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  z-index: -100;
  overflow: hidden;
  isolation: isolate;
  background: #0c514b;
  pointer-events: auto;
}

.water-image-shell {
  position: absolute;
  inset: 0;
  animation: backgroundReveal 1.8s cubic-bezier(0.2, 0.75, 0.25, 1) both;
  will-change: transform, opacity;
}

.water-background {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(0.85);
  transform-origin: center;
  animation: waterDrift 18s ease-in-out infinite alternate;
  opacity: 0.8;
  will-change: transform;
}

.water-shimmer {
  position: absolute;
  inset: -22%;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: screen;
  background:
    repeating-radial-gradient(ellipse at 18% 35%, transparent 0 30px, rgba(205, 255, 239, 0.28) 32px 34px, transparent 36px 76px),
    repeating-linear-gradient(112deg, transparent 0 70px, rgba(255, 255, 255, 0.12) 78px 82px, transparent 90px 170px);
  filter: blur(3px);
  animation: waterShimmer 15s ease-in-out infinite alternate;
  will-change: transform, background-position;
}

.ripple-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.water-ripple {
  position: absolute;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.ripple-ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(226, 255, 247, 0.78);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(180, 255, 239, 0.4);
  animation: rippleExpand 1.8s cubic-bezier(0.16, 0.72, 0.35, 1) forwards;
}

.ripple-ring-delayed {
  animation-delay: 0.28s;
  opacity: 0.7;
}

.content {
  position: relative;
  z-index: 0;
}

@keyframes waterDrift {
  0% {
    transform: scale(0.85) translate3d(-0.35%, -0.2%, 0);
  }

  50% {
    transform: scale(0.85) translate3d(0.25%, 0.35%, 0);
  }

  100% {
    transform: scale(0.85) translate3d(-0.15%, 0.15%, 0);
  }
}

@keyframes waterShimmer {
  0% {
    transform: translate3d(-2%, -1%, 0) rotate(-1deg);
    background-position: 0 0, 0 0;
  }

  100% {
    transform: translate3d(2%, 1%, 0) rotate(1deg);
    background-position: 130px -80px, -180px 100px;
  }
}

@keyframes rippleExpand {
  0% {
    opacity: 0.88;
    transform: scale(0.2);
  }

  100% {
    opacity: 0;
    transform: scale(15);
  }
}

@media (prefers-reduced-motion: reduce) {

  .water-background,
  .water-shimmer {
    animation: none;
  }
}

body::after {
  background: linear-gradient(180deg, rgba(3, 35, 31, 0.14) 0%, rgba(3, 35, 31, 0.02) 48%, rgba(3, 35, 31, 0.2) 100%);
}

.scene-atmosphere,
.leaf-layer,
.particle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-atmosphere {
  z-index: 1;
  background:
    radial-gradient(circle at 50% 76%, rgba(255, 231, 141, 0.14), transparent 37%),
    linear-gradient(180deg, rgba(5, 45, 39, 0.14), transparent 46%, rgba(255, 246, 184, 0.06));
  mix-blend-mode: soft-light;
  animation: atmospherePulse 14s ease-in-out infinite alternate;
}

.leaf-layer {
  z-index: 2;
  overflow: hidden;
}

.falling-leaf {
  position: absolute;
  left: var(--leaf-x);
  top: var(--leaf-y);
  width: clamp(12px, 1.45vw, 28px);
  height: clamp(15px, 1.9vw, 35px);
  opacity: 0;
  background: linear-gradient(135deg, rgba(255, 190, 86, 0.96), var(--leaf-color) 54%, rgba(111, 47, 20, 0.92));
  clip-path: polygon(49% 0, 64% 18%, 91% 8%, 77% 36%, 100% 48%, 71% 53%, 87% 83%, 57% 67%, 50% 100%, 43% 67%, 13% 84%, 29% 54%, 0 48%, 24% 35%, 10% 8%, 39% 19%);
  filter: drop-shadow(0 4px 7px rgba(31, 51, 24, 0.26));
  transform-origin: 50% 20%;
  animation: leafFall var(--leaf-duration) linear var(--leaf-delay) infinite;
  will-change: transform, opacity;
}

.falling-leaf::before {
  content: '';
  position: absolute;
  left: 48%;
  top: 10%;
  width: 1px;
  height: 82%;
  background: rgba(255, 224, 138, 0.58);
  transform: rotate(9deg);
  transform-origin: bottom center;
}

.particle-layer {
  z-index: 3;
  overflow: hidden;
}

.ambient-particle {
  position: absolute;
  left: var(--particle-x);
  top: var(--particle-y);
  width: var(--particle-size);
  height: var(--particle-size);
  border-radius: 50%;
  background: rgba(244, 234, 157, 0.78);
  box-shadow: 0 0 9px rgba(255, 238, 147, 0.72);
  opacity: 0;
  animation: particleFloat var(--particle-duration) ease-in-out var(--particle-delay) infinite alternate;
  will-change: transform, opacity;
}

@keyframes atmospherePulse {
  0% {
    opacity: 0.55;
    transform: scale(1) translate3d(-0.5%, 0, 0);
  }

  100% {
    opacity: 0.92;
    transform: scale(1.05) translate3d(0.5%, 0.8%, 0);
  }
}

@keyframes leafFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -14vh, 0) rotate(var(--leaf-start-rotation)) scale(var(--leaf-scale));
  }

  12% {
    opacity: 0.92;
  }

  48% {
    opacity: 0.8;
    transform: translate3d(calc(var(--leaf-drift-x) * 0.35), calc(var(--leaf-fall) * 0.42), 0) rotate(calc(var(--leaf-start-rotation) + 145deg)) scale(var(--leaf-scale));
  }

  78% {
    opacity: 0.66;
    transform: translate3d(calc(var(--leaf-drift-x) * 0.68), calc(var(--leaf-fall) * 0.76), 0) rotate(calc(var(--leaf-end-rotation) * 0.7)) scale(var(--leaf-scale));
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--leaf-drift-x), var(--leaf-fall), 0) rotate(var(--leaf-end-rotation)) scale(var(--leaf-scale));
  }
}

@keyframes particleFloat {
  0% {
    opacity: 0.08;
    transform: translate3d(-5px, 5px, 0) scale(0.7);
  }

  50% {
    opacity: 0.72;
    transform: translate3d(4px, -9px, 0) scale(1);
  }

  100% {
    opacity: 0.12;
    transform: translate3d(10px, 2px, 0) scale(0.75);
  }
}

@media (prefers-reduced-motion: reduce) {

  .water-background,
  .water-shimmer,
  .scene-atmosphere,
  .falling-leaf,
  .ambient-particle {
    animation: none;
  }
}

.ripple-layer {
  z-index: 4;
}


.title {
  top: 15%;
  z-index: 3;
}


@keyframes backgroundReveal {
  from {
    opacity: 0.72;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}


body,
body * {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
}




header {
  z-index: 10;
}

.title.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.character-section {
  position: absolute;
  inset: 0;
  z-index: 5;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: rgba(29, 45, 54, 0.96);
  transition: opacity 0.32s ease, visibility 0.32s ease;
}

.character-section.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.character-scroll {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  padding: clamp(76px, 9vh, 112px) clamp(16px, 3vw, 56px) 48px;
  scrollbar-color: rgba(241, 185, 67, 0.8) rgba(14, 28, 35, 0.55);
  scrollbar-width: thin;
}

.character-scroll::-webkit-scrollbar {
  width: 10px;
}

.character-scroll::-webkit-scrollbar-track {
  background: rgba(14, 28, 35, 0.55);
}

.character-scroll::-webkit-scrollbar-thumb {
  background: rgba(241, 185, 67, 0.8);
  border-radius: 10px;
}

.character-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(14px, 1.6vw, 28px);
  width: min(100%, 1800px);
  margin: 0 auto;
}

.character-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: #263942;
  box-shadow: 0 12px 30px rgba(4, 15, 20, 0.28);
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.character-overview {
  width: min(100%, 1600px);
  margin: 0 auto;
}

.character-skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 28px);
}

@media (max-width: 980px) {
  .character-skill-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .character-scroll {
    padding: 78px 10px 28px;
  }

  .character-image {
    border-radius: 10px;
  }
}

@font-face {
  font-family: 'GCG';
  src: url('fonts/GCG.woff') format('woff');
  font-display: block;
}

.character-section {
  background-color: rgba(12, 81, 75, 0.72);
  color: rgba(247, 249, 244, 0.96);
  font-family: 'GCG', 'Microsoft YaHei', sans-serif;
}

.character-content {
  display: grid;
  gap: clamp(14px, 1.6vw, 28px);
  width: min(100%, 1800px);
  margin: 0 auto;
}

.character-card {
  box-sizing: border-box;
  padding: clamp(18px, 2vw, 34px);
  border: 1px solid rgba(225, 245, 231, 0.18);
  border-radius: 16px;
  background: rgba(10, 54, 53, 0.84);
  box-shadow: 0 14px 32px rgba(2, 25, 27, 0.22);
}

.character-profile {
  text-align: center;
}

.character-profile-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: clamp(18px, 2.4vw, 30px);
}

.character-profile-heading h2 {
  margin: 0;
  color: #ff8d8d;
  font-size: clamp(1.55rem, 2.7vw, 2.8rem);
  font-weight: 700;
}

.character-profile-heading select {
  min-width: 142px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  color: #1b2b30;
  background: #f4f4ed;
  font: inherit;
  font-size: clamp(0.95rem, 1.3vw, 1.25rem);
  cursor: pointer;
}

.character-stat-rows {
  display: grid;
  gap: 12px;
  width: min(100%, 1000px);
  margin: 0 auto;
}

.character-stat-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px clamp(16px, 2.3vw, 38px);
  color: rgba(247, 249, 244, 0.96);
  font-size: clamp(0.95rem, 1.35vw, 1.45rem);
  line-height: 1.5;
}

.character-stat-row strong,
.skill-values dd strong {
  color: #ff8d8d;
}

.build-button {
  margin-top: 26px;
  padding: 10px 22px;
  border: 1px solid #ef9b2d;
  border-radius: 6px;
  color: #f4f4ed;
  background: transparent;
  font: inherit;
  font-size: clamp(0.95rem, 1.25vw, 1.25rem);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.build-button:hover {
  color: #163c3a;
  background: #ef9b2d;
}

.skill-card {
  min-width: 0;
}

.card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.card-heading h3 {
  margin: 0;
  color: rgba(247, 249, 244, 0.98);
  font-size: clamp(1.15rem, 1.8vw, 2rem);
  font-weight: 700;
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  color: #eff3ed;
  font-size: 1.1rem;
  font-weight: 700;
  border: 1px solid rgba(239, 243, 237, 0.5);
  border-radius: 50%;
}

.skill-copy {
  grid-template-columns: 1fr;
  gap: clamp(22px, 3vw, 54px);
}

.skill-description,
.skill-values,
.passive-card p,
.constellation-card p {
  font-size: clamp(0.80rem, 1.22vw, 1.25rem);
  line-height: 1.60;
}

.skill-description p,
.passive-card p,
.constellation-card p {
  margin: 0 0 12px;
}

.skill-description h4 {
  margin: 18px 0 4px;
  color: #f0c05b;
  font-size: clamp(1rem, 1.4vw, 1.45rem);
  font-weight: 700;
}

.skill-description .quote {
  margin-top: 28px;
  font-style: italic;
  color: rgba(247, 249, 244, 0.84);
  text-align: left;
}

.skill-values {
  min-width: 0;
  padding-left: clamp(16px, 2vw, 28px);
  border-left: 1px solid rgba(225, 245, 231, 0.18);
}

.level-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-size: clamp(1rem, 1.45vw, 1.45rem);
}

.level-control button {
  min-width: 38px;
  padding: 4px 8px;
  border: 1px solid rgba(247, 249, 244, 0.75);
  border-radius: 4px;
  color: rgba(247, 249, 244, 0.96);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.skill-values dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 18px;
  margin: 0;
}

.skill-values dt,
.skill-values dd {
  margin: 0;
}

.skill-values dd {
  text-align: right;
  white-space: nowrap;
}

.character-passive-grid,
.constellation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.6vw, 28px);
}

.passive-card-centered {
  grid-column: 3;
}

.constellation-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.passive-card .card-heading,
.constellation-card .card-heading {
  margin-bottom: 14px;
}

@media (max-width: 1050px) {
  .skill-copy {
    grid-template-columns: 1fr;
  }

  .skill-values {
    padding-top: 18px;
    padding-left: 0;
    border-top: 1px solid rgba(225, 245, 231, 0.18);
    border-left: 0;
  }
}

@media (max-width: 760px) {

  .character-passive-grid,
  .constellation-grid {
    grid-template-columns: 1fr;
  }

  .passive-card-centered {
    grid-column: auto;
  }

  .character-stat-row {
    justify-content: flex-start;
  }
}

.character-section h3,
.character-section p,
.character-section button {
  animation: none;
  opacity: 1;
  transform: none;
}


@keyframes characterWaterFlow {
  0% {
    background-position: 0 0, 0 0;
  }

  100% {
    background-position: 140px -80px, -180px 100px;
  }
}


@media (prefers-reduced-motion: reduce) {
  .character-section {
    animation: none;
  }
}


.editor-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  padding: 10px 16px;
  border: 1px solid rgba(238, 193, 88, 0.9);
  border-radius: 999px;
  color: #f9f8ed;
  background: rgba(8, 47, 46, 0.88);
  font: 700 14px/1.2 'GCG', 'Microsoft YaHei', sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 22, 25, 0.3);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.editor-toggle:hover {
  background: #e5a93b;
  color: #163c3a;
  transform: translateY(-2px);
}

.editor-panel {
  position: fixed;
  top: 78px;
  right: 22px;
  z-index: 39;
  width: min(340px, calc(100vw - 44px));
  box-sizing: border-box;
  padding: 18px;
  border: 1px solid rgba(238, 193, 88, 0.65);
  border-radius: 16px;
  color: #f4f4ed;
  background: rgba(7, 40, 42, 0.96);
  font-family: 'GCG', 'Microsoft YaHei', sans-serif;
  box-shadow: 0 18px 44px rgba(0, 15, 19, 0.42);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(calc(100% + 28px));
  transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s ease;
}

.editor-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.editor-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.editor-panel-heading h2 {
  margin: 0;
  color: #f3c45c;
  font-size: 1.35rem;
}

.editor-close {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  color: #fff;
  background: transparent;
  font: 1.25rem/1 'GCG', sans-serif;
  cursor: pointer;
}

.editor-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: rgba(244, 244, 237, 0.86);
  font-size: 0.92rem;
}

.editor-field input,
.editor-field textarea,
.editor-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid rgba(226, 243, 225, 0.28);
  border-radius: 8px;
  color: #eef4e9;
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  resize: vertical;
}

.editor-field input:focus,
.editor-field textarea:focus,
.editor-field select:focus {
  border-color: #e8b84f;
  outline: 2px solid rgba(232, 184, 79, 0.24);
}

.editor-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.editor-actions button,
.editor-file-button {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(232, 184, 79, 0.72);
  border-radius: 8px;
  color: #f8f5e9;
  background: rgba(232, 184, 79, 0.08);
  font: inherit;
  font-size: 0.86rem;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.editor-actions button:hover,
.editor-file-button:hover,
.editor-actions button.saved {
  color: #173c3a;
  background: #e8b84f;
}

.editor-file-button input {
  display: none;
}

.editor-hint {
  margin: 14px 0 0;
  color: rgba(244, 244, 237, 0.62);
  font-size: 0.8rem;
  line-height: 1.55;
}

.custom-canvas {
  min-width: 0;
}

.home-custom-canvas {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.character-custom-canvas {
  display: grid;
  grid-column: 1 / -1;
  gap: clamp(14px, 1.6vw, 28px);
}

.custom-item {
  position: relative;
  min-width: 0;
  pointer-events: auto;
  touch-action: none;
  --drag-x: 0px;
  --drag-y: 0px;
}

.home-custom-canvas .custom-item {
  position: absolute;
  left: 50%;
  top: 62%;
  width: min(360px, 36vw);
  transform: translate(calc(-50% + var(--drag-x)), calc(-50% + var(--drag-y)));
}

.character-custom-canvas .custom-item {
  transform: translate(var(--drag-x), var(--drag-y));
}

.custom-card,
.custom-image-item {
  padding: 18px;
  border: 1px solid rgba(232, 184, 79, 0.55);
  border-radius: 14px;
  color: #f4f4ed;
  background: rgba(9, 51, 50, 0.94);
  box-shadow: 0 12px 28px rgba(0, 20, 23, 0.28);
}

.custom-card h3,
.custom-card p,
.custom-image-item figcaption {
  margin: 0 0 10px;
  font-family: 'GCG', 'Microsoft YaHei', sans-serif;
}

.custom-card h3 {
  color: #f3c45c;
  font-size: 1.25rem;
}

.custom-card p,
.custom-image-item figcaption {
  font-size: 0.98rem;
  line-height: 1.65;
}

.custom-image-item {
  margin: 0;
  padding: 10px;
}

.custom-image-item img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 9px;
  pointer-events: none;
}

.custom-image-item figcaption {
  margin: 9px 4px 0;
  color: rgba(244, 244, 237, 0.76);
}

.custom-delete {
  display: none;
  position: absolute;
  top: 7px;
  right: 7px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  color: #fff;
  background: rgba(111, 24, 24, 0.86);
  font: 1.1rem/1 'GCG', sans-serif;
  cursor: pointer;
}

.editor-mode .custom-delete {
  display: grid;
  place-items: center;
}

.editor-mode [data-editor-editable="true"] {
  min-height: 1em;
  outline: 1px dashed rgba(232, 184, 79, 0.55);
  outline-offset: 3px;
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

.editor-mode .custom-item {
  outline: 1px dashed rgba(232, 184, 79, 0.5);
  cursor: grab;
}

.editor-mode .custom-item.is-dragging {
  cursor: grabbing;
  z-index: 8;
}

.editor-panel button,
.editor-toggle,
.custom-delete {
  animation: none;
  opacity: 1;
}

.editor-panel,
.editor-panel * {
  user-select: text;
  -webkit-user-select: text;
}

@media (max-width: 640px) {
  .editor-toggle {
    right: 12px;
    bottom: 12px;
  }

  .editor-panel {
    top: 70px;
    right: 12px;
    width: calc(100vw - 24px);
  }

  .home-custom-canvas .custom-item {
    width: min(320px, 70vw);
  }
}

.character-section,
.character-section * {
  font-family: 'GCG', 'Microsoft YaHei', sans-serif;
  font-synthesis: none;
}

nav a,
nav a:visited,
nav a:hover,
nav a:focus-visible {
  text-decoration: none;
}

.title {
  transition: opacity 0.55s ease, transform 0.65s cubic-bezier(0.2, 0.75, 0.25, 1);
  will-change: opacity, transform;
}

.title.is-hidden {
  transform: translate(50%, -58%) scale(0.94);
}

.home-custom-canvas {
  transition: opacity 0.5s ease, transform 0.65s cubic-bezier(0.2, 0.75, 0.25, 1);
  will-change: opacity, transform;
}

body.character-view .home-custom-canvas {
  opacity: 0;
  transform: translateY(-3vh) scale(0.98);
  pointer-events: none;
}

.character-section {
  transform: translateY(6vh) scale(0.985);
  transition: opacity 0.55s ease, visibility 0.55s ease, transform 0.65s cubic-bezier(0.2, 0.75, 0.25, 1);
  will-change: opacity, transform;
}

.character-section.is-visible {
  transform: translateY(0) scale(1);
}

.character-scroll {
  padding-right: clamp(10px, 1.5vw, 32px);
  padding-left: clamp(10px, 1.5vw, 32px);
}

.character-content {
  width: 100%;
  max-width: 1800px;
  gap: clamp(24px, 2vw, 34px);
}

.character-card {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 14px 15px;
  border: 0;
  border-radius: 10px;
  background: rgba(39, 54, 62, 0.70);
  color: #eeeeee;
  box-shadow: 0 8px 18px rgba(2, 25, 27, 0.16);
}

.character-profile,
.skill-card,
.passive-card,
.constellation-card {
  margin: 0;
}

.character-profile-heading {
  gap: 10px;
  margin-bottom: 8px;
}

.character-profile-heading h2 {
  color: #eeeeee;
  font-size: 21px;
  line-height: 1.55;
  letter-spacing: 0.03em;
}

.character-profile-heading select {
  min-width: 108px;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 15px;
}

.character-stat-rows {
  gap: 4px;
  width: 100%;
}

.character-stat-row {
  justify-content: center;
  gap: 4px 14px;
  padding: 2px 4px;
  color: #eeeeee;
  font-size: clamp(15px, 1.05vw, 24px);
  line-height: 1.9;
  letter-spacing: 0.08em;
}

.character-stat-row > span {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.stat-icon {
  display: block;
  width: 1.05em;
  height: 1.05em;
  flex: 0 0 1.05em;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.character-stat-row strong {
  color: #f29e38;
}

.build-button {
  margin-top: 8px;
  padding: 6px 14px;
  border: 0;
  border-radius: 5px;
  color: #27363e;
  background: #ffffff;
  font-size: 15px;
}

.build-button:hover {
  color: #27363e;
  background: #f1f1f1;
}

.burst-card {
  grid-column: 1 / -1;
}

.character-skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(18px, 1.5vw, 28px);
  row-gap: clamp(22px, 1.8vw, 30px);
  align-items: stretch;
}

.character-passive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(18px, 1.5vw, 28px);
  row-gap: clamp(22px, 1.8vw, 30px);
  align-items: stretch;
}

.constellation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(18px, 1.5vw, 28px);
  row-gap: clamp(22px, 1.8vw, 30px);
  align-items: stretch;
}

.card-heading {
  gap: 8px;
  margin: 0 0 7px;
}

.card-heading h3 {
  font-size: clamp(17px, 1.2vw, 26px);
  line-height: 1.55;
  letter-spacing: 0.03em;
}

.card-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 5px;
  object-fit: contain;
  overflow: hidden;
}

.card-icon[src] {
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.character-section p,
.character-section li,
.skill-description,
.skill-values,
.passive-card,
.constellation-card,
.passive-card p,
.constellation-card p {
  width: auto;
  color: inherit;
  text-align: left;
  text-shadow: none;
  font-size: clamp(15px, 1.05vw, 24px);
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.08em;
}

.character-section p {
  margin: 0 0 8px;
}

.keyword-gold,
.keyword-red {
  font-weight: 600;
}

.keyword-gold {
  color: #f0c05b;
}

.keyword-red {
  color: #ff8d8d;
}

.skill-description h4 {
  margin: 8px 0 2px;
  color: #f0c05b;
  font-size: clamp(17px, 1.12vw, 25px);
  line-height: 1.55;
  letter-spacing: 0.04em;
}

.skill-description .quote {
  margin-top: 10px;
  color: rgba(238, 238, 238, 0.78);
  letter-spacing: 0.06em;
}

.passive-card .card-heading,
.constellation-card .card-heading {
  margin-bottom: 7px;
}

@media (max-width: 1050px) {
  .character-content {
    column-gap: 18px;
    row-gap: 22px;
  }

  .character-skill-grid,
  .character-passive-grid,
  .constellation-grid {
    column-gap: 18px;
    row-gap: 22px;
  }
}

@media (max-width: 760px) {
  .character-scroll {
    padding-right: 8px;
    padding-left: 8px;
  }

  .character-card {
    padding: 13px 14px;
  }

  .character-stat-row {
    justify-content: flex-start;
  }

  .character-skill-grid,
  .character-passive-grid,
  .constellation-grid {
    grid-template-columns: 1fr;
    row-gap: 20px;
  }
}

/* Integrated gallery view */
header { z-index: 50; }
.gallery-section {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: none;
  color: #203c39;
  pointer-events: none;
}
.gallery-section.is-visible { display: block; pointer-events: auto; animation: galleryEnter 0.45s ease both; }
.gallery-scroll { height: 100%; overflow-y: auto; overflow-x: hidden; padding: 74px 20px 40px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.7) transparent; }
.gallery-toolbar { max-width: 1440px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gallery-filter-bar { display: flex; gap: 6px; padding: 5px; border-radius: 50px; background: rgba(241,245,249,.72); backdrop-filter: blur(10px); }
.gallery-filter-btn, .gallery-stats { border: 0; border-radius: 40px; padding: 8px 18px; font: inherit; font-size: 13px; cursor: pointer; }
.gallery-filter-btn { background: transparent; color: #31504b; }
.gallery-filter-btn.active { background: rgba(255,255,255,.94); color: #16423c; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.gallery-stats { background: rgba(238,242,255,.82); color: #28507b; white-space: nowrap; }
.gallery-wrapper { max-width: 1440px; margin: 0 auto; padding-bottom: 60px; }
.gallery-info-card { margin-bottom: 22px; padding: 18px 24px; border: 1px solid rgba(255,255,255,.45); border-radius: 22px; background: rgba(255,255,255,.72); backdrop-filter: blur(12px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.gallery-info-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gallery-info-title h2 { font-size: clamp(20px, 2vw, 30px); font-weight: 600; }
.gallery-info-title span, .gallery-info-desc { font-size: 13px; color: #52706b; }
.gallery-info-desc { margin-top: 8px; }
.gallery-waterfall-columns { display: flex; align-items: flex-start; gap: 20px; }
.gallery-waterfall-column { flex: 1; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.gallery-card { overflow: hidden; border-radius: 18px; background: rgba(255,255,255,.78); box-shadow: 0 8px 24px rgba(0,0,0,.12); cursor: pointer; transition: transform .25s ease, box-shadow .25s ease; }
.gallery-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,.2); }
.gallery-img-container { min-height: 120px; position: relative; background: rgba(255,255,255,.35); }
.gallery-img-container img { display: block; width: 100%; height: auto; min-height: 120px; object-fit: cover; transition: transform .35s ease, opacity .25s ease; }
.gallery-card:hover img { transform: scale(1.025); }
.gallery-skeleton { background: linear-gradient(110deg, rgba(255,255,255,.28) 30%, rgba(255,255,255,.65) 45%, rgba(255,255,255,.28) 60%); background-size: 200% 100%; animation: galleryShimmer 1.4s linear infinite; }
.gallery-image-error::after { content: '图片加载失败'; position: absolute; inset: 0; display: grid; place-items: center; color: #64748b; font-size: 13px; }
.gallery-load-trigger, .gallery-end-message { display: flex; justify-content: center; padding: 28px 0 12px; color: rgba(255,255,255,.9); font-size: 14px; }
.gallery-loader-box { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 40px; background: rgba(0,0,0,.18); backdrop-filter: blur(8px); }
.gallery-spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4); border-top-color: white; border-radius: 50%; animation: gallerySpin .8s linear infinite; }
.gallery-back-top { position: fixed; right: 28px; bottom: 28px; z-index: 60; padding: 10px 18px; border: 0; border-radius: 40px; background: rgba(255,255,255,.88); color: #16423c; box-shadow: 0 4px 14px rgba(0,0,0,.18); cursor: pointer; }
.gallery-preview-modal { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; padding: 40px; background: rgba(10,24,26,.76); backdrop-filter: blur(10px); }
.gallery-preview-modal.is-open { display: grid; }
.gallery-preview-box { position: relative; max-width: min(92vw, 1100px); max-height: 92vh; padding: 18px; border-radius: 20px; background: rgba(255,255,255,.94); box-shadow: 0 20px 70px rgba(0,0,0,.35); }
.gallery-preview-box img { display: block; max-width: 86vw; max-height: 76vh; margin: auto; object-fit: contain; }
.gallery-close-preview { position: absolute; top: -16px; right: -16px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #16423c; color: white; cursor: pointer; }
.gallery-preview-actions { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.gallery-preview-btn { padding: 8px 16px; border: 0; border-radius: 20px; background: #16423c; color: white; cursor: pointer; }
.gallery-preview-caption { margin-top: 8px; color: #54716c; font-size: 12px; text-align: center; overflow-wrap: anywhere; }
.gallery-load-error { padding: 60px 20px; color: white; text-align: center; }
body.gallery-view .title, body.gallery-view .home-custom-canvas, body.gallery-view .editor-toggle, body.gallery-view .editor-panel { visibility: hidden; pointer-events: none; }
@keyframes galleryEnter { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes galleryShimmer { to { background-position: -200% 0; } }
@keyframes gallerySpin { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .gallery-scroll { padding: 68px 10px 24px; }
  .gallery-toolbar, .gallery-info-title { align-items: flex-start; flex-direction: column; }
  .gallery-filter-bar { width: 100%; justify-content: space-between; }
  .gallery-filter-btn { padding: 7px 10px; }
  .gallery-waterfall-columns { gap: 10px; }
  .gallery-waterfall-column { gap: 10px; }
}

/* ==========================================================================
   响应式布局：统一桌面 / 平板 / 手机（追加在最后，优先级高于上面的历史样式）
   ========================================================================== */

/* 1. 任何宽度都不出现横向滚动 */
html {
  overflow: hidden;
}

body {
  max-width: 100%;
  overflow: hidden;
}

/* 2. 顶部导航：随宽度收缩，5 个入口始终完整可见 */
nav {
  max-width: 100%;
  box-sizing: border-box;
  gap: 10px;
}

nav a {
  box-sizing: border-box;
}

@media (max-width: 900px) {
  nav {
    gap: 4px;
    padding: 8px 10px;
    height: auto;
  }

  nav a {
    width: auto;
    padding: 10px 14px;
    font-size: 15px;
    letter-spacing: 1px;
  }
}

@media (max-width: 600px) {
  nav {
    gap: 2px;
    padding: 6px 8px;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
  }

  nav a {
    padding: 9px 9px;
    font-size: 13px;
    letter-spacing: 0;
    border-radius: 12px;
  }
}

@media (max-width: 380px) {
  nav a {
    padding: 8px 7px;
    font-size: 12px;
  }
}

/* 3. 首页大标题随视口缩放，不再撑破屏幕 */
.title {
  width: 100%;
  max-width: 100vw;
  padding: 0 10px;
  box-sizing: border-box;
}

.title h1 {
  font-size: clamp(2.4rem, 15vw, 13.5rem);
  letter-spacing: clamp(2px, 2vw, 50px);
  line-height: 1.02;
  margin: -0.06em 0;
}

.title h3 {
  font-size: clamp(0.95rem, 2.6vw, 1.5rem);
  letter-spacing: clamp(4px, 1.4vw, 15px);
}

/* 4. 窄屏让水面背景铺满，去掉左右内缩留白 */
@media (max-width: 768px) {
  .water-background {
    transform: none;
  }
}

/* 5. 角色页窄屏排版 */
@media (max-width: 600px) {
  .character-scroll {
    padding: 62px 10px 28px;
  }

  .character-card {
    padding: 12px;
  }

  .character-profile-heading {
    flex-wrap: wrap;
    gap: 8px;
  }

  .character-profile-heading h2 {
    font-size: 18px;
  }

  .character-profile-heading select {
    min-width: 96px;
    font-size: 14px;
  }

  .character-stat-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 10px;
    font-size: 14px;
  }

  .character-stat-row > span,
  .character-section p,
  .character-section li {
    font-size: 14px;
    line-height: 1.75;
  }

  .build-button {
    width: 100%;
    padding: 10px 0;
  }
}

/* 6. 窄屏的触控与工具栏 */
@media (max-width: 768px) {
  .editor-toggle {
    padding: 9px 16px;
    font-size: 14px;
  }

  .gallery-back-top {
    right: 14px;
    bottom: 14px;
    padding: 10px 16px;
  }
}

@media (max-width: 560px) {
  .gallery-toolbar {
    gap: 10px;
  }

  .gallery-info-card {
    padding: 14px 16px;
  }

  .gallery-preview-box {
    padding: 12px;
  }

  .gallery-preview-box img {
    max-width: 88vw;
  }
}

/* 7. 去掉移动端点击时的默认蓝色高亮块
   （Android Chrome / iOS Safari 的 -webkit-tap-highlight-color，默认约 rgba(51,181,229,.4)） */html,
body {
  -webkit-tap-highlight-color: transparent;
}

a,
button,
input,
select,
textarea,
label,
summary,
[role="button"] {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* 关掉高亮后，键盘操作（Tab）仍保留清晰的焦点提示 */
:focus-visible {
  outline: 2px solid rgba(232, 184, 79, 0.9);
  outline-offset: 2px;
}

/* 8. 背景取景：保证人物完整
   - 竖屏 / 窄屏：cover 会横向裁切，把取景窗右移到 38%~68%（人物约在图片水平 25%~57% 处）
   - 横屏 / 宽屏：cover 会纵向裁切（人物的帽子与脚会被切掉），改用 contain 显示整张图 */
@media (max-aspect-ratio: 4/3) {
  .water-background {
    object-position: 40% center;
  }
}

@media (min-aspect-ratio: 4/3) {
  .water-background {
    object-fit: contain;
    object-position: center;
  }
}

/* 9. 背景固定：手机上 body 的 100vh 比可见区域高（地址栏），整页可被拖动时会连背景一起带走。
   把整页滚动禁掉，并让背景用 fixed 定位，滑动任何区域背景都纹丝不动。 */
body {
  height: 100vh;
  height: 100dvh;
  overscroll-behavior: none;
}

.water-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}
