@font-face {
  font-family: 'LanaPixel';
  src: url('fonts/lanapixel_bitmaponly/LanaPixel_BitmapOnly.ttf') format('truetype');
}

body {
      margin: 0;
      padding: 0;
      height:100%;
      font-family: 'Helvetica Neue', sans-serif;
      background:white;
      color: #333;
      display: block;
      overflow-y:scroll;
      overflow-x: hidden;
      width: 100%;
      scroll-snap-type: y mandatory;
      scrollbar-width: none; 
    }

    body::-webkit-scrollbar { width: 0; height: 0; } 
.scroll-down{
  position: absolute; 
  left: 50%; bottom: 30px; 
  transform: translateX(-50%);

  display: inline-flex; 
  flex-direction: column;
  align-items: center; 
  gap: 1px;
  
  padding: 10px 14px;
  border: 0.5px solid rgba(0,0,0,.35);
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(4px) saturate(110%);
  cursor: pointer;
  z-index: 3;
  font-family: "Codystar", sans-serif;
  font-size: 14px;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.scroll-down:hover{
  transform: translateX(-50%) translateY(-2px);
  background: rgba(255,255,255,.85);
  border-color: rgba(0,0,0,.55);
}
.scroll-icon{
  width: 28px;
  height: 28px;
  display: block;
  animation: sd-bounce 1.2s infinite ease-in-out;
}

@keyframes sd-bounce {
  0%, 100% { transform: translateY(0); opacity: .9; }
  50% { transform: translateY(3px); opacity: 1; }
}

    aside {
    position: sticky;
    width: 120px;
    background: #ffffff;
    border-right: 0.5px solid #ebebeb;
    padding: 0.5rem;
    box-sizing: border-box;
    display: flex;
    flex: 0 0 120px;  
    flex-direction: column;
    align-items: center;
    z-index: 130;
    gap: 0.5rem;
    overflow: hidden;
    height:calc(100vh - 30px); 
    }

    .avatar {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      object-fit: cover;
      cursor: pointer;
      border: 1px solid #ccc;
      transition: border 0.3s ease;
      z-index: 50;
    }

    .avatar:hover {
      border-color: #ed766b;
    }

    .avatar.active{
      border-color:#ed766b;
    }

    .avatar-container {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 0.7rem;
      overflow: hidden;
      width: 100%;
      align-items: center;
    }

    .aside-scroll-btn {
      background: transparent;
      border: none;
      cursor: pointer;
      padding: 0.3rem;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: opacity 0.2s ease;
      flex-shrink: 0;
    }

    .aside-scroll-btn:hover {
      opacity: 0.7;
    }

    .aside-scroll-btn:disabled {
      opacity: 0.3;
      cursor: not-allowed;
    }

    .aside-scroll-btn img {
      width: 20px;
      height: 20px;
    }


    main {
      flex: 1;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }

      #main-visual-wrapper{
      height: 100vh;
      width: 100vw;
      margin: 0 auto;
      display: flex;
      overflow: hidden;
      text-align: center;
      justify-content: center;
      align-items: center;
      position: relative;
      overflow: hidden;
      background-color: #ffffff;
    }

    #main-visual-container{
      position: absolute;
      top:50%;
      left:50%;
      transform: translate(-50%, -50%) scale(1.3);
      transform-origin: center center;
      z-index: 20;
      transition: transform 0.3s ease-in-out;
    }

    #main-visual{
        max-width: 100%;
        max-height: 100%;
        pointer-events: none;
        object-fit: contain;
        margin:0 auto;
        z-index: 20;
        transition:opacity 0.4s ease-in-out;
    }

    #main-visual.fullheight {
        height: 100vh;
        width: auto;
        object-fit: contain;
    }

    #main-visual.fade-out {
        opacity: 0;
    }

#main-visual.fade-in {
        opacity: 1;
    }

