/* =====================================================
   別館 · 样式文件（完整重写版，无重复，已优化结构）
   ===================================================== */

/* =================================================================
   🟢 01. 引入字体
   ================================================================= */
   @font-face {
    font-family: 'HexinPixel';
    src: url('../fonts/hexin.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
  }
  @font-face {
    font-family: 'FusionPixel';
    src: url('../fonts/fusion.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
  }
  @font-face {
    font-family: 'QiuYeYuanTi';
    src: url('../fonts/QiuYeYuanTi-16.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
  }
  
  /* =================================================================
     🟢 02. 颜色变量（白天/黑夜主题）
     ================================================================= */
  :root {
    --bg: #ffffff;
    --fg: #333333;
    --heading: #1a1a1a;
    --muted: #8a8a8a;
    --line: rgba(0, 0, 0, .15);
    --soft: rgba(0, 0, 0, .05);
    --card-bg: #f1f1f1;
    --banner-bg: #3a3a3a;
    --banner-fg: #ffffff;
    --charbox-bg: #5a5a5a;
    --charbox-fg: #ffffff;
    --slot-bg: #c4c4c4;
    --btn-bg: #dcdcdc;
    --btn-fg: #333333;
    --btn-hover-bg: #b0b0b0;
    --btn-hover-fg: #ffffff;
    --msg-bg: #a5a5a5;
    --msg-hover: #c0c0c0;
    --msg-fg: #2c2c2c;
    --accent: #FF4081;
    color-scheme: light;
  }
  [data-theme="dark"] {
    --bg: #000000;
    --fg: #e3e3e3;
    --heading: #ffffff;
    --muted: #909090;
    --line: rgba(255, 255, 255, .18);
    --soft: rgba(255, 255, 255, .07);
    --card-bg: #151515;
    --banner-bg: #262626;
    --banner-fg: #ffffff;
    --charbox-bg: #3d3d3d;
    --charbox-fg: #f0f0f0;
    --slot-bg: #333333;
    --btn-bg: #2e2e2e;
    --btn-fg: #e6e6e6;
    --btn-hover-bg: #4d4d4d;
    --btn-hover-fg: #ffffff;
    --msg-bg: #383838;
    --msg-hover: #4a4a4a;
    --msg-fg: #eeeeee;
    color-scheme: dark;
  }
  
  /* =================================================================
     🟢 03. 基础全局设置
     ================================================================= */
  * { box-sizing: border-box; }
  body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--fg);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    transition: background .25s ease, color .25s ease;
  }
  ::selection { background: var(--heading); color: var(--bg); }
  a { color: inherit; text-decoration: none; }
  a:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
  button { font-family: inherit; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  
  .wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 24px; }
  main.wrap { padding-top: 10px; padding-bottom: 20px; animation: fadein .35s ease; }
  @keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  
  /* =================================================================
     🟢 04. 头部导航
     ================================================================= */
  .header-in { display: flex; align-items: center; gap: 24px; padding: 26px 0 10px; flex-wrap: wrap; }
  .logo-wrap { display: flex; align-items: flex-start; }
  .logo-link { display: block; }
  .logo-link:hover { text-decoration: none; }
  .logo-img-box { display: block; }
  .logo-img { display: block; height: 64px; width: auto; }
  .logo-area.bounce, .logo-wrap.bounce { animation: logo-drop .5s ease; }
  @keyframes logo-drop {
    0% { transform: translateY(0); } 30% { transform: translateY(6px); }
    55% { transform: translateY(-3px); } 75% { transform: translateY(2px); }
    100% { transform: translateY(0); }
  }
  @media (prefers-reduced-motion: reduce) { .logo-area.bounce, .logo-wrap.bounce { animation: none; } }
  
  .chip-btn { flex: 0 0 auto; background: none; border: none; padding: 0; margin: 8px 0 0 8px; cursor: pointer; line-height: 1; transition: transform .15s ease; }
  .chip-btn:hover { transform: rotate(-4deg) scale(1.08); }
  .chip-btn:active { transform: translateY(2px) scale(.96); }
  .chip-img { display: block; height: 22px; width: auto; }
  .chip-btn.chip-text { background: #333; color: #fff; font-size: 13px; font-weight: 700; padding: 2px 8px 2px 12px; border: 2px solid #ccc; letter-spacing: 5px; }
  .logo-text { font-size: 44px; font-weight: 900; letter-spacing: 2px; line-height: 1; }
  .logo-gap { display: inline-block; width: .32em; }
  
  .main-nav { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; }
  .nav-btn { display: inline-block; background: var(--btn-bg); color: var(--btn-fg); padding: 18px 30px; font-size: 20px; font-weight: 700; line-height: 1.35; text-align: center; border-radius: 4px; transition: all .2s ease; }
  .nav-btn:hover { background: var(--btn-hover-bg); color: var(--btn-hover-fg); text-decoration: none; }
  .nav-btn.active { background: var(--btn-hover-bg); color: var(--btn-hover-fg); }
  .nav-btn-img { padding: 0; background: none; position: relative; z-index: 30; height: 52px; width: 156px; }
  .nav-btn-stack { display: block; position: relative; width: 100%; height: 100%; }
  .nav-btn-stack img { position: absolute; top: 0; left: 0; width: 100%; height: 200%; pointer-events: none; }
  .nav-hover { opacity: 0; transition: opacity .18s ease; }
  .nav-btn-img:hover .nav-hover, .nav-btn-img:focus-visible .nav-hover { opacity: 1; }
  .nav-btn-img:hover { background: none; }
  .nav-btn-img.active { background: none; }
  .nav-btn-img:hover .nav-img { filter: brightness(.96); }
  .nav-badge { position: absolute; top: -7px; left: -7px; width: 22px; height: auto; pointer-events: none; z-index: 2; }
  
  /* =================================================================
     🟢 05. 通用文字排版
     ================================================================= */
  .kicker { font-size: 12px; letter-spacing: .34em; color: var(--muted); text-transform: uppercase; margin: 44px 0 6px; }
  .page-title { font-size: 32px; font-weight: 900; letter-spacing: .12em; margin: 2px 0 6px; color: var(--heading); }
  .page-sub { color: var(--muted); margin: 0 0 8px; }
  .en-sub { font-size: 13px; letter-spacing: .4em; text-transform: uppercase; color: var(--muted); margin: 0; }
  .char-bday { font-size: 12px; letter-spacing: .18em; color: var(--muted); margin: 12px 0 0; }   /* 角色介绍副标题的生日行（当天颜色由 JS 换成角色代表色） */
  .char-bday.is-today { font-weight: 700; }
  .muted { color: var(--muted); }
  .todo { border: 1px dashed var(--line); border-radius: 6px; padding: 10px 16px; display: inline-block; font-size: 14px; }
  .sec-kicker { font-size: 12px; letter-spacing: .34em; color: var(--muted); text-transform: uppercase; font-weight: 700; margin: 0 0 18px; }
  
  /* =================================================================
     🟢 06. 首页专属布局
     ================================================================= */
  .home-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 25px; margin-top: 24px; }
  .left-column { display: flex; flex-direction: column; gap: 25px; }
  
  .banner { position: relative; display: flex; flex-direction: column; justify-content: flex-start; gap: 6px; min-height: 240px; padding: 26px 32px; border-radius: 8px; background: var(--banner-bg); color: var(--banner-fg); overflow: hidden; transition: transform .2s, box-shadow .2s; }
  .banner:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .2); }
  .banner.has-image { justify-content: flex-end; }
  .banner-media { position: absolute; inset: 0; }
  .banner-media img { width: 100%; height: 100%; object-fit: cover; }
  .banner-media .ph { background: none; }
  .banner > :not(.banner-media) { position: relative; z-index: 1; }
  .banner-kicker { font-size: 13px; font-weight: 700; letter-spacing: .32em; opacity: .75; }
  .banner-title { font-size: 26px; font-weight: 900; letter-spacing: .04em; }
  .banner-hint { font-size: 14px; opacity: .85; margin-top: 8px; }
  
  .left-bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
  .characters-box { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 515px; padding: 24px 20px 24px 52px; border-radius: 8px; background: var(--charbox-bg); color: var(--charbox-fg); }
  .vertical-title { position: absolute; left: 18px; bottom: 22px; writing-mode: vertical-rl; font-size: 20px; font-weight: 700; letter-spacing: 6px; z-index: 1; }
  .box-paper { position: absolute; inset: 0; z-index: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
  .box-paper img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .characters-box.has-paper { background: transparent; }
  .characters-box.has-paper .vertical-title { display: none; }
  
  /* 头像圈 */
  .characters-box .avatar-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .char-sec .avatar-grid { display: grid; grid-template-columns: repeat(3, 170px); gap: 40px 30px; margin-top: 34px; }
  .avatar-item { display: flex; flex-direction: column; align-items: center; gap: 12px; text-decoration: none; }
  .avatar-item:hover { text-decoration: none; }
  .avatar-circle { position: relative; display: block; width: 100%; aspect-ratio: 1; margin: 0 auto; border-radius: 50%; background: var(--card-bg); overflow: hidden; transition: transform .2s; }
  .characters-box .avatar-circle { max-width: 118px; }
  .char-sec .avatar-circle { max-width: none; }

  /* 系列横幅（角色介绍页顶部）：缺图时占位提示白字显示 */
  .char-sec { margin-top: 26px; }
  .series-row { display: flex; align-items: center; gap: 24px; }
  .series-banner { position: relative; display: flex; align-items: center; flex: 1 1 auto; min-height: 110px; padding: 20px 28px; border-radius: 8px; background: var(--banner-bg); color: var(--banner-fg); overflow: hidden; transition: transform .2s, box-shadow .2s; }
  .series-banner:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .2); }
  .series-banner .banner-media { position: absolute; inset: 0; }
  .series-banner .banner-media img { width: 100%; height: 100%; object-fit: cover; }
  .banner-media .ph-title, .banner-media .ph-path { color: #fff; }
  .series-banner .series-label { position: relative; z-index: 1; font-size: 15px; font-weight: 700; letter-spacing: .3em; opacity: .55; }
  .side-label { font-size: 14px; font-weight: 700; color: var(--muted); white-space: nowrap; }
  a.avatar-circle:hover { transform: scale(1.06); text-decoration: none; }
  a.avatar-item:hover .avatar-circle { transform: scale(1.04); }
  .avatar-circle img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
  .avatar-circle .ph { min-height: 0; padding: 0; }
  .avatar-circle .ph-title { color: var(--fg); font-size: 30px; font-weight: 900; }
  .av-hover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; opacity: 0; transition: opacity .18s ease; pointer-events: none; }
  a.avatar-circle:hover .av-hover-img, .avatar-item:hover .av-hover-img { opacity: 1; }
  .av-name { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; line-height: 1.7; text-align: center; opacity: 0; transition: opacity .2s; }
  a.avatar-circle:hover .av-name { opacity: 1; }
  .avatar-name { font-weight: 900; font-size: 17px; letter-spacing: .1em; color: var(--heading); }
  .avatar-en { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
  
  /* 留言框与拍手 */
  .interaction-area { display: flex; flex-direction: column; }
  .message-box { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 150px; padding: 18px 20px; border-radius: 8px; background: var(--msg-bg); color: var(--msg-fg); transition: background .3s; }
  .message-box .msg-title, .message-box .msg-body, .message-box .msg-go { position: relative; z-index: 1; }
  .message-box:hover { background: var(--msg-hover); text-decoration: none; }
  .msg-title { font-size: 20px; font-weight: 900; }
  .msg-body { font-size: 14px; line-height: 1.75; opacity: .88; }
  .msg-go { margin-top: auto; padding-top: 12px; font-size: 14px; font-weight: 900; }
  
  .webclap { background: none; border: none; padding: 8px 6px 4px; text-align: right; font-size: 17px; font-weight: 900; color: var(--fg); cursor: pointer; }
  .webclap.clap-img-btn:hover .clap-img { animation: clap-hands 0.5s ease-in-out infinite; }
  @keyframes clap-hands {
    0% { transform: rotate(0deg) translateY(0); }
    25% { transform: rotate(-12deg) translateY(-2px); }
    50% { transform: rotate(0deg) translateY(0); }
    75% { transform: rotate(12deg) translateY(-2px); }
    100% { transform: rotate(0deg) translateY(0); }
  }
  .webclap:hover { color: var(--accent); }
  .clap-img { display: block; height: 64px; width: auto; margin-left: auto; }
  .clap-count { font-size: 13px; font-weight: 700; color: var(--muted); margin-left: 6px; opacity: 0; transform: translateY(5px) scale(0.9); transition: opacity .3s ease, transform .3s ease; display: inline-block; font-family: 'HexinPixel', monospace; }
  .clap-count.show { opacity: 1; transform: translateY(0) scale(1); }
  
  .confetti { position: fixed; top: -24px; z-index: 9990; pointer-events: none; border-radius: 1px; animation: confetti-fall linear forwards; }
  @keyframes confetti-fall { 0% { transform: translate(0, 0) rotate(0deg); opacity: 1; } 100% { transform: translate(var(--dx, 0px), 108vh) rotate(var(--rot, 660deg)); opacity: .85; } }
  
  .right-column { display: flex; flex-direction: column; align-items: center; gap: 25px; padding-top: 20px; }
  .my-avatar { display: grid; place-items: center; width: 220px; height: 220px; border-radius: 50%; background: var(--banner-bg); overflow: hidden; transition: transform .3s; }
  .my-avatar:hover { transform: rotate(5deg) scale(1.02); }
  .my-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
  .my-avatar .ph { min-height: 0; }
  .my-avatar-text { writing-mode: vertical-rl; color: #fff; font-size: 22px; font-weight: 700; letter-spacing: 8px; }
  .profile-text { text-align: center; font-size: 16px; line-height: 1.9; font-weight: 700; }
  .profile-text p { margin: 5px 0; }
  .profile-more { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--muted); }
  .profile-more:hover { color: var(--fg); }
  
  /* =================================================================
     🟢 07. 角色页与漫画页布局
     ================================================================= */
  .grid-chars, .grid-comics { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 26px; }
  .char-card .visual, .comic-card .cover { border-radius: 8px; aspect-ratio: 1; overflow: hidden; background: var(--card-bg); transition: transform .2s, box-shadow .2s; }
  .comic-card .cover { aspect-ratio: 3 / 4; }
  .char-card:hover .visual, .comic-card:hover .cover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, .15); }
  .card-name { margin-top: 10px; font-weight: 700; font-size: 15px; letter-spacing: .08em; }
  .card-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
  .ph-media { width: 100%; height: 100%; }
  .card-media img, .cover-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
  
  .ph { width: 100%; height: 100%; min-height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px; text-align: center; color: var(--muted); }
  .ph, .ph * { color: inherit; }
  .ph-title { color: var(--fg); font-size: 16px; letter-spacing: .2em; font-weight: 700; }
  .ph-path { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 11px; line-height: 1.5; word-break: break-all; opacity: .75; }
  .ph-vertical { gap: 14px; }
  .ph-vertical .ph-title { writing-mode: vertical-rl; font-size: 24px; letter-spacing: .4em; }
  
  .char-stage { margin: 36px 0 8px; }
  /* 人物介绍图：同样不放底板 —— 设定图直接落在页面背景上，不要那层灰底影响观感 */
  .char-art { margin: 0 auto; max-width: 780px; }
  .art-media img { max-width: 100%; max-height: 80vh; width: auto; height: auto; margin: 0 auto; display: block; }
  .char-art .ph { min-height: 56vh; }
  .stage-hint { text-align: center; color: var(--muted); font-size: 13px; margin: 14px 0 0; }
  .char-info { margin-top: 56px; }
  .profile-table { margin: 0; }
  .p-row { display: flex; gap: 18px; padding: 8px 2px; border-bottom: 1px dashed var(--line); }
  .p-row dt { min-width: 90px; color: var(--muted); font-size: 14px; }
  .p-row dd { margin: 0; font-size: 15px; }
  .tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
  .tag-chip { border: 1px solid var(--line); border-radius: 999px; padding: 2px 14px; font-size: 13px; }
  .story p { margin: 0 0 1em; }
  .rel-list { display: flex; flex-direction: column; }
  .rel-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 2px; border-bottom: 1px dashed var(--line); }
  
  .comic-head { display: flex; gap: 40px; flex-wrap: wrap; }
  .cover-box { width: 240px; flex: 0 0 auto; }
  .cover-box .ph-media { aspect-ratio: 3 / 4; border-radius: 8px; background: var(--card-bg); }
  .comic-head .info { flex: 1 1 300px; min-width: 260px; }
  .comic-head .info .kicker { margin-top: 0; }
  .status-line { margin: 4px 0 10px; }
  .status-pill { display: inline-block; background: var(--heading); color: var(--bg); border-radius: 4px; padding: 3px 14px; font-size: 13px; letter-spacing: .2em; font-weight: 700; }
  .summary { max-width: 560px; }
  .cast { font-size: 14px; color: var(--muted); }
  .chapters-sec { margin-top: 56px; }
  .chapters { border-top: 1px solid var(--line); }
  .ch-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 10px; border-bottom: 1px solid var(--line); border-radius: 6px; transition: background .15s; }
  .ch-row:hover { background: var(--soft); text-decoration: none; }
  .ch-name { letter-spacing: .06em; }
  .ch-meta { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
  
  .reader-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 34px 0 16px; font-size: 14px; }
  .back-link { color: var(--muted); }
  .back-link:hover { color: var(--fg); }
  .r-title { letter-spacing: .1em; font-weight: 700; }
  .r-count { color: var(--muted); font-variant-numeric: tabular-nums; }
  /* 阅读页：不放面板底色 —— 漫画直接落在页面背景上（浅色主题下原来那圈灰白面板会显得脏） */
  .page-frame { position: relative; min-height: 320px; display: flex; align-items: center; justify-content: center; }
  .page-holder { width: 100%; display: flex; justify-content: center; }
  .page-media { width: 100%; }
  .page-media img { max-width: 100%; max-height: 82vh; width: auto; height: auto; margin: 0 auto; display: block; }
  .page-media .ph { min-height: 62vh; }
  .zone { position: absolute; top: 0; bottom: 0; width: 30%; z-index: 2; cursor: pointer; }
  .zone-l { left: 0; }
  .zone-r { right: 0; }
  .pager { display: flex; justify-content: center; gap: 14px; margin: 22px 0 6px; }
  .btn { border: none; background: var(--btn-bg); color: var(--btn-fg); padding: 10px 26px; font-size: 15px; font-weight: 700; border-radius: 4px; cursor: pointer; transition: background .15s, color .15s; }
  .btn:hover:not([disabled]) { background: var(--btn-hover-bg); color: var(--btn-hover-fg); }
  .btn[disabled] { opacity: .35; cursor: default; }
  .btn.ghost { display: inline-block; background: none; border: 1px solid var(--line); color: var(--muted); }
  .btn.ghost:hover { border-color: var(--fg); color: var(--fg); background: none; }
  .btn.ghost.off { opacity: .35; }
  .ch-nav { display: flex; justify-content: center; gap: 14px; margin: 26px 0 10px; flex-wrap: wrap; }
  
  /* QA styles are defined at the end of this file. */

  /* =================================================================
     🟢 10. 关于页与页脚
     ================================================================= */
  .about-sec { margin-top: 48px; }
  .link-list { border-top: 1px solid var(--line); }
  .lk-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 10px; border-bottom: 1px solid var(--line); border-radius: 6px; }
  .lk-row:hover { background: var(--soft); text-decoration: none; }
  .lk-name { letter-spacing: .08em; font-weight: 700; }
  .lk-url { color: var(--muted); font-size: 13px; word-break: break-all; }
  /* 友情链接横幅：放在同一行里并排（每条最多 300px，多了自动换行） */
  .lk-banner-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; align-items: flex-start; }
  .lk-banner { position: relative; display: block; flex: 1 1 0; min-width: 0; max-width: 300px; border-radius: 2px; }
  .lk-banner img { display: block; width: 100%; height: auto; }
  .lk-banner::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); background: var(--heading); color: var(--bg); font-size: 12px; font-weight: 700; padding: 3px 12px; white-space: nowrap; opacity: 0; pointer-events: none; }
  .lk-banner:hover::after { opacity: 1; }
  
  #site-footer { margin-top: 0; }
  .footer-in { display: flex; align-items: center; justify-content: flex-start; gap: 12px; flex-wrap: wrap; padding: 0 0 26px; }
  .footer-banner { display: block; height: 46px; width: auto; max-width: 100%; }
  .footer-site-btn { position: relative; display: block; flex: 0 0 auto; text-decoration: none; transition: transform .15s ease; }
  .footer-site-btn:hover { text-decoration: none; transform: scale(1.04); }
  .footer-site-btn img { display: block; height: 46px; width: auto; }
  .footer-site-btn .fb-hover { position: absolute; inset: 0; opacity: 0; transition: opacity .18s ease; }
  .footer-site-btn:hover .fb-hover { opacity: 1; }
  .footer-text { text-align: center; }
  .footer-text .footer-link { color: var(--muted); }
  .footer-text .footer-link:hover { color: var(--fg); }
  .footer-link { color: var(--muted); }
  .footer-link:hover { color: var(--fg); }
  
  /* =================================================================
     🟢 11. 系列创作分类页
     ================================================================= */
  .series-grid { display: grid; grid-template-columns: 1fr 2.2fr; gap: 20px; margin-top: 24px; min-height: 750px; }
  .series-col-left { display: flex; flex-direction: column; height: 100%; }
  .series-col-right { display: grid; grid-template-rows: 1.2fr 1fr; gap: 20px; height: 100%; }
  .series-right-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; height: 100%; }
  .series-card { background: var(--card-bg); border-radius: 8px; text-decoration: none; color: var(--fg); box-sizing: border-box; height: 100%; width: 100%; display: flex; transition: all 0.2s ease; opacity: 0; transform: translateY(40px); animation: fadeInUp 0.6s ease-out forwards; }
  .series-card:hover { background-color: var(--btn-hover-bg); color: var(--btn-hover-fg); transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); text-decoration: none; }
  .series-card-title { font-family: 'FusionPixel', "Microsoft YaHei", monospace; font-weight: bold; line-height: 1.1; }
  
  .series-col-left .series-card { justify-content: flex-start; align-items: flex-start; padding: 15px; }
  .series-col-left .series-card-title { writing-mode: vertical-rl; font-size: 120px; letter-spacing: 2px; }
  .series-col-right > .series-card:first-child { justify-content: flex-start; align-items: flex-end; padding: 10px; }
  .series-col-right > .series-card:first-child .series-card-title { writing-mode: horizontal-tb; font-size: 60px; letter-spacing: 2px; }
  .series-right-bottom > .series-card:first-child { justify-content: flex-start; align-items: flex-start; padding: 5px; }
  .series-right-bottom > .series-card:first-child .series-card-title { writing-mode: vertical-rl; font-size: 30px; letter-spacing: 2px; }
  .series-right-bottom > .series-card:last-child { justify-content: flex-end; align-items: flex-end; padding: 5px; }
  .series-right-bottom > .series-card:last-child .series-card-title { writing-mode: horizontal-tb; font-size: 64px; letter-spacing: 6px; }
  
  @keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
  
  /* =================================================================
     🟢 12. 响应式（移动端适配）
     ================================================================= */
  @media (max-width: 800px) {
    .header-in { flex-direction: column; align-items: flex-start; gap: 18px; }
    .main-nav { margin-left: 0; width: 100%; }
    .nav-btn { flex: 1 1 auto; padding: 12px 14px; font-size: 16px; }
    .nav-btn-img { flex: 0 0 auto; height: 44px; width: 132px; }
    .logo-text { font-size: 36px; }
    .logo-img { height: 54px; }
    .chip-img { height: 19px; }
    .home-grid { grid-template-columns: 1fr; }
    .right-column { padding-top: 0; }
    .char-sec .avatar-grid { grid-template-columns: repeat(3, 1fr); gap: 28px 16px; }
    .char-sec .avatar-circle { max-width: none; }
    
    .series-grid { grid-template-columns: 1fr; min-height: auto; }
    .series-col-right { grid-template-rows: auto; }
    .series-right-bottom { grid-template-columns: 1fr; }
    .series-card { min-height: 220px; } 
    .series-col-left .series-card-title { font-size: 48px; }
    .series-col-right > .series-card:first-child .series-card-title { font-size: 40px; }
    .series-right-bottom > .series-card:first-child .series-card-title { font-size: 32px; }
    .series-right-bottom > .series-card:last-child .series-card-title { font-size: 54px; }
  }
  @media (max-width: 560px) {
    .interaction-area { min-height: 240px; }
    .page-title { font-size: 26px; }
    .banner { padding: 22px; }
    .banner-title { font-size: 21px; }
    .series-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  }