#background-image{
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  /* 背景图的写法（div） */
  background-color: #fff;            /* PNG 透明处的默认白底 */
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: cover;

  /* 过渡与可选的整体透明度 */
  opacity:1;                       /* 想一直很淡就留着；想正常亮度=1 */
  transition: opacity .45s ease, filter .45s ease, background-position .45s ease, background-size .45s ease;
}


   #info-wrapper{
     display: flex;
     position: fixed;
     top: 30px;
     left: 130px;
     flex-direction: column;
     line-height: 1.8;
     gap:0.5rem;
     z-index: 30;
   }

   #info{
     font-size: clamp(7px, 1vw, 28px);
     font-family:  "VT323", monospace;
   }

   #custom-info{
     display: flex;
     position: fixed;
     top: 30px;
     left: calc(130px + 12vw + 20px);
     flex-direction: column;
     line-height: 1.8;
     gap: 0.3rem;
     z-index: 30;
     max-width: 150px;
     padding: 0rem;
   }

   .custom-info-header{
     display: flex;
     align-items: center;
     gap: 0.3rem;
     margin-bottom: 0.3rem;
   }

   .custom-info-icon{
     width: 15px;
     height: 15px;
     opacity: 0.8;
   }

   .custom-info-label{
     font-size: 8px;
     font-family: 'DotGothic16', monospace;
     color: #999;
     text-transform: uppercase;
     letter-spacing: 0.5px;
   }

   .custom-info-title{
     font-size: clamp(7px, 0.9vw, 35px);
     font-family: 'DotGothic16', monospace;
     font-weight: bold;
     color: #333;
     text-align: left;
     line-height: 1.3;
   }

   .custom-info-description{
    font-size: clamp(5px, 0.9vw, 30px);
     font-family: 'DotGothic16', monospace;
     color: #666;
     text-align: left;
     line-height: 1.5;
   }


   .char-meta{
    display:flex;
    max-width: 30vw;
    position: fixed;
    bottom:5%;
    left:130px;
    flex-direction: column;
    gap:0.2rem;
    z-index:126;
   }

   #character-logo{
    position: relative;
    left: 10px;
    width: clamp(40px, 8vw, 120px);
    height: auto;
    margin-bottom: 0.1rem;
   }

   #character-description{
    font-size: clamp(1px,0.7vw,7px);
    letter-spacing: 1px;
    font-family: "ocr-b-std", monospace;
   }

   #character-name{
    font-size: clamp(15px,3vw,45px);
    font-family: "bc-vajgar", sans-serif;
   }

.wheel-cluster{
  position: fixed;
  left: 0;
  top: 30%;
  transform: translateY(50%);
  width: clamp(200px, 40vh, 300px);
  height: clamp(200px, 40vh, 300px);
  pointer-events: none;
  z-index: 125;
}
    #zoom-controls {
        position:absolute;
        display: flex;
        left: 60%;
        top:50%;
        transform:translateY(-50%) ;
        flex-direction: column;
        gap: 10px;
        padding: 0.5rem;
        pointer-events: auto;
        z-index: 125;
    }
    #zoom-controls button {
         font-size: 0.6rem;
         font-family:  "VT323", monospace;
         padding:4px 6px;;
         border: none;
         background: rgba(0, 0, 0, 0.2);
         cursor: pointer;
         transition: background 0.2s;
         border-radius: 0.5rem;
    }

    #zoom-controls button:hover {
        background: #dddddd;
    }

 
     .wheel-wrapper {
    position: absolute;
    inset: 0;
    left: 0px;
    overflow: hidden;
    pointer-events: none;
    z-index: 125;
    border-radius: 50%;
    box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3);
    }

    #wheel{
    width:100%;
    height: auto;
    transition:transform .3s ease;
    border-radius: 50%;
    }

.auxiliary{
  position: absolute;
  right: 1rem;
  top:2.5rem;
  background:transparent;
  object-fit:contain;

  display: inline-flex;
  flex-direction: column;
  flex-wrap: nowrap;              /* 单列纵向滚动 */
  max-height: 80vh;
  overflow: hidden;

  width:20vh;
  padding: 8px 0.3rem 12px;       /* 顶部留出 8px 呼吸区 */
  gap: 0.5rem;
  cursor: pointer;
  z-index: 120;
}

.auxiliary img{
  width:19vh; height:19vh;
  object-fit:cover;
  object-position: center 35%; 
  display:block;
  border:1px solid #ccc;
  border-top:1px solid #ccc;
  background-color: #ffffff;
  box-sizing:border-box;              /* ← 防止加粗顶边把内容顶走 */
  transition: transform .3s, border-color .2s, border-top-width .2s;
}

.auxiliary img:hover{
  transform: scale(1.02);
  box-shadow: 0 6px 6px -2px rgba(237,118,107,.9);
}

.auxiliary img.active{
  border-top-color:#ed766b;
  border-top-width:2px;          
}


   /* DEBUG：把按钮强制显示成大红圆，压到最上层 */
    #aux-prev, #aux-next{
    position: fixed;
    left: auto !important;          
    right: 25vh !important;
    width: 30px;
    height:30px;
    display: none;
    align-items: center;
    justify-content: center;
    background: #d5d5d5 ;     
    color: #fff;
    border-radius: 50% !;
    z-index: 50;      
    opacity: 1;
    visibility: visible !important;
    pointer-events: auto !important;
    cursor: pointer;
    transition:opacity .2s ease;
    }

#aux-prev{ top: 3rem !important; }
#aux-next{ top: 5rem !important; }

/* 防止任何 disabled 规则把它禁用 */
#aux-prev.disabled, #aux-next.disabled{
  opacity:.35;
  pointer-events:none;
}



.header-nav a {
  text-decoration: none;
  color: #111;
  transition: border-bottom 0.2s ease;
}

.header-nav a:hover {
  border-bottom: 0.5px solid #999;
}

#page-header{
    position: fixed;
    top: 0;
    left:0;
    width: 100%;
    background: linear-gradient(to bottom, rgba(255, 108, 108, 0.3), rgba(255, 255, 255, 0));
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter:blur(6px);
    text-align: center;
    padding: 0.3rem rem;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 135;
    pointer-events: none;
}

.header-content {
  display: flex;
  flex-wrap: wrap; 
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  align-items: center;
  position: relative;
}


#page-header.visible {
  opacity: 1;
  pointer-events: auto;
}

#logo-container {
  position: fixed;
  top:20px;
  left: 55%;
  width: 45vw;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  z-index: 1;
}

.stretch-text {
  font-family: "copperplate", serif;
  font-weight: 400;
  font-size: clamp(1px, 0.5vw, 15px);
  white-space: nowrap;
  display: inline-block;
  overflow: hidden;
  width: 45%;
  text-align: center;
  letter-spacing: normal;
}

.logo-img {
  width:clamp(2px, 2vw, 30px);
  height: auto;
}


.header-title {
  position: relative;
  display: flex;
  align-items: center;
  font-family: "Codystar", sans-serif;
  font-size: 1rem;
  color: #111;
}

.header-nav{
  display: flex;
  gap: 1.5rem;
}

.header-nav a{
  margin-left: 1rem;
  color: #111;
  font-family:  "Codystar", sans-serif;
  font-size: 1rem;
}

.tl-overlay{
  position: fixed; inset: 0; z-index: 130;
  background:rgba(236, 236, 236, 0.55);
  backdrop-filter: blur(2px) saturate(115%);
  opacity: 0; transition: opacity .22s ease-out;
}
.tl-overlay.is-open{ opacity: 1; }

.tl-dialog{
  font-family: "VT323", monospace;
  position: fixed; inset: 0; z-index: 131;
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease-out;
}
.tl-dialog.is-open{ opacity: 1; pointer-events: auto; }

.tl-dialog__panel{
  position: relative;
  display: flex; flex-direction: column;
  width: min(92vw, 750px); max-height: 75vh; overflow: visible;
  padding: 24px 22px; border-radius: 12px;
  background: rgba(236, 236, 236, 0.55); color: #090909;
  box-shadow:
    0 8px 12px -6px rgba(215,120,120,.35),
    0 24px 40px -18px rgba(215,120,120,.50);

  transform: translateY(8px); transition: transform .22s ease-out;
}
.tl-dialog.is-open .tl-dialog__panel{ transform: translateY(0); }

.tl-dialog__close{
  position: sticky; bottom: 0;right:0; margin-left: auto;
  font-size: 20px; border: none; background: transparent;
  color: #444444; cursor: pointer;
}
.tl-dialog__close:hover{ color: #fff; }
.tl-dialog__title{ margin: 4px 0 8px; font-size: 18px; }
.tl-dialog__content{ flex: 1 1 auto; min-height: 0; overflow: auto; }
/* 仅在 Disclaimer 弹窗中使用 DotGothic16 字体 */
#disclaimer-dialog .tl-dialog__content{ font-family: "DotGothic16", sans-serif; font-size: 12px;}
.tl-dialog__content p{ margin: 10px 0; line-height: 1.6; }

/* 仅让 Disclaimer 弹窗内容区滚动，尺寸与 About 保持一致 */
#disclaimer-dialog .tl-dialog__content{ overflow: auto; }
.tl-dialog__content p{ margin: 10px 0; line-height: 1.6; }

body.tl-no-scroll{ overflow: hidden; }

/* —— 邮件界面风格 —— */
.mail-header{
  display:flex; align-items:center; gap:12px;
  padding:10px 12px; margin:4px 0 6px;
  background: rgba(230, 230, 230, 0.55);
  border:0.25px solid rgba(86, 86, 86, 0.55);
  border-radius:10px;
}
.mail-avatar{
  width:40px; height:40px; border-radius:50%;
  background: linear-gradient(135deg, #2b2f3a, #1b1f27);
  display:grid; place-items:center; flex:0 0 auto; overflow:hidden;
  border:1px solid rgba(255,255,255,.55);
}
.mail-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.mail-avatar span{
  font-size:.9rem; font-weight:700; color:#ff9088; letter-spacing:.04em;
}
.mail-meta .muted{ opacity:.7; }
.mail-from{ font-size:.95rem; }

.mail-subject{
  margin:10px 0 8px;
  font-size:1.1rem; letter-spacing:.02em;
}

.mail-body p{ margin:10px 0; line-height:1.65; }
.mail-body .muted{ opacity:.7; }
.mail-divider{
  border:0; height:1px; margin:14px 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.92), transparent);
}