/* =================================================================
   SIX FACETS · QA 留言板新版布局
   只作用于 body[data-page="qa"]，不会改其它页面。
   ================================================================= */
body[data-page="qa"] {
  --qa-yellow:#F8D96A;
  --qa-green:#0fab68;
  --qa-pink:#FE5BBF;
  --qa-purple:#8769C9;
  --qa-blue:#3AB0FF;
  --qa-gray:#CFCFCF;
  --qa-ink:#3d3d3d;
  --qa-soft:#ededeb;
}
body[data-page="qa"] .qa-page-shell {
  width:min(1430px, calc(100% - 76px));
  max-width:none;
  margin:0 auto;
  padding:0 0 26px;
}
body[data-page="qa"] .qa-heading {
  display:grid;
  grid-template-columns:140px minmax(0,1fr);
  gap:24px;
  align-items:end;
  margin-top:54px;
}
body[data-page="qa"] .qa-kicker {
  margin:0 0 4px;
  font-size:13px;
  letter-spacing:.34em;
}
body[data-page="qa"] .qa-title {
  margin:0;
  font-size:30px;
  line-height:1.18;
  letter-spacing:.06em;
}
body[data-page="qa"] .qa-note-guide { min-width:0; max-width:1050px; position:relative; }
body[data-page="qa"] .qa-color-picker {
  height:28px;
  display:flex;
  align-items:center;
  gap:11px;
  padding-left:0;
  margin-bottom:7px;
}
body[data-page="qa"] .qa-color-dot {
  width:24px;
  height:24px;
  border-radius:50%;
  display:inline-block;
  background:var(--dot);
  border:3px solid transparent;
  cursor:pointer;
  transition:transform .16s ease, border-color .16s ease;
  flex:0 0 24px;
}
body[data-page="qa"] .qa-color-dot:hover { transform:scale(1.08); }
body[data-page="qa"] .qa-color-dot.active { border-color:#fff; box-shadow:0 0 0 2px var(--fg); transform:scale(1.06); }
body[data-page="qa"] .qa-color-help { color:var(--muted); font-size:15px; margin-left:2px; }
body[data-page="qa"] .qa-compose-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) 68px 62px;
  gap:14px;
  align-items:center;
  min-width:0;
}
body[data-page="qa"] .qa-form-wrapper {
  width:100%;
  min-width:0;
  height:58px;
  border:none;
  border-radius:30px;
  background:#e7e7e7;
  box-shadow:none;
  overflow:hidden;
  transition:background .18s ease, box-shadow .18s ease;
}
body[data-page="qa"] .qa-form-wrapper:focus-within {
  border:none;
  box-shadow:0 0 0 3px rgba(21,137,120,.10);
  background:#eaeaea;
}
body[data-page="qa"] .qa-form-input {
  display:block;
  width:100%;
  min-width:0;
  height:50px;
  min-height:50px;
  margin:0;
  padding:0 18px;
  border:none;
  outline:none;
  background:transparent;
  color:#555;
  font-size:15px;
  font-weight:700;
  line-height:50px;
  box-sizing:border-box;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:clip;
  appearance:none;
}
body[data-page="qa"] .qa-form-input::placeholder { color:#7b7b7b; opacity:1; }
body[data-page="qa"] .qa-form-submit {
  position:static;
  width:68px;
  height:68px;
  border:none;
  border-radius:50%;
  background:transparent;
  color:#2baed0;
  display:grid;
  place-items:center;
  padding:0;
  box-shadow:none;
  cursor:pointer;
  transition:transform .16s ease, color .16s ease;
}
body[data-page="qa"] .qa-form-submit:hover { opacity:1; transform:translateX(3px) scale(1.03); color:#1599bf; }
body[data-page="qa"] .qa-form-submit:disabled { opacity:.4; cursor:wait; }
body[data-page="qa"] .qa-profile-btn {
  width:62px;
  height:62px;
  border:0;
  border-radius:50%;
  background:#ededed;
  color:#444;
  font-size:37px;
  line-height:1;
  font-weight:300;
  cursor:pointer;
  transition:transform .16s ease, background .16s ease;
}
body[data-page="qa"] .qa-profile-btn:hover { transform:scale(1.05) rotate(2deg); background:#e5e5e5; }
body[data-page="qa"] .qa-profile-panel {
  position:absolute;
  right:0;
  top:112px;
  z-index:50;
  width:min(420px, calc(100vw - 32px));
  background:#fff;
  border:1px solid #ddd;
  border-radius:18px;
  box-shadow:0 18px 55px rgba(0,0,0,.14);
  overflow:hidden;
}
body[data-page="qa"] .qa-profile-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  background:#f2f2f0;
}
body[data-page="qa"] .qa-profile-close {
  border:0;
  background:transparent;
  font-size:24px;
  color:#777;
  cursor:pointer;
}
body[data-page="qa"] .qa-profile-body {
  display:grid;
  grid-template-columns:72px 1fr;
  gap:14px;
  padding:16px;
}
body[data-page="qa"] .qa-avatar-preview {
  width:72px;
  height:72px;
  border-radius:50%;
  background:#777;
  color:#fff;
  display:grid;
  place-items:center;
  font-size:27px;
  font-weight:900;
  overflow:hidden;
}
body[data-page="qa"] .qa-avatar-preview img { width:100%;height:100%;object-fit:cover;display:block; }
body[data-page="qa"] .qa-profile-fields { display:grid; gap:8px; }
body[data-page="qa"] .qa-profile-fields input {
  width:100%;
  height:40px;
  border:1px solid #d5d5d2;
  border-radius:10px;
  padding:8px 10px;
  outline:none;
  background:#fff;
}
body[data-page="qa"] .qa-profile-fields input:focus { border-color:#aaa; }
body[data-page="qa"] .qa-upload-btn,
body[data-page="qa"] .qa-reset-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  border-radius:9px;
  padding:7px 11px;
  cursor:pointer;
  border:1px solid #d3d3d0;
  background:#f1f1ef;
  color:#444;
  font-size:13px;
  font-weight:800;
}
body[data-page="qa"] .qa-upload-btn:hover,
body[data-page="qa"] .qa-reset-btn:hover { background:#e6e6e3; }
body[data-page="qa"] .qa-upload-btn input { display:none; }
body[data-page="qa"] .qa-profile-fields small { color:#999; font-size:11px; line-height:1.5; }
body[data-page="qa"] .qa-admin-line {
  display:flex;
  justify-content:flex-end;
  margin-top:12px;
  min-height:22px;
}
body[data-page="qa"] .qa-admin-btn {
  border:0;
  background:transparent;
  padding:3px 4px;
  color:var(--muted);
  opacity:.34;
  font-size:11px;
  letter-spacing:.1em;
  cursor:pointer;
}
body[data-page="qa"] .qa-admin-btn.author-on { opacity:.85; color:#505050; }
body[data-page="qa"] .qa-status {
  min-height:22px;
  color:var(--muted);
  font-size:12px;
  margin:2px 0 4px 0;
}
body[data-page="qa"] .qa-board-area {
  margin-top:10px;
  min-height:550px;
}
body[data-page="qa"] .notes {
  width:420px;
  max-width:100%;
  height:min(660px, calc(100vh - 330px));
  min-height:260px;
  display:flex;
  flex-direction:column;
  gap:30px;
  overflow-y:auto;
  overflow-x:visible;
  padding:30px 32px 40px 16px;
  margin:0;
  scroll-behavior:smooth;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#c8c8c6 transparent;
}
body[data-page="qa"] .notes::-webkit-scrollbar { width:8px; }
body[data-page="qa"] .notes::-webkit-scrollbar-track { background:transparent; }
body[data-page="qa"] .notes::-webkit-scrollbar-thumb { background:#c8c8c6; border-radius:99px; }
body[data-page="qa"] .note {
  position:relative;
  width:350px;
  min-width:350px;
  min-height:520px;
  margin:0;
  padding:112px 22px 28px;
  border-radius:0 0 18px 18px;
  box-shadow:0 5px 13px rgba(0,0,0,.07);
  color:#fff;
  display:flex;
  flex-direction:column;
  transform:rotate(var(--note-tilt, 0deg));
  transition:transform .16s ease, box-shadow .16s ease;
}
body[data-page="qa"] .note:hover {
  transform:translateY(-2px) rotate(var(--note-tilt,0deg));
  box-shadow:0 11px 24px rgba(0,0,0,.11);
}
body[data-page="qa"] .note::before {
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:22px;
  background:rgba(255,255,255,.08);
}
body[data-page="qa"] .note-q-badge {
  position:absolute;
  left:-16px;
  top:-22px;
  width:62px;
  height:62px;
  border-radius:50%;
  background:#7b7b7b;
  border:5px solid #fff;
  display:grid;
  place-items:center;
  color:#fff;
  font-size:31px;
  line-height:1;
  font-weight:900;
  z-index:10;
  box-shadow:0 3px 8px rgba(0,0,0,.12);
  overflow:hidden;
}
body[data-page="qa"] .note-q-badge img { width:100%;height:100%;object-fit:cover;display:block; }
body[data-page="qa"] .note-trash {
  position:absolute;
  right:13px;
  top:16px;
  width:38px;
  height:38px;
  border:0;
  background:transparent;
  color:rgba(90,90,90,.55);
  display:grid;
  place-items:center;
  cursor:pointer;
  z-index:10;
}
body[data-page="qa"] .note-trash:hover { color:#454545; transform:scale(1.05); }
body[data-page="qa"] .note-trash svg { width:33px;height:33px; }
body[data-page="qa"] .note-id {
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  color:rgba(255,255,255,.88);
  margin:0 0 12px 2px;
}
body[data-page="qa"] .note-question {
  font-size:20px;
  line-height:1.55;
  font-weight:900;
  margin:0;
  white-space:pre-wrap;
  word-break:break-word;
}
body[data-page="qa"] .note-replies {
  display:flex;
  flex-direction:column;
  gap:15px;
  margin-top:28px;
}
body[data-page="qa"] .note-reply-row {
  display:grid;
  grid-template-columns:54px 1fr;
  gap:12px;
  align-items:start;
}
body[data-page="qa"] .note-avatar {
  width:54px;
  height:54px;
  border-radius:50%;
  background:rgba(255,255,255,.95);
  color:#555;
  display:grid;
  place-items:center;
  overflow:hidden;
  flex:0 0 54px;
  border:2px solid rgba(255,255,255,.72);
  font-weight:900;
}
body[data-page="qa"] .note-avatar img { width:100%;height:100%;object-fit:cover;display:block; }
body[data-page="qa"] .note-reply-content { min-width:0; padding-top:2px; }
body[data-page="qa"] .note-reply-name { font-weight:900; font-size:14px; margin-bottom:3px; color:rgba(255,255,255,.98); }
body[data-page="qa"] .note-reply-text {
  margin:0;
  font-size:16px;
  line-height:1.55;
  font-weight:700;
  white-space:pre-wrap;
  word-break:break-word;
}
body[data-page="qa"] .note-bottom {
  margin-top:auto;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  padding-top:18px;
}
body[data-page="qa"] .note-date {
  margin:0;
  color:rgba(255,255,255,.70);
  font-size:11px;
  letter-spacing:.1em;
  text-align:left;
}
body[data-page="qa"] .note-reply-trigger {
  border:0;
  background:rgba(255,255,255,.95);
  color:#555;
  min-height:34px;
  padding:6px 15px;
  border-radius:17px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}
body[data-page="qa"] .note-reply-trigger:hover { background:#fff; }
body[data-page="qa"] .note-reply-editor {
  margin-top:16px;
  background:rgba(255,255,255,.93);
  color:#333;
  border-radius:14px;
  padding:14px;
}
body[data-page="qa"] .note-reply-editor[hidden] { display:none; }
body[data-page="qa"] .reply-editor-grid {
  display:grid;
  grid-template-columns:58px 1fr;
  gap:10px;
}
body[data-page="qa"] .reply-editor-avatar {
  width:58px;
  height:58px;
  border-radius:50%;
  background:#eee;
  overflow:hidden;
  display:grid;
  place-items:center;
  color:#666;
  font-weight:900;
}
body[data-page="qa"] .reply-editor-avatar img { width:100%;height:100%;object-fit:cover; }
body[data-page="qa"] .reply-editor-fields { display:grid; gap:8px; }
body[data-page="qa"] .reply-editor-fields input,
body[data-page="qa"] .reply-editor-fields textarea {
  width:100%;
  border:1px solid #d4d4d0;
  border-radius:9px;
  background:#fff;
  color:#333;
  padding:8px 10px;
  outline:none;
}
body[data-page="qa"] .reply-editor-fields textarea { min-height:74px; resize:vertical; line-height:1.5; }
body[data-page="qa"] .reply-editor-fields input:focus,
body[data-page="qa"] .reply-editor-fields textarea:focus { border-color:#a6a6a3; }
body[data-page="qa"] .reply-editor-actions { display:flex; flex-wrap:wrap; gap:7px; align-items:center; margin-top:9px; }
body[data-page="qa"] .reply-mini-btn {
  border:1px solid #d5d5d1;
  background:#f0f0ee;
  color:#4b4b4b;
  min-height:31px;
  padding:5px 10px;
  border-radius:8px;
  cursor:pointer;
  font-size:11px;
  font-weight:800;
}
body[data-page="qa"] .reply-mini-btn:hover { background:#e7e7e4; }
body[data-page="qa"] .reply-send-btn {
  margin-left:auto;
  border:0;
  background:#3f3f3f;
  color:#fff;
  min-height:33px;
  padding:6px 14px;
  border-radius:9px;
  cursor:pointer;
  font-size:12px;
  font-weight:900;
}
body[data-page="qa"] .reply-send-btn:hover { background:#2d2d2d; }
body[data-page="qa"] .reply-upload-input { display:none; }
body[data-page="qa"] .note-empty {
  width:350px;
  min-height:260px;
  border:2px dashed #d4d4d1;
  color:#999;
  display:grid;
  place-items:center;
  text-align:center;
  padding:24px;
}
body[data-page="qa"] .qa-error {
  color:#a33;
  background:#fff2f2;
  border:1px solid #f0c8c8;
  padding:9px 12px;
  border-radius:10px;
  margin-bottom:10px;
  width:min(600px,100%);
  font-size:12px;
}
body[data-page="qa"] #site-footer { margin-top:0; }

@media (max-width:900px){
  body[data-page="qa"] .qa-page-shell { width:min(100% - 28px, 700px); }
  body[data-page="qa"] .qa-heading { grid-template-columns:1fr; gap:10px; margin-top:28px; }
  body[data-page="qa"] .qa-title { font-size:30px; }
  body[data-page="qa"] .qa-compose-row { grid-template-columns:minmax(0,1fr) 56px 52px; gap:8px; }
  body[data-page="qa"] .qa-form-submit { width:56px;height:56px; }
  body[data-page="qa"] .qa-profile-btn { width:52px;height:52px;font-size:31px; }
  body[data-page="qa"] .qa-form-wrapper { height:54px; }
  body[data-page="qa"] .qa-form-input { height:54px; min-height:54px; line-height:54px; font-size:16px; padding:0 18px; }
  body[data-page="qa"] .qa-color-help { font-size:12px; }
  body[data-page="qa"] .notes { height:auto; max-height:none; overflow:visible; width:100%; padding-left:28px; }
  body[data-page="qa"] .note { width:min(350px, calc(100vw - 72px)); min-width:0; }
}

body[data-page="qa"] .note.note-light { color:#4b4b4b; }
body[data-page="qa"] .note.note-light .note-id,
body[data-page="qa"] .note.note-light .note-reply-name,
body[data-page="qa"] .note.note-light .note-question { color:#4b4b4b; }
body[data-page="qa"] .note.note-light .note-date { color:rgba(75,75,75,.58); }
body[data-page="qa"] .note.note-light .note-reply-text { color:#4b4b4b; }
body[data-page="qa"] .note.note-light .note-q-badge { border-color:#fff; }

/* =================================================================
   QA board iteration: vertical notes / hidden scrollbars / search /
   button images / shake / toast  (appended; overrides older rules)
   ================================================================= */
body[data-page="qa"] * { scrollbar-width: none; }
body[data-page="qa"] *::-webkit-scrollbar { display: none; width: 0; height: 0; }
body[data-page="qa"] .notes::-webkit-scrollbar { display: none; width: 0; height: 0; }
body[data-page="qa"] .notes { scrollbar-width: none; scrollbar-color: transparent; }
html:has(body[data-page="qa"]) { scrollbar-width: none; }
html:has(body[data-page="qa"])::-webkit-scrollbar { display: none; width: 0; }
body[data-page="qa"] .note-question { margin: auto 0; text-align: center; }
body[data-page="qa"] .note-reply-text { max-height: none; }
body[data-page="qa"] .qa-nomatch { color: var(--muted); font-size: 13px; padding: 6px 4px; margin: 0; }
body[data-page="qa"] .qa-send-img { display: block; height: 58px; width: auto; max-width: 66px; }
body[data-page="qa"] .note-trash-img { display: block; width: 30px; height: auto; }
.qa-toast { position: fixed; left: 50%; top: 44%; z-index: 9999; font-family: 'FusionPixel', 'Microsoft YaHei', monospace; font-size: 30px; font-weight: 900; color: #fff; white-space: nowrap; pointer-events: none; text-shadow: 2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000, 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 1px 1px 0 #000; animation: qa-toast-float 1.7s ease-out forwards; }
@keyframes qa-toast-float {
  0% { opacity: 0; transform: translate(-50%, 14px); }
  18% { opacity: 1; transform: translate(-50%, 0); }
  65% { opacity: 1; transform: translate(-50%, -34px); }
  100% { opacity: 0; transform: translate(-50%, -84px); }
}

/* =================================================================
   QA iteration round 2: 3-column notes / pendant Q badge /
   centered vertical question / replies bottom-right / transparent search
   (appended last; overrides earlier QA rules)
   ================================================================= */
body[data-page="qa"] .notes {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 260px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px 32px;
  padding: 26px 8px 10px 16px;
  margin: 0;
  overflow: visible;
}
body[data-page="qa"] .note { width: 100%; min-width: 0; }
body[data-page="qa"] .note-question { margin: auto 0; text-align: center; }
body[data-page="qa"] .note-replies { margin-top: auto; align-items: flex-end; padding-top: 18px; }
body[data-page="qa"] .note-reply-row { display: flex; gap: 10px; align-items: flex-start; }
body[data-page="qa"] .note-reply-content { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
body[data-page="qa"] .note-reply-name { font-size: 12px; margin: 0 0 6px; }
body[data-page="qa"] .note-reply-text { max-height: none; }
body[data-page="qa"] .note-date { color: rgba(255, 255, 255, .55); }
body[data-page="qa"] .qa-nomatch { color: var(--muted); font-size: 13px; padding: 6px 4px; margin: 0; }
body[data-page="qa"] .note-empty { justify-self: start; width: 350px; }

/* =================================================================
   QA search final: compact, sits above the title, no focus box
   ================================================================= */
body[data-page="qa"] .qa-search-row { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; }
body[data-page="qa"] .qa-search-icon { width: 22px; height: 22px; color: var(--fg); flex: 0 0 auto; cursor: pointer; }
body[data-page="qa"] .qa-search-input { flex: 1 1 auto; background: transparent; border: none; border-radius: 0; padding: 2px 2px; font-size: 14px; font-weight: 400; color: #8f8f8f; outline: none; box-shadow: none; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; }
body[data-page="qa"] .qa-search-input::placeholder { color: #b9b9b9; opacity: 1; font-family: inherit; }
body[data-page="qa"] .qa-search-input:focus { border: none; box-shadow: none; background: transparent; }
/* =================================================================
   QA 排版修正：对齐搜索框与输入框、修复回复错位
   ================================================================= */

/* 1. 修复整体头部对齐：调整左右比例，底部对齐 */
body[data-page="qa"] .qa-heading {
  display: grid;
  /* 左侧给 1 份，右侧给 3 份，保证右侧输入框宽度充足，与下方便签区域对齐 */
  grid-template-columns: 1fr 3fr; 
  gap: 40px;
  align-items: end; /* 关键：让左侧标题和右侧输入框底部对齐 */
  margin-top: 54px;
}

/* 2. 优化搜索框样式，使其与下方大标题贴合 */
body[data-page="qa"] .qa-search-row {
  margin-bottom: 12px; /* 拉开搜索框和"留言板"大标题的间距 */
}
body[data-page="qa"] .qa-search-input {
  padding: 4px 2px;
}

/* 3. 修复回复错位：将回复内容改为纵向排列（名字在上，内容在下） */
body[data-page="qa"] .note-reply-content {
  display: flex;
  flex-direction: column; /* 关键：改为纵向 */
  gap: 4px;
  align-items: flex-start; 
  min-width: 0;
}

body[data-page="qa"] .note-reply-name {
  font-size: 13px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.98);
  margin-bottom: 2px;
}

body[data-page="qa"] .note-reply-text {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
  white-space: pre-wrap;
  word-break: break-word;
  color: #fff;
}

/* 4. 强制让回复区域底部对齐，避免独立悬浮 */
body[data-page="qa"] .note-replies {
  margin-top: auto; /* 将回复块推到便签底部 */
  align-items: flex-start; /* 左对齐 */
  padding-top: 18px;
}

body[data-page="qa"] .note-reply-row {
  display: flex;
  gap: 12px;
  align-items: flex-start; /* 头像顶部对齐 */
  width: 100%;
}

/* 5. 补充小细节：保证深色便签下日期颜色对比度 */
body[data-page="qa"] .note-date {
  color: rgba(255, 255, 255, 0.65);
}
/* =================================================================
   QA 排版修正：对齐搜索框与输入框、修复回复错位
   ================================================================= */

/* 1. 修复整体头部对齐：调整左右比例，底部对齐 */
body[data-page="qa"] .qa-heading {
  display: grid;
  /* 左侧给 1 份，右侧给 3 份，保证右侧输入框宽度充足，与下方便签区域对齐 */
  grid-template-columns: 1fr 3fr;
  gap: 40px;
  align-items: end; /* 关键：让左侧标题和右侧输入框底部对齐 */
  margin-top: 54px;
}

/* 2. 优化搜索框样式，使其与下方大标题贴合 */
body[data-page="qa"] .qa-search-row {
  margin-bottom: 12px; /* 拉开搜索框和"留言板"大标题的间距 */
}
body[data-page="qa"] .qa-search-input {
  padding: 4px 2px;
}

/* 3. 修复回复错位：将回复内容改为纵向排列（名字在上，内容在下） */
body[data-page="qa"] .note-reply-content {
  display: flex;
  flex-direction: column; /* 关键：改为纵向 */
  gap: 4px;
  align-items: flex-start;
  min-width: 0;
}

body[data-page="qa"] .note-reply-name {
  font-size: 13px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.98);
  margin-bottom: 2px;
}

body[data-page="qa"] .note-reply-text {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
  white-space: pre-wrap;
  word-break: break-word;
  color: #fff;
}

/* 4. 强制让回复区域底部对齐，避免独立悬浮 */
body[data-page="qa"] .note-replies {
  margin-top: auto; /* 将回复块推到便签底部 */
  align-items: flex-start; /* 左对齐 */
  padding-top: 18px;
}

body[data-page="qa"] .note-reply-row {
  display: flex;
  gap: 12px;
  align-items: flex-start; /* 头像顶部对齐 */
  width: 100%;
}

/* 5. 补充小细节：保证深色便签下日期颜色对比度 */
body[data-page="qa"] .note-date {
  color: rgba(255, 255, 255, 0.65);
}

/* =================================================================
   QA 搜索框定稿：缩小、居中于「留言板」标题上方、与标题同宽
   （追加在文件最末尾，覆盖之前所有搜索框规则）
   ================================================================= */
body[data-page="qa"] .qa-heading {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: end;
}
body[data-page="qa"] .qa-heading > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
body[data-page="qa"] .qa-search-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  width: 130px;
}
body[data-page="qa"] .qa-search-icon { width: 20px; height: 20px; flex: 0 0 auto; }
body[data-page="qa"] .qa-search-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 2px;
  font-size: 13px;
  font-weight: 400;
  color: #8f8f8f;
  text-align: center;
  outline: none;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
body[data-page="qa"] .qa-search-input::placeholder { color: #b9b9b9; opacity: 1; font-family: inherit; }
body[data-page="qa"] .qa-search-input:focus { border: none; box-shadow: none; background: transparent; outline: none; }

/* =================================================================
   QA 头部对齐修正：左右两列顶对齐，行与行平行
   ================================================================= */
body[data-page="qa"] .qa-heading { align-items: flex-start; }
body[data-page="qa"] .qa-heading > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px; /* 让「留言板」标题与右侧输入框在同一水平线上 */
}
body[data-page="qa"] .qa-search-row { width: 150px; margin: 0; }
body[data-page="qa"] .qa-search-icon { width: 20px; height: 20px; }
body[data-page="qa"] .qa-search-input { font-size: 13px; text-align: left; color: #8f8f8f; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; }

/* QA 头部像素级对齐：搜索行中心对齐色点行，标题中心对齐输入框中心 */
body[data-page="qa"] .qa-search-row { margin-top: 4px; }
body[data-page="qa"] .qa-heading > div:first-child { gap: 26px; }

/* QA 头部镜像对齐（最终版）：左右两列每行严格同高同中心 */
body[data-page="qa"] .qa-search-row { height: 28px; margin: 0; width: 150px; }
body[data-page="qa"] .qa-heading > div:first-child { gap: 24px; }

/* =================================================================
   搜索框定稿（对照 mock）：大号放大镜 + 旁边灰字提示，与色点行平行
   ================================================================= */
body[data-page="qa"] .qa-search-row {
  position: relative;
  height: 28px;          /* 与右侧色点行同高，保证平行 */
  width: 100%;
  margin: 0;
  overflow: visible;     /* 放大镜可溢出到上下 */
}
body[data-page="qa"] .qa-search-icon {
  position: absolute;
  left: 0;
  top: -14px;            /* 54px 的放大镜垂直居中于 28px 行 */
  width: 54px;
  height: 54px;
}
body[data-page="qa"] .qa-search-input {
  margin-left: 64px;     /* 提示文字在大放大镜右侧 */
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  color: #8f8f8f;
  text-align: left;
}
body[data-page="qa"] .qa-heading > div:first-child { gap: 24px; }

/* 弹幕 Toast：字体换回微软雅黑，不再用像素字体 */
.qa-toast {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-weight: 700;
}

/* 标题向右对齐，靠近发送框（水平间隙从 163px 收到网格间距 24px） */
body[data-page="qa"] .qa-title { text-align: right; }

/* 标题拉伸到整列宽度并右对齐文字（修正 flex 子项被收缩导致 text-align 无效） */
body[data-page="qa"] .qa-title { align-self: stretch; width: 100%; text-align: right; }

/* =================================================================
   搜索栏定稿：缩到与「留言板」标题同宽（95px），右对齐叠在标题上方，
   与标题形成一个整体设计（右边缘与标题文字对齐）
   ================================================================= */
body[data-page="qa"] .qa-search-row {
  width: 95px;
  height: 28px;
  margin: 0 0 0 auto;     /* 右对齐：右边缘与标题文字右边缘对齐 */
  position: relative;
  overflow: visible;
}
body[data-page="qa"] .qa-search-icon {
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
}
body[data-page="qa"] .qa-search-input {
  margin-left: 26px;      /* 提示文字在放大镜右侧 */
  width: 69px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 0;
  font-size: 11px;
  text-overflow: ellipsis;
}
body[data-page="qa"] .qa-heading > div:first-child { gap: 24px; }

/* =================================================================
   首页「留言便签」复古小留言板（踩空间风）
   纯平面无阴影；固定 380px 宽、列表固定 230px 高；漫画描边文字
   ================================================================= */
.mini-board {
  width: 100%;
  max-width: 380px;
  background-color: #A9A9A9;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  transition: background-color .3s ease;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
}
.mini-board .input-area { padding: 16px 16px 0; }
.mini-board .input-area input {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: bold;
  color: #333;
  outline: none;
  background-color: #ffffff;
  font-family: inherit;
}
.mini-board .input-area input::placeholder { color: #b0b0b0; font-weight: normal; }
.mini-board .message-list {
  padding: 20px 16px;
  height: 230px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}
.mini-board .message-list::-webkit-scrollbar { width: 4px; }
.mini-board .message-list::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, .15); border-radius: 2px; }
.mini-board .message-item { display: flex; flex-direction: column; gap: 6px; }
/* 留言正文：白字 + 深灰外描边（::before 伪元素法） */
.mini-board .message-text {
  position: relative;
  display: inline-block;
  align-self: flex-start;
  font-size: 19px;
  font-weight: 900;
  color: #ffffff;
  z-index: 1;
  letter-spacing: .5px;
  line-height: 1.4;
  word-break: break-all;
}
.mini-board .message-text::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  color: #333333;
  -webkit-text-stroke: 7px #333333;
  paint-order: stroke fill;
}
/* 留言时间戳：白字 + 深灰外描边（描边 5px） */
.mini-board .message-time {
  position: relative;
  display: inline-block;
  align-self: flex-start;
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: .5px;
  z-index: 1;
}
.mini-board .message-time::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  color: #333333;
  -webkit-text-stroke: 5px #333333;
  paint-order: stroke fill;
}
/* 底部黑条：动态时间 | 倒计时 */
.mini-board .board-footer {
  background-color: #000000;
  color: #ffffff;
  padding: 7px 12px;
  display: flex;
  flex-direction: column;    /* 两行：上面是时钟、下面是实时倒计时（天 时:分:秒） */
  align-items: flex-start;
  gap: 3px;
  font-size: 11px;
  font-weight: 900;
  border-radius: 0 0 16px 16px;
  margin-top: auto;
  white-space: nowrap;
  flex-shrink: 0;
}
.mini-board .board-footer span:not(.divider) {
  text-shadow: -1px -1px 0 #333, 1px -1px 0 #333, -1px 1px 0 #333, 1px 1px 0 #333, -1px 0 0 #333, 1px 0 0 #333, 0 -1px 0 #333, 0 1px 0 #333;
}
.mini-board .divider { display: none; }   /* 底栏改两行后不再需要竖线分隔 */
.mini-board span { font-variant-numeric: tabular-nums; }
.mini-board #liveSeconds { animation: mb-blink 1s step-end infinite; }
@keyframes mb-blink { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }

/* 小留言板优化：隐藏滚动条滑块；字体按比例缩小（一屏容纳 4 条） */
.mini-board .message-list { scrollbar-width: none; padding: 14px 16px; gap: 10px; }
.mini-board .message-list::-webkit-scrollbar { display: none; width: 0; height: 0; }
.mini-board .message-text { font-size: 16px; }
.mini-board .message-time { font-size: 12px; }

/* 小留言板再缩一档：4 条完整可见 */
.mini-board .message-list { padding: 12px 16px; gap: 8px; }
.mini-board .message-item { gap: 4px; }
.mini-board .message-text { font-size: 14px; }
.mini-board .message-time { font-size: 11px; }

/* =================================================================
   小留言板滚动遮罩修正：留言滚到边缘时柔和渐隐，
   不再与上方输入框 / 下方黑条硬碰硬（固定遮罩，不随内容滚动）
   ================================================================= */
.mini-board .message-list {
  padding: 16px;
  overflow: hidden auto;
  contain: paint;              /* 严格裁剪：描边/伪元素也不越界 */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
}

/* 小留言板：管理员删除按钮（清理广告）与空状态 */
.mini-board .mb-foot { display: flex; align-items: center; gap: 8px; }
.mini-board .mb-del {
  border: none;
  background: rgba(0, 0, 0, .18);
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
}
.mini-board .mb-del:hover { background: rgba(0, 0, 0, .45); }
.mini-board .mb-empty { color: #fff; font-weight: 900; font-size: 13px; text-shadow: 0 1px 0 #333; padding: 8px 2px; }
/* 小留言板：本机缓存提示（云端没连上时显示，避免让人以为留言已经上传） */
.mini-board .mb-note { color: #fff; opacity: .8; font-size: 11px; line-height: 1.5; padding: 4px 2px 10px; text-shadow: 0 1px 0 #333; }

/* =================================================================
   管理台（admin.html，仅本机使用）样式
   ================================================================= */
.admin-gate { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.admin-input {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  font-size: 15px;
  background: var(--bg);
  color: var(--fg);
  outline: none;
  min-width: 220px;
}
.admin-input:focus { border-color: var(--fg); }
.admin-btn {
  border: none;
  background: var(--heading);
  color: var(--bg);
  border-radius: 6px;
  padding: 0 18px;
  height: 44px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.admin-btn:hover { opacity: .85; }
.admin-btn.ghost { background: none; border: 1px solid var(--line); color: var(--fg); height: 34px; padding: 0 14px; font-size: 13px; }
.admin-btn.ghost:hover { border-color: var(--fg); opacity: 1; }
.admin-btn.danger { background: none; border: 1px solid #c0392b; color: #c0392b; height: 34px; padding: 0 14px; font-size: 13px; }
.admin-btn.danger:hover { background: #c0392b; color: #fff; opacity: 1; }
.admin-msg { color: var(--muted); font-size: 13px; flex-basis: 100%; margin: 0; }
.admin-sec { margin-top: 44px; }
.admin-sec-head { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 14px; }
.admin-sec-head .sec-kicker { margin: 0; }
.admin-count { color: var(--muted); font-size: 13px; margin-left: auto; }
.admin-list { display: flex; flex-direction: column; }
.admin-row { display: flex; align-items: center; gap: 14px; padding: 10px 2px; border-bottom: 1px dashed var(--line); }
.admin-row-main { flex: 1 1 auto; min-width: 0; }
.admin-row-text { font-size: 14px; word-break: break-word; }
.admin-row-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.admin-foot { margin-top: 48px; }

/* 管理台：图片上传槽位 */
.admin-upload-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 2px;
  border-bottom: 1px dashed var(--line);
  flex-wrap: wrap;
}
.admin-upload-info { flex: 1 1 260px; min-width: 0; }
.admin-upload-name { font-size: 15px; font-weight: 700; }
.admin-hint { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.admin-thumb {
  width: 96px;
  height: 64px;
  border-radius: 6px;
  background: var(--card-bg);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-thumb-empty { font-size: 10px; color: var(--muted); text-align: center; padding: 4px; line-height: 1.4; }
body[data-page="admin"] .admin-upload-btn { display: inline-flex; align-items: center; height: 34px; }

/* 管理台：上传确认行 */
.admin-confirm { flex-basis: 100%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.admin-confirm .admin-hint { margin: 0; flex: 1 1 240px; }
.admin-thumb canvas { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 留言列表：取消渐隐遮罩，改为实色遮挡条（硬边，颜色跟随卡片底色） */
.mini-board .message-list {
  -webkit-mask-image: none;
  mask-image: none;
}
.mini-board .input-area { position: relative; }
.mini-board .input-area::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 14px;
  background: var(--board-bg, #A9A9A9);
  z-index: 2;
  pointer-events: none;
}
.mini-board .board-footer { position: relative; }
.mini-board .board-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
  background: var(--board-bg, #A9A9A9);
  z-index: 2;
  pointer-events: none;
}

/* 首页头像：加载转圈（经典 loading 效果，深色圆底上的白色旋转弧） */
.my-avatar .loading-spin {
  width: 46px;
  height: 46px;
  border: 4px solid rgba(255, 255, 255, .28);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: img-spin .9s linear infinite;
}
@keyframes img-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .my-avatar .loading-spin { animation-duration: 1.8s; } }

/* 小留言板：加载中状态（转圈 + 提示） */
.mini-board .mb-loading {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .1em;
  text-shadow: -1px -1px 0 #333, 1px -1px 0 #333, -1px 1px 0 #333, 1px 1px 0 #333;
}
.mini-board .mb-loading .spin {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(255, 255, 255, .3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: img-spin .9s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .mini-board .mb-loading .spin { animation-duration: 1.8s; } }

/* QA 页布局统一：容器对齐全站标准 .wrap（max-width 1100px、左右 24px） */
body[data-page="qa"] .qa-page-shell {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 24px;
}

/* =================================================================
   发帖流（个人堆图 / 废案碎碎念）：空间动态风，拍手点赞、不能回复
   ================================================================= */
.post-compose {
  max-width: 640px;
  margin: 28px auto 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.post-compose-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.post-btn {
  border: none;
  background: var(--heading);
  color: var(--bg);
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.post-btn:hover { opacity: .85; }
.post-btn:disabled { opacity: .5; cursor: default; }
.post-btn.ghost { background: none; border: 1px solid var(--line); color: var(--fg); }
.post-btn.ghost:hover { border-color: var(--fg); opacity: 1; }
.post-file-name { font-size: 12px; color: var(--muted); }
.post-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.7;
  background: var(--bg);
  color: var(--fg);
  outline: none;
  resize: vertical;
}
.post-input:focus { border-color: var(--fg); }
.post-msg { font-size: 12px; color: var(--muted); margin: 0; }
.post-list { max-width: 640px; margin: 32px auto 0; display: flex; flex-direction: column; gap: 26px; }
.post-loading { text-align: center; }
.post-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card-bg); }
.post-img { display: block; width: 100%; height: auto; }
.post-text { margin: 0; padding: 14px 16px 4px; font-size: 15px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.post-foot { display: flex; align-items: center; gap: 12px; padding: 10px 16px 12px; }
.post-date { font-size: 12px; color: var(--muted); margin-right: auto; }
.post-clap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: none;
  border-radius: 999px;
  padding: 4px 12px 4px 8px;
  cursor: pointer;
  color: var(--fg);
}
.post-clap:hover { border-color: var(--fg); }
.post-clap:disabled { opacity: .6; cursor: default; }
.post-clap-icon { width: 22px; height: auto; display: block; }
.post-clap-count { font-size: 14px; font-weight: 900; font-variant-numeric: tabular-nums; }
.post-del { border: none; background: none; color: var(--muted); font-size: 16px; font-weight: 900; cursor: pointer; padding: 0 4px; }
.post-del:hover { color: #c0392b; }

/* =================================================================
   发帖流新版布局：左列头像+角色色点 | 右列配文+三格图+拍手/日期
   ================================================================= */
.post-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 20px;
  border: none;
  border-radius: 0;
  overflow: visible;
  background: none;
}
.post-side { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.post-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--card-bg);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.post-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-avatar-text { font-weight: 900; font-size: 24px; color: var(--fg); }
.post-dots { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.post-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c, #999);
  display: block;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--line);
  transition: transform .15s ease;
}
.post-dot:hover { transform: scale(1.25); }
.post-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.post-text { margin: 0; font-size: 16px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.post-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.post-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  cursor: zoom-in;
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--line);
}
.post-foot { display: flex; align-items: center; gap: 14px; }
.post-date { margin-left: auto; font-size: 12px; color: var(--muted); }

/* 发帖框：关联角色色点选择 */
.cast-pick-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cast-pick-label { font-size: 12px; color: var(--muted); }
.cast-pick {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c, #999);
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform .15s ease, border-color .15s ease;
}
.cast-pick:hover { transform: scale(1.15); }
.cast-pick.on { border-color: var(--fg); transform: scale(1.12); }

/* 灯箱：看原图 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, .88);
  display: grid;
  place-items: center;
  padding: 30px;
  cursor: zoom-out;
}
.lightbox img { max-width: 92vw; max-height: 88vh; display: block; }

/* 发帖流：靠左全宽 + 顶部搜索框（仿 QA） */
.post-search-row { display: flex; align-items: center; gap: 8px; margin: 44px 0 4px; max-width: 260px; }
.post-search-icon { width: 20px; height: 20px; color: var(--fg); flex: 0 0 auto; cursor: pointer; }
.post-search-input {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  padding: 2px;
  font-size: 13px;
  color: #8f8f8f;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
.post-search-input::placeholder { color: #b9b9b9; opacity: 1; }
.post-search-input:focus { border: none; outline: none; box-shadow: none; background: transparent; }
.post-compose { max-width: none; margin: 28px 0 0; }
.post-list { max-width: none; margin: 34px 0 0; }

/* =================================================================
   发帖流三轮微调：灯箱改小 / 发帖框更紧凑 / 九宫格图片布局 / 无关联按钮
   ================================================================= */
.lightbox { padding: 40px; }
.lightbox img { max-width: min(760px, 78vw); max-height: 72vh; }

.post-compose { padding: 12px; gap: 8px; }
.post-compose .post-btn { padding: 6px 16px; font-size: 13px; }
.post-compose .post-input { font-size: 13px; padding: 8px 10px; }
.post-compose .post-msg { font-size: 12px; }

/* 图片数量布局：1 张单图自适应；2/4 张两列（格子与九宫格同尺寸）；其余 3 列 */
.post-imgs.n1 { grid-template-columns: minmax(0, 1fr); justify-items: start; }
.post-imgs.n1 .post-thumb { width: auto; max-width: min(100%, 460px); aspect-ratio: auto; max-height: 520px; }
.post-imgs.n2, .post-imgs.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: calc((100% - 20px) / 3 * 2 + 10px); }

/* 无关联角色按钮（虚线空圆，选中时实心描边） */
.cast-pick.none { background: none; border: 2px dashed var(--muted); }
.cast-pick.none.on { border-style: solid; border-color: var(--fg); background: var(--card-bg); }

/* =================================================================
   发帖流四轮：整体缩小（帖子列表限宽 720 靠左，头像/文字/图片/拍手全缩）
   ================================================================= */
.post-compose { max-width: 720px; margin: 24px 0 0; }
.post-list { max-width: 720px; margin: 30px 0 0; gap: 22px; }
.post-card { grid-template-columns: 64px minmax(0, 1fr); gap: 16px; }
.post-avatar { width: 58px; height: 58px; }
.post-avatar-text { font-size: 18px; }
.post-dots { gap: 6px; }
.post-dot { width: 14px; height: 14px; border-width: 2px; }
.post-main { gap: 9px; padding-top: 2px; }
.post-text { font-size: 14px; line-height: 1.75; }
.post-imgs { gap: 6px; }
.post-thumb { border-radius: 4px; }
.post-clap { padding: 3px 10px 3px 6px; gap: 5px; }
.post-clap-icon { width: 18px; }
.post-clap-count { font-size: 13px; }
.post-date { font-size: 11px; }
.post-del { font-size: 14px; }

/* 管理台：登录账号展示 */
.admin-account { font-size: 13px; color: var(--muted); align-self: center; letter-spacing: .02em; }

/* 管理台：登录门需要能被 hidden 属性真正藏起来（display:flex 会覆盖默认的 display:none） */
.admin-gate[hidden] { display: none; }

/* 彩蛋：点击站长头像掉落的角色首字母（平面纯色、无描边；位置由物理引擎驱动） */
.drop-letter {
  position: fixed; top: 0; left: 0; z-index: 45;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  font-weight: 900; line-height: 1;
  pointer-events: none; user-select: none;
  will-change: transform;
}
.my-avatar { cursor: pointer; }
.avatar-hit { animation: avatar-hit .3s ease; }
@keyframes avatar-hit {
  0% { transform: scale(1) rotate(0deg); }
  30% { transform: scale(.93) rotate(-2.5deg); }
  65% { transform: scale(1.04) rotate(2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* =================================================================
   对话人物（放在首页「个人介绍」下面 · 小小的点击玩）
   舞台按「黑夜布局参考」对齐：打光铺满舞台，人物水平居中站进光里。
   立绘四帧切换（闭嘴/说话 × 睁眼/闭眼）+ 打字机气泡；气泡无描边，
   说完 10 秒没有新动作自动淡出（占位保留，不影响个人介绍内容）。
   ================================================================= */
/* 定位锚：人物挂在「关于我 →」下面（.right-column 兜底；绝对定位不占流，页脚不被挤动） */
#home-hello, .right-column { position: relative; }
.dialogue-actor {
  position: absolute;
  top: calc(100% + 92px);             /* 往下一段，给上方的气泡留出空间（不遮个人介绍文字） */
  left: 50%;
  transform: translateX(-50%);
  width: min(270px, 86vw);            /* 用视口做限制（不受父容器宽度挤压，保证放大效果） */
  user-select: none;
}
.dialogue-light {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity .55s ease;
  pointer-events: none;
}
.dialogue-light img {
  width: 100%; height: 100%; display: block;
  object-fit: cover;      /* 打光图尺寸比例与舞台不一致时也不变形（铺满舞台、超出部分裁掉） */
}
[data-theme="dark"] .dialogue-light { opacity: .9; }
/* 立绘（点击换下一句；无阴影，纯平面） */
.dialogue-figure {
  position: absolute; left: 50%; bottom: 1%;
  transform: translateX(-50%);
  height: 93.5%;
  cursor: pointer;
}
.dialogue-figure img.dialogue-frame { display: block; height: 100%; width: auto; }
/* 舞台：宽高比 = 打光图 627×650（按参考图对齐人物与光） */
.dialogue-stage {
  position: relative;
  width: 100%;
  margin: 0 auto;
  aspect-ratio: 627 / 650;
}
/* 被字母砸中：震一下（闭眼帧由 JS 切换；冷却 10 秒） */
.actor-shake { animation: actor-shake .45s ease; }
@keyframes actor-shake {
  0%, 100% { transform: translateX(-50%); }
  20% { transform: translateX(calc(-50% - 5px)); }
  40% { transform: translateX(calc(-50% + 5px)); }
  60% { transform: translateX(calc(-50% - 3px)); }
  80% { transform: translateX(calc(-50% + 3px)); }
}
/* 气泡：固定显示范围 232×78（字号按字数自适应，绝不撑大）；
   绝对定位悬浮在人物上方 —— 出现/消失/长短都不推动人物分毫 */
.dialogue-bubble {
  position: absolute;
  left: 50%; bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: 232px; height: 78px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .35s ease;
  pointer-events: none;
}
.dialogue-bubble.on { opacity: 1; }
.dialogue-bubble p {
  position: relative;
  box-sizing: border-box;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background: var(--card-bg); color: var(--heading);   /* 无描边：纯色块 + 小尾巴 */
  border-radius: 12px;
  padding: 8px 13px;
  font-family: "QiuYeYuanTi", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 17px; line-height: 1.55; letter-spacing: .02em;
  white-space: pre-wrap; word-break: break-word;
}
.dialogue-bubble p::after {   /* 指向人物的小尾巴（无描边） */
  content: ""; position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: -7px; width: 0; height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid var(--card-bg);
}
[data-theme="dark"] .dialogue-bubble p { background: #242424; color: #f0f0f0; }
[data-theme="dark"] .dialogue-bubble p::after { border-top-color: #242424; }
/* 演出特效（台词表【演出】栏）：重点句"放大出现" / "越洗越黑"那句"轻微颤抖"。
   加在气泡内层 p 上（外层 .dialogue-bubble 的 transform 是定位用的，不能动画覆盖）。 */
.dialogue-bubble p.fx-big {
  transform-origin: 50% 100%;
  animation: dlg-big .55s cubic-bezier(.2, .85, .35, 1.2) forwards;
}
@keyframes dlg-big {
  from { transform: scale(.88); }
  to { transform: scale(1.12); }
}
.dialogue-bubble p.fx-shake { animation: dlg-shake .42s ease-in-out infinite; }
@keyframes dlg-shake {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-2px); }
  70% { transform: translateX(2px); }
}
/* "浮出"演出：整句从下方慢慢浮上来（有讲述感，用于思想的长句） */
.dialogue-bubble p.fx-float { animation: dlg-float 1.1s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes dlg-float {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
/* 爱慕（台词表【演出】栏）：跳动 / 跳一次 / 放大+跳 / 放大+缓慢颤抖 / 缩小再恢复 / 轻颤一次。
   一个元素上只能跑一条 transform 动画，所以"放大+跳""放大+颤抖"把放大写成独立的 scale 属性，
   让 transform 动画去管跳/抖——两条叠加、互不覆盖。 */
.dialogue-bubble p.fx-bounce { animation: dlg-bounce .62s ease-in-out infinite; }
.dialogue-bubble p.fx-hop { animation: dlg-bounce .62s ease-in-out 1; }
@keyframes dlg-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.dialogue-bubble p.fx-bouncebig {
  transform-origin: 50% 100%;
  scale: 1.1;
  animation: dlg-bounce .62s ease-in-out infinite;
}
.dialogue-bubble p.fx-bigsh {
  transform-origin: 50% 100%;
  scale: 1.1;
  animation: dlg-shake .5s ease-in-out infinite;
}
.dialogue-bubble p.fx-shrink { animation: dlg-shrink .9s cubic-bezier(.3, .75, .4, 1) 1; }
@keyframes dlg-shrink {
  0% { transform: scale(1); }
  45% { transform: scale(.82); }
  100% { transform: scale(1); }
}
.dialogue-bubble p.fx-tremble { animation: dlg-tremble .5s ease-in-out 1; }
@keyframes dlg-tremble {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-1.5px); }
  75% { transform: translateX(1.5px); }
}
/* 长句（超过 40 字）：气泡临时加高，只往上延伸，不影响人物位置和其余布局 */
.dialogue-bubble.long { height: auto; }
.dialogue-bubble.long p { height: auto; max-height: 232px; }

/* =================================================================
   角色生日特效（生日当天自动出现；颜色 = 六角色代表色）
   气球：DOM + CSS 动画慢慢升起；彩带：canvas 自绘从两侧慢速上喷
   ================================================================= */
/* 注意：这一层不要加 overflow: hidden —— 气球的布局位置在屏幕下方（bottom:-180px），
   靠动画位移"升"进屏幕；加了裁剪会把它们整片裁掉（实测踩过这个坑） */
.bday-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.bday-balloon {
  position: absolute; bottom: -180px; left: 0;
  border-radius: 50% 50% 50% 50% / 56% 56% 44% 44%;
  background: var(--bcolor, #FFD700);
  box-shadow: inset -6px -8px 0 rgba(0, 0, 0, .07);
  animation-name: bday-rise;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  will-change: transform;
}
.bday-balloon::before {          /* 气球上的高光 */
  content: ""; position: absolute; left: 20%; top: 12%;
  width: 30%; height: 22%; border-radius: 50%;
  background: rgba(255, 255, 255, .6);
}
.bday-balloon::after {           /* 气球底部的结 */
  content: ""; position: absolute; left: 50%; bottom: -7px;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid var(--bcolor, #FFD700);
}
.bday-balloon-string {           /* 绳子 */
  position: absolute; left: 50%; top: 100%; width: 1.5px; height: 30px;
  background: linear-gradient(rgba(150, 155, 160, .9), rgba(150, 155, 160, 0));
  transform: translateX(-50%);
}
@keyframes bday-rise {           /* 边升边轻轻左右摆 */
  0%   { transform: translate3d(0, 0, 0); }
  20%  { transform: translate3d(16px, -26vh, 0); }
  40%  { transform: translate3d(-12px, -52vh, 0); }
  60%  { transform: translate3d(14px, -78vh, 0); }
  80%  { transform: translate3d(-10px, -104vh, 0); }
  100% { transform: translate3d(8px, -134vh, 0); }
}
.bday-confetti {                 /* 彩带的 canvas 层 */
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 61;
}

/* =================================================================
   管理台：交互式裁切器（选图后弹出，拖动调整取景、滚轮缩放）
   ================================================================= */
.crop-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.crop-card {
  background: var(--bg); color: var(--fg);
  border-radius: 14px; padding: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .32);
  max-width: 100%; max-height: 100%;
  display: flex; flex-direction: column; gap: 10px;
  overflow: auto;
}
.crop-title { font-size: 14px; font-weight: 700; color: var(--heading); letter-spacing: .02em; }
.crop-view {                /* Cropper.js 的裁切容器（框外由 Cropper 自动加暗色遮罩） */
  position: relative; overflow: hidden;
  border-radius: 8px;
  background: #2a2a2a;
  width: min(620px, 82vw);
  height: min(420px, 56vh);
  touch-action: none;
}
.crop-view img { max-width: 100%; display: block; }
.crop-msg { margin: 0; }
.crop-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* =================================================================
   系列创作页：卡片底图（有图时铺满卡片，标题变成左下小标签）
   ================================================================= */
.series-card.has-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}
/* 大字标题保持原设计（叠在底图上层）；悬停/点击时底图暗下、字变白更明显 */
.series-card.has-bg .series-card-title {
  position: relative;
  z-index: 2;
  transition: color .25s ease;
}
.series-card.has-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0);
  border-radius: 8px;
  transition: background .25s ease;
  pointer-events: none;
  z-index: 1;
}
.series-card.has-bg:hover::after { background: rgba(0, 0, 0, .45); }
.series-card.has-bg:active::after { background: rgba(0, 0, 0, .62); }
.series-card.has-bg:hover .series-card-title,
.series-card.has-bg:active .series-card-title { color: #fff; }

/* =================================================================
   迷你背景音乐栏（每个页面页脚的下面 · 一个小小的胶囊）
   音乐本体在「音乐外壳」层（index.html），换页面不会中断；
   这里只显示曲名和进度（进度不能拖），点击暂停 / 继续。
   ================================================================= */
.bgm-mini {
  flex: 0 0 auto;                        /* 待在页脚那一行里（「本站介绍」按钮旁边） */
  display: flex; align-items: center; gap: 8px;
  padding: 6px 2px;
  box-sizing: border-box;
  background: transparent;               /* 透明外壳：只剩文字和细进度条 */
  color: var(--muted);
  font-size: 11.5px; letter-spacing: .08em;
  cursor: pointer; user-select: none;
  transition: color .25s ease;
  max-width: min(300px, 62vw);
}
.bgm-mini:hover { color: var(--fg); }
.bgm-icon { flex: 0 0 auto; width: 12px; text-align: center; font-size: 11px; }
.bgm-name { flex: 0 0 auto; opacity: .9; }
.bgm-name:hover { opacity: 1; text-decoration: underline; }   /* 提示：点曲名可以换歌 */
/* 曲名列表：点曲名弹出（fixed 定位在音乐栏上方，不受页脚裁剪影响） */
.bgm-list {
  position: fixed; z-index: 9998;
  min-width: 180px; max-height: 60vh; overflow: auto;
  background: var(--card-bg); color: var(--heading);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  padding: 6px;
}
.bgm-list-item {
  display: block; width: 100%; text-align: left;
  border: none; background: transparent; color: inherit;
  font: inherit; font-size: 12px; letter-spacing: .06em;
  padding: 7px 10px; border-radius: 7px; cursor: pointer;
}
.bgm-list-item:hover { background: var(--soft); }
.bgm-list-item.on { background: var(--soft); font-weight: 700; }
.bgm-list-item.on::before { content: "♪ "; }
.bgm-track {
  flex: 0 0 120px; width: 120px;         /* 固定宽度（不然会被 flex 压成 0） */
  height: 2.5px; border-radius: 2px; overflow: hidden;
  background: rgba(128, 128, 128, .3);
  pointer-events: none;                  /* 只显示进度，不能拖动 */
}
.bgm-fill { display: block; height: 100%; width: 0; background: #FFD700; border-radius: 2px; }