/* 联系方式 + 图标 */
.contact-list{ list-style:none; padding:0; margin:10px 0 0; display:grid; gap:8px; }
.contact-list li{ display:flex; align-items:center; gap:8px; }
.contact-list a{ color:#686868; text-decoration:none; border-bottom:1px dotted rgba(94, 94, 94, 0.92); }
.contact-list a:hover{ border-bottom-color: rgba(152, 55, 55, 0.6); }

.icon{
  width:18px; height:18px; flex:0 0 auto;
  fill: currentColor; color:#525252; opacity:.9;
  transform: translateY(1px);
}

/* 让邮件头与面板整体风格统一（可按站点色系改） */
.tl-dialog__panel{
  background: rgba(227, 227, 227, 0.92);
}


@media (prefers-reduced-motion: reduce){
  .tl-overlay, .tl-dialog, .tl-dialog__panel{ transition: none; }
}

/* Disclaimer 返回按钮与表格样式 */
.tl-dialog__back{ position:absolute; top:-12px; right:-12px; display:inline-flex; align-items:center; justify-content:center; gap:0; width:32px; height:32px; padding:0; border:1px solid #ccc; background:rgba(255,255,255,.98); border-radius:50%; box-shadow:0 2px 6px rgba(0,0,0,.15); cursor:pointer; z-index:2; }
.tl-dialog__back img{ width:18px; height:18px; }
.tl-dialog__back span{ display:none; }
.tl-dialog__back:hover{ background:#ed766b; color:#fff; border-color:#ed766b; }
.tl-table-wrap{ overflow: visible; max-height: none; margin-top:8px; }
.tl-table{ width:100%; border-collapse:collapse; font-family:"Noto Sans SC","VT323",monospace; font-size:14px; }
.tl-table th, .tl-table td{ border:1px solid #bbb; padding:6px 8px; text-align:left; }
.tl-table thead th{ background:rgba(230,230,230,.8); position:sticky; top:0; }

/* Disclaimer 打开按钮字体 */
#disclaimer-open{ font-family: "VT323", monospace; }

.button-wrapper{
display: flex;
position: fixed;
flex-direction: column;
right: 1rem;
bottom:1rem;
z-index: 35;
gap: 1rem;
  }

.button-wrapper div {
  background: transparent;
  padding: 0;
  margin: 0;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
}
 
#full-screen-button img {
  width: 1.8vw;
}

#music-control{ 
  position: relative; 
  display: inline-flex;
  align-items:center;
  gap:8px
}

#music-button{
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

#music-icon{
  width: 15px;
  height: auto;
  opacity:60%;
}

.music-title-wrap{
  display: inline-block;
  vertical-align: middle;
  max-width: 200px;    
  overflow: hidden;
  white-space: nowrap;
  visibility: hidden;   /* 暂停时隐藏，播放时用 JS 设为 visible */
}


.music-title{
  display: inline-block;
  will-change: transform;
  font-family: "VT323", monospace;
  font-size: 14px;          
  line-height: 1;
  white-space: nowrap;
  max-width: none;           
  overflow: visible;
  text-overflow: clip;
  opacity: 0.7;
}

#music-control{ position: relative; }

.music-title.is-scrolling{
  animation-name: tl-title-marquee;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  padding-left: 2rem;       /* 循环间隔，避免回弹突兀 */
}

@keyframes tl-title-marquee{
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-1 * var(--scroll-distance, 0px))); }
}

/* 可选：减少动效时不滚动 */
@media (prefers-reduced-motion: reduce){
  .music-title.is-scrolling{ animation: none; }
}

section{
  height: 100vh;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  scroll-snap-align: start;
}

#character-section{
  overflow: clip;
}

#hero-slider{
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;
}

#hero-slider .hero-slide {
  flex: 1;
  z-index: 2;
  background-size: cover;
  background-position: center;
  display:grid;
  justify-content:center;
  align-items:center;
  height: 100%;
  width: 100%;
}

#hero-slider .version-tag {
    top:25px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(1px, 0.7vw, 15px);
    font-family:  "VT323", monospace;
    color:rgb(0, 0, 0);

    width: 60vw;
    text-align: center;
    letter-spacing: 1.2em;
    text-transform: uppercase;
    opacity: 0.8;
    user-select: none;

    opacity: 0;                                   /* 初始透明 */
    animation: fadeInVersion 2s ease-out forwards;
}

@keyframes fadeInVersion {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#hero-slider h3{
  color:rgb(0, 0, 0);
  font-family: "Codystar", sans-serif;
  font-size: clamp(28px, 3vw, 64px);
  padding: .5rem 1rem;
  border-radius: .6rem;
}

.corner-orbs{
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.orb{
  position: absolute;
  width: 60px;
  height: 60px;
  animation: orb-spin 10s linear infinite;
}

.orb-tl{top:20px;left:20px;}
.orb-tr{top:20px;right:20px;animation-direction: reverse; }
.orb-bl{bottom:20px;left: 20px;}
.orb-br{bottom:20px;right:20px;}
@keyframes orb-spin {
  to { transform: rotate(360deg); }
}

#character-section{position: relative;}
.character-layout{
  display: flex;
  height: 100%;
}

/*section与section之间转场 */
#character-section .will-enter {
  opacity: 0;
  transform: translateY(100px);
  transition:
    opacity .6s ease,
    transform .6s ease;
  will-change: opacity, transform;
}

#character-section .will-enter.in {
  opacity: 1;
  transform: translateY(0);
}

.color-pulse{
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%,-40%); 

  width: 400px;
  height: 300px;

  background-color:white;
  animation: colorShift 4s linear infinite;
  z-index: 0;  
  pointer-events: none;

  clip-path: polygon(50% 0%,0% 100%,100% 100%);
}

@keyframes colorShift {
  0%   { background-color: #d4b1b2; }  
  25%  { background-color: #dfb4a2; } 
  50%  { background-color: #9dcdc1; } 
  75%  { background-color: #95c2c8; }  
  100% { background-color: #d4b1b2; }  
}

/* ===============================
   Character Gallery Section
   =============================== */

#character-gallery {
  height: 100vh;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  scroll-snap-align: start;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-container {
  width: 100%;
  max-width: 1400px;
  padding: 2rem;
  box-sizing: border-box;
}

.gallery-grid {
  display: grid;
  /* 固定两行，高度为卡片高度；列按需自动增加 */
  grid-template-rows: repeat(2, 200px);
  grid-auto-flow: column;          /* 按列填充：1行 -> 2行 -> 新列 */
  grid-auto-columns: 200px;        /* 每列卡片宽度 */
  gap: 1.5rem;
  max-width: 100%;
  padding: 1.5rem 0 1rem; /* 顶部留出空间给凸起标签 */
  min-height: 200px;
  scroll-behavior: smooth;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(173, 173, 173, 0.3) transparent;
}

.gallery-grid::-webkit-scrollbar {
  height: 8px;
}

.gallery-grid::-webkit-scrollbar-track {
  background: transparent;
}

.gallery-grid::-webkit-scrollbar-thumb {
  background: rgba(173, 173, 173, 0.3);
  border-radius: 4px;
}

.gallery-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(237, 107, 95, 0.5);
}


/* 角色卡片样式 */
.character-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 5px;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  backdrop-filter: blur(10px);
  border: 0.5px solid #cccccc;
  min-height: 200px;
  justify-content: flex-end;
  overflow: visible; /* 允许左上角标签页凸出显示 */
  position: relative;
}

/* 文件夹风格的左上角标签（显示 UID） */
.character-card .card-tab {
  position: absolute;
  top: -20px;            /* 向上凸起 */
  left: 7px;            /* 左侧内缩一点 */
  padding: 2px 8px;
  font-family: "VT323", monospace;
  font-size: 12px;
  line-height: 1.2;
  color: #333;
  background: rgba(255, 255, 255, 0.95);
  border: 0.5px solid #9aa0a6;             /* 标签边框 */
  border-bottom: none;                    /* 与卡片上边框衔接 */
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  z-index: 3;
  pointer-events: none;                   /* 不影响交互 */
}


.character-card:hover {
  transform: translateY(-8px) scale(1.02);
  background: rgba(255, 255, 255, 0.95);
}

.character-card-media {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 3px;
  overflow: hidden;
  z-index: 1;
}

.character-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  transition: transform 0.3s ease;
}

.character-card:hover .character-card-image {
  transform: scale(1.05);
}

.character-card-name {
  font-family: "bc-vajgar", sans-serif;
  font-size: clamp(12px, 1.8vw, 18px);
  color: white;
  text-align: center;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: 0.5px;
  word-wrap: break-word;
  hyphens: auto;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.2));
  padding: 1rem 0.5rem 0.5rem;
  z-index: 2;
  border-radius: 0 0 3px 3px;
}

/* Gallery进入动画 */
#character-gallery .will-enter {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity .6s ease,
    transform .6s ease;
  will-change: opacity, transform;
}

#character-gallery .will-enter.in {
  opacity: 1;
  transform: translateY(0);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .gallery-grid {
    /* 仍然固定两行，列宽 150px，横向滚动 */
    grid-template-rows: repeat(2, 150px);
    grid-auto-flow: column;
    grid-auto-columns: 150px;
    gap: 1rem;
    padding: 1rem 0; /* 小屏也留出适当顶部空间 */
  }
  
  .character-card {
    min-height: 150px;
  }
  
  .gallery-container {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    /* 仍然固定两行，列宽 120px，横向滚动 */
    grid-template-rows: repeat(2, 120px);
    grid-auto-flow: column;
    grid-auto-columns: 120px;
    gap: 0.8rem;
    padding: 0.8rem 0;
  }
  
  .character-card {
    min-height: 120px;
  }
  
  .gallery-container {
    padding: 0.5rem;
  }
}

/* ========== Character Profile System ========== */

/* 滚动容器 */
#character-scroll-container {
  height: 100vh;
  overflow-y: auto;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

/* Main Visual Section - 第一屏 */
#main-visual-section {
  height: 100vh;
  scroll-snap-align: start;
  position: relative;
}

/* Profile Section - 第二屏 */
#profile-section {
  height: 100vh;
  scroll-snap-align: start;
  background: #ffffff;
  padding: 2rem;
  padding-top: 5rem;
  overflow-y: auto;
  display: none; /* 默认隐藏，有profile数据时显示 */
}

/* View Profile 按钮 */
#view-profile-btn {
  margin-top: 0rem;
  display: flex;
  align-items: center;
  gap: 0.1rem;
  background: #ffffff;
  border: 0.3px solid #8b8b8b;
  padding: 0.1rem 0,1rem;
  cursor: pointer;
  font-family: "VT323", monospace;
  font-size: clamp(7px, 1vw, 28px);
  transition: all 0.3s ease;
}

#view-profile-btn:hover {
  background: #ed766b;
  color: white;
}

/* Return 按钮 */
#profile-return-btn {
  position: fixed;
  top: 5rem;
  left: 1rem;
  display: none; /* 默认隐藏 */
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ccc;
  padding: 0.5rem 1rem;
  cursor: pointer;
  z-index: 100;
  font-family: "VT323", monospace;
  transition: all 0.3s ease;
}

#profile-return-btn img {
  width: 20px;
  height: 20px;
}

#profile-return-btn:hover {
  background: #ed766b;
  color: white;
}

/* Profile Content */
#profile-content {
  max-width: 100%;
  margin: 0 auto;
  margin-left: 0;
  margin-right: 0;
  background: white;
  padding: 3rem;
  border-radius: 8px;
}

/* 响应式：小屏幕时调整 */
@media (max-width: 900px) {
  #profile-content {
    margin-left: 0;
    margin-right: 0;
    padding: 1.5rem;
  }
  
  .profile-section-1 {
    width: 80%;
  }
  
  .profile-section-2 {
    width: 80%;
  }
}

@media (max-width: 600px) {
  #profile-content {
    margin-left: 0;
    margin-right: 0;
    padding: 1rem;
  }
  
  .profile-section-1 {
    width: 90%;
    grid-template-columns: 1fr;
  }
  
  .profile-section-2 {
    width: 90%;
  }
  
  /* 小屏幕时grid改为单列 */
  #profile-info-grid {
    grid-template-columns: 1fr;
  }
  
  #profile-info-grid .label {
    text-align: left;
  }
}

/* Profile Info Grid */
#profile-info-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0.5rem 1rem;
  margin-bottom: 2rem;
  margin-right: 5rem;
  font-family: "VT323", monospace;
}

#profile-info-grid .label {
  font-weight: bold;
  text-align: right;
  color: #666;
}

#profile-info-grid .value {
  color: #333;
}

/* 包含汉字的 value 使用 DotGothic16 字体，label 保持 VT323 */
#profile-info-grid .module-row .value {
  font-family: "DotGothic16", "VT323", monospace;
}

/* Profile Story */
#profile-story {
  font-family: "Noto Sans SC", "VT323", monospace;
  line-height: 1.8;
  margin-right: 2rem;
  color: #333;
}

#profile-story h3 {
  margin-bottom: 1rem;
  color: #979797;
}

/* ===== Profile Section 1: 基本信息 ===== */
.profile-section-1 {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
  width: clamp(600px, 70vw, 800px);
  margin-left: 40px;
  margin-right: auto;
}

.profile-left-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-right-column {
  display: flex;
  flex-direction: column;
}

.profile-introduction {
  font-family: "Noto Sans SC", "VT323", monospace;
  line-height: 1.8;
  color: #333;
  font-size: 1rem;
  text-align: justify;
  width: 100%;
  word-wrap: break-word;
  transition: opacity 0.5s ease-in;
}

/* 打字机效果光标 */
.typewriter-cursor::after {
  content: '|';
  animation: blink 1s infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

#profile-return-btn-inline {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ccc;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-family: "VT323", monospace;
  transition: all 0.3s ease;
  position: fixed;
  top: 5rem;
  left: 1rem;
  z-index: 150;
}

#profile-return-btn-inline:hover {
  background: #ed766b;
  color: white;
}

#profile-return-btn-inline img {
  width: 20px;
  height: 20px;
}

.profile-avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  border: 0.5px solid #555;
}

.profile-basic-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  width: 100%;
  border: 0.5px solid #555;
  border-radius: 2px;
  padding: 0.5rem;
}

.info-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  border: 0.5px solid #555;
  border-top: none;
}

.info-row:first-child {
  border-top: 0.5px solid #555;
}

.info-cell {
  padding: 0.5rem;
}

.info-cell:first-child {
  border-right: 0.5px solid #555;
}

.info-cell:last-child {
  border-right: none;
}

.info-row .label {
  font-weight: bold;
  text-align: left;
  color: #666;
}

.info-row .value {
  color: #333;
}

/* Sex选项样式 */
.sex-option {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  margin-right: 0.5rem;
  font-size: 0.9em;
  transition: all 0.2s ease;
}

.sex-option.selected {
  background-color: #474747;
  color: white;
  border-radius: 3px;
  font-weight: bold;
}

.sex-option:not(.selected) {
  color: #999;
}

/* Sex备注样式 */
.sex-note {
  display: inline-block;
  font-size: 0.85em;
  color: #666;
  font-style: italic;
  margin-left: 0.3rem;
}

/* ===== Profile Divider ===== */
.profile-divider {
  border: none;
  border-top: 0.5px solid #000;
  margin: 0.5rem 0;
  width: 70vw;
  margin-left: 40px;
  margin-right:5px;
}

/* ===== Profile Section 2: 关联人物 ===== */
.profile-section-2 {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 80%;
  margin-left: 40px;
  margin-right: auto;
  margin-top: 0;
}

.profile-section-2 h3 {
  font-family: "Bungee Outline", sans-serif;
  font-weight: 400;
  font-style: normal;
  grid-column: 1 / -1;
  margin-bottom: 1rem;
  color: #8e8e8e;
  font-size: 1.8rem;
}

.associated-content {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap; /* 小屏幕时允许换行 */
}

.associated-content.is-link { cursor: pointer; }
.associated-content.is-link .assoc-name { text-decoration: underline; }

.associated-avatar {
  flex-shrink: 0;
}

.associated-avatar img {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  border: 0.5px solid #555;
}

.avatar-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  border: 0.5px solid #555;
  background-color: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #999;
  font-weight: bold;
}

.associated-info {
  flex: 1;
  min-width: 0; /* 允许flex item收缩 */
}

.assoc-name {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #333;
  word-wrap: break-word;
}

.assoc-desc {
  color: #666;
  line-height: 1.6;
  word-wrap: break-word;
}

/* ===== Profile Section 3: 故事内容 ===== */
.profile-section-3 {
  width: 80%;
  margin-left: 40px;
  margin-right: auto;
}

.profile-section-3 h3 {
  font-family: "Bungee Outline", sans-serif;
  font-weight: 400;
  font-style: normal;
  margin-bottom: 1rem;
  color: #929292;
  font-size: 1.8rem;
}

.profile-notification {
  background: #dcdcdc;
  border: 1px solid #c2c2c2;
  padding: 1.5rem;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
  border-radius: 8px;
  text-align: center;
}

.profile-notification strong {
  display: block;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

#confirm-spoiler-btn {
  background: #8f8f8f;
  color: white;
  border: none;
  padding: 0.5rem 1.5rem;
  cursor: pointer;
  font-family: "Noto Sans SC", "VT323", monospace;
  font-size: 1rem;
  border-radius: 4px;
  transition: background 0.3s ease;
}

#confirm-spoiler-btn:hover {
  background: #d65a4f;
}

.profile-story-content p {
  line-height: 1.8;
  color: #333;
}

/* ===== 响应式调整 ===== */
@media (max-width: 768px) {
  .profile-section-1 {
    flex-direction: column;
  }
  
  .profile-left {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }
  
  .profile-avatar {
    width: 100px;
    height: 100px;
  }
  
  .info-row {
    grid-template-columns: 1fr;
  }
  
  .info-row .label {
    text-align: left;
  }
  
  .associated-content {
    flex-direction: column;
  }
  
  .profile-section-2 {
    width: 90%;
    margin-left: 10px;
  }
  
  .profile-section-3 {
    width: 90%;
    margin-left: 10px;
  }
  
  .profile-divider {
    width: 90vw;
    margin-left: 10px;
  }
}

/* 隐藏原有的固定 return 按钮 */
#profile-return-btn {
  display: none !important;
}

/* ===== Copyright Section (as bar) ===== */
#copyright-section {
  height: auto;                 /* 覆盖全局 section 高度 */
  min-height: auto;
  max-height: none;
  display: block;
  background: #ffffff;
  position: relative;
  z-index: 1;
  border-top: 1px solid #ededed;
  border-bottom: 1px solid #ededed;
}

.copyright-container {
  width: min(92vw, 1100px);
  margin: 0 auto;
  padding: 10px 0;              /* 横条垂直间距 */
  box-sizing: border-box;
}

.cr-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cr-viewport {            /* 视口：仅显示当前 slide */
  flex: 1 1 auto;
  overflow: hidden;
}

.cr-track {               /* 轨道：横向排列 */
  display: flex;
  align-items: stretch;
  transition: transform .3s ease;
}

/* 让滑块中的文本链接可点击（覆盖父元素的 pointer 捕获影响） */
.cr-track .about-inline-link, .cr-track .about-xuanyu-link{ pointer-events: auto; }

.cr-slide {
  flex: 0 0 100%;
  padding: 8px 4px;
}

.cr-slide p {
  font-family: "Noto Sans SC", "VT323", monospace;
  line-height: 1.8;
  color: #333;
  font-size: clamp(13px, 1.2vw, 16px);
  margin: 0;
}

#copyright-title {
  font-family: "Codystar", sans-serif;
  font-size: clamp(12px, 1.2vw, 16px);
  color: #8e8e8e;
  margin: 0 0 4px;
}

/* 统一各语言版权标题样式 */
#copyright-section .cr-slide h2 {
  font-family: "Codystar", sans-serif;
  font-size: clamp(12px, 1.2vw, 16px);
}

.cr-nav {
  flex: 0 0 auto;
  background: rgba(255,255,255,.8);
  border: 1px solid #ccc;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.cr-nav:hover { background:#ed766b; border-color:#ed766b; }
.cr-nav img { width: 14px; height: 14px; display:block; }
.cr-prev img { transform: rotate(90deg); }
.cr-next img { transform: rotate(-90deg); }

.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

@media (max-width: 768px) {
  .copyright-container { width: 94vw; padding: 8px 0; }
  .cr-slide p { font-size: 13px; }
}

/* About 内联链接样式 */
.about-inline-link{
  text-decoration: underline;
  color: inherit;
  cursor: pointer;
}
.about-inline-link:hover{
  color: #ed766b;
}

/* Xuanyu 内联链接样式（与 about-inline-link 保持一致） */
.about-xuanyu-link{
  text-decoration: underline;
  color: inherit;
  cursor: pointer;
}
.about-xuanyu-link:hover{ color:#ed766b; }

/* Xuanyu 弹窗宽度微调 */
#xuanyu-dialog .tl-dialog__panel{ width: min(92vw, 650px); }

/* Xuanyu 弹窗提示块 */
#xuanyu-dialog .xuanyu-callout{
  margin: 6px 0 12px;
  padding: 10px 12px;
  background: rgba(236,236,236,.6);
  border: 1px solid #ccc;
  border-left: 3px solid #ed766b;
  border-radius: 8px;
}
#xuanyu-dialog .xuanyu-callout__badge{
  display: inline-block;
  font-weight: 600;
  margin-right: 6px;
}
#xuanyu-dialog .xuanyu-callout__text{ display: inline; }

/* 新中文字体工具类 */
.wdxl-lubrifont-sc-regular {
  font-family: "WDXL Lubrifont SC", sans-serif;
  font-weight: 400;
  font-style: normal;
}

/* 仅在 Xuanyu 弹窗标题与内容使用新中文字体 */
#xuanyu-dialog #xuanyu-name{
  font-family: "WDXL Lubrifont SC", "Noto Sans SC", sans-serif;
  font-size: 1.6rem;
}

/* Xuanyu 弹窗正文使用 Noto Sans SC */
#xuanyu-dialog .tl-dialog__content p{
  font-family: "Noto Sans SC", "VT323", monospace;
  font-size: 12px;
}