
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            display: flex;
            min-height: 100vh;
            background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
            color: #333;
            overflow-x: hidden;
        }
        
        /* 侧边栏样式 - 保持不变 */
        .sidebar {
            width: 60px;
            background: linear-gradient(135deg,  #ff9a9e 0%, #fad0c4 100%);
            color: white;
            transition: all 0.4s ease;
            height: 100vh;
            position: fixed;
            overflow-y: auto;
            overflow-x: hidden;
            z-index: 1000;
            box-shadow: 3px 0 15px rgba(0, 0, 0, 0.1);
        }
        
        .sidebar:hover {
            width: 280px;
        }
        
        .sidebar-header {
            padding: 20px 15px;
            display: flex;
            align-items: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .sidebar-header i {
            font-size: 24px;
            margin-right: 15px;
        }
        
        .sidebar-header h2 {
            font-size: 18px;
            white-space: nowrap;
            opacity: 0;
            transition: opacity 0.2s ease 0.2s;
        }
        
        .sidebar:hover .sidebar-header h2 {
            opacity: 1;
        }
        
        .menu {
            padding: 15px 0;
        }
        
        .menu-item {
            padding: 12px 20px;
            cursor: pointer;
            display: flex;
            align-items: center;
            transition: all 0.3s;
            position: relative;
        }
        
        .menu-item:hover {
            background: rgba(255, 255, 255, 0.1);
        }
        
        .menu-item i {
            font-size: 18px;
            margin-right: 15px;
            min-width: 24px;
        }
        
        .menu-item span {
            white-space: nowrap;
            opacity: 0;
            transition: opacity 0.2s ease 0.2s;
        }
        
        .sidebar:hover .menu-item span {
            opacity: 1;
        }
        
        .submenu {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.4s ease;
            background: rgba(0, 0, 0, 0.15);
            margin-left: 10px;
            border-radius: 4px;
        }
        
        .sidebar:hover .submenu.active {
            max-height: 500px;
        }
        
        .submenu-item {
            padding: 10px 20px 10px 50px;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 14px;
            white-space: nowrap;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .submenu-item:hover {
            background: rgba(255, 255, 255, 0.1);
        }
        
        .sidebar:hover .submenu-item {
            opacity: 1;
        }
        
        .active-category > .menu-item {
            background: rgba(255, 255, 255, 0.15);
        }
        

        .active-page {
            background: rgba(255, 255, 255, 0.2) !important;
            border-left: 3px solid #ffcc00;
        }
        
        /* 主内容区域 - 修改为右侧对齐 */
        .main-content {
            flex: 1;
            margin-left: 60px;
            transition: margin-left 0.4s ease;
            padding: 20px;
            display: flex;
            justify-content: center; /* 关键修改：使内容向右对齐 */
        }
        
        .sidebar:hover ~ .main-content {
            margin-left: 280px;
        }
        
        .content-container {
            width: 100%; /* 控制内容区域宽度 */
            max-width: 2000px;
        }
        
        .content-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            padding-bottom: 15px;
            border-bottom: 2px solid #e0e8f0;
        }
        
        .content-header h1 {
            color: #1a2a6c;
            font-size: 32px;
            font-weight: 700;
            letter-spacing: -0.5px;
            background: linear-gradient(90deg, #1a2a6c, #3a6ea5);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        
        .search-box {
            display: flex;
            background: white;
            border-radius: 30px;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            width: 300px;
            border: 1px solid #e0e6ed;
        }
        
        .search-box input {
            flex: 1;
            border: none;
            padding: 12px 20px;
            outline: none;
            font-size: 16px;
            background: transparent;
        }
        
        .search-box button {
            background: linear-gradient(135deg, #2a5298, #1a2a6c);
            color: white;
            border: none;
            padding: 0 22px;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 16px;
        }
        
        .search-box button:hover {
            background: linear-gradient(135deg, #1a2a6c, #2a5298);
        }
        
        .wiki-content {
            background: white;
            border-radius: 16px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
            padding: 40px;
            min-height: 70vh;
            opacity: 0;
            transform: translateY(20px);
            animation: fadeIn 0.6s forwards 0.4s;
            border: 1px solid #eef2f7;
            position: relative;
            overflow: hidden;
            
        }
        
        .wiki-content:before {
            content: "";
            position: absolute;
            top: 0;
            right: 0;
            width: 5px;
            height: 100%;
            background: linear-gradient(to bottom,  #ff9a9e 0%, #fad0c4 100%);
        }
        
        .wiki-content h2 {
            color: #1a2a6c;
            margin-bottom: 25px;
            padding-bottom: 12px;
            border-bottom: 2px solid #f0f4f9;
            font-size: 26px;
            position: relative;
        }
        
        .wiki-content h2:after {
            content: "";
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 80px;
            height: 3px;
            background: linear-gradient(90deg, #2a5298, #3a6ea5);
            border-radius: 3px;
        }
        
        .wiki-content p {
            line-height: 1.6;
            margin-bottom: 10px;
            color: #444;
            font-size: 17px;
        }
        
        .wiki-content ul {
            margin: 25px 0;
            padding-left: 25px;
        }
        
        .wiki-content li {
            margin-bottom: 14px;
            line-height: 1.7;
            font-size: 16px;
            position: relative;
            padding-left: 20px;
        }

        .wiki-content img{
            width: auto;
            vertical-align: middle;
        }
        
        .info-box {
            background: linear-gradient(135deg, #f0f8ff 0%, #e6f2ff 100%);
            border-left: 4px solid #2a5298;
            padding: 22px 25px;
            margin: 30px 0;
            border-radius: 0 10px 10px 0;
            box-shadow: 0 4px 8px rgba(42, 82, 152, 0.08);
        }
        
        .info-box p {
            margin-bottom: 0;
            color: #1a2a6c;
            font-size: 16px;
        }
        
        .info-box strong {
            color: #1a2a6c;
        }
        
        .category-tag {
            display: inline-block;
            background: linear-gradient(135deg, #eef4ff 0%, #dfe9ff 100%);
            color: #2a5298;
            padding: 7px 16px;
            border-radius: 30px;
            font-size: 14px;
            margin-right: 10px;
            margin-bottom: 12px;
            border: 1px solid #d6e0f0;
            font-weight: 500;
            transition: all 0.3s;
        }
        
        .category-tag:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(42, 82, 152, 0.15);
        }
        
        .content-footer {
            margin-top: 40px;
            padding-top: 25px;
            border-top: 2px solid #f0f4f9;
            display: flex;
            justify-content: space-between;
            color: #5a6c84;
            font-size: 15px;
            align-items: center;
        }
        
        .last-updated {
            background: #f0f7ff;
            padding: 8px 15px;
            border-radius: 20px;
            font-weight: 500;
        }
        
        .contributors {
            display: flex;
            align-items: center;
        }
        
        .contributors span {
            margin-right: 12px;
            font-weight: 500;
        }
        
        .contributors img {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            margin-left: 8px;
            border: 2px solid white;
            box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
            transition: all 0.3s;
        }
        
        .contributors img:hover {
            transform: scale(1.1);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        }
        
        /* 动画效果 */
        @keyframes fadeIn {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* 响应式设计 */
        @media (max-width: 1200px) {
            .content-container {
                width: 92%;
            }
        }
        
        @media (max-width: 992px) {
            .content-container {
                width: 95%;
            }
            
            .wiki-content {
                padding: 30px;
            }
        }
        
        @media (max-width: 768px) {
            .sidebar {
                width: 50px;
            }
            
            .sidebar:hover {
                width: 260px;
            }
            
            .main-content {
                margin-left: 50px;
            }
            
            .sidebar:hover ~ .main-content {
                margin-left: 260px;
            }
            
            .content-header {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .search-box {
                width: 100%;
                margin-top: 20px;
            }
            .image-carousel-container {
                position: relative;
                width: 100%;
                margin-bottom: 30px;
                display: flex;
                justify-content: center;
            }      

            .image-carousel {
                position: relative;
                max-width: 100%;
                border-radius: 16px;
                overflow: hidden;
                box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
                display: flex;
                justify-content: center;
                align-items: center;
            }
        
            .carousel-container {
                position: relative;
                width: 100%;
                max-width: 900px; /* 最大宽度限制 */
                overflow: hidden;
            }
        
        .carousel-slide {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            transition: opacity 1s ease-in-out;
            background-size: cover;
            background-position: center;
            display: flex;
            align-items: flex-end;
            justify-content: center;
        }
        
        .carousel-slide.active {
            opacity: 1;
            z-index: 10;
        }
        
        .slide-caption {
            background: rgba(0, 0, 0, 0.6);
            color: white;
            padding: 15px 25px;
            width: 100%;
            text-align: center;
            font-size: 18px;
            backdrop-filter: blur(5px);
        }
        
        .carousel-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 100%;
            display: flex;
            justify-content: space-between;
            z-index: 20;
            padding: 0 20px;
        }
        
        .carousel-btn {
            background: rgba(255, 255, 255, 0.7);
            border: none;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        }
        
        .carousel-btn:hover {
            background: white;
            transform: scale(1.1);
        }
        
        .carousel-btn i {
            font-size: 24px;
            color: #1a2a6c;
        }
        
        .carousel-indicators {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 10px;
            z-index: 20;
        }
        
        .indicator {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.5);
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .indicator.active {
            background: white;
            transform: scale(1.2);
        }
            
            .content-container {
                width: 100%;
            }
        }
        
        @media (max-width: 576px) {
            .wiki-content {
                padding: 25px 20px;
            }
            
            .content-footer {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .contributors {
                margin-top: 20px;
            }
        }
        .chardata
        {
            margin: auto;
            width: 50%;
            padding: 10px;
            text-align: center;
        }
        .paneldata
        {
            padding: 20px;
            display: inline-block;

        }

        .item_text
        {
            padding: 50px;
            flex: 2;                 /* 占据1份空间 */
            display: flex;           /* 嵌套Flex布局 */
            flex-direction: column;  /* 垂直排列子元素 */
            border-right: 1px dashed #999; /* 分隔线 */
        }


        .item_info
        {
            width: 25%;
            display: grid;
            grid-template-rows: 11fr; /* 两行等高 */
            
        
        margin: 25px;}
        .top-box, .bottom-box {
            display: flex;           /* 启用Flex布局 */
            justify-content: center; /* 水平居中 */
            align-items: center;     /* 垂直居中 */
        }

        .item_content {
            padding: 15px;
            border-radius: 6px;
        }

        .item_info p{
            text-align: center;
            line-height: 10px;
        }

        .charitem
        {
            display: flex;
            align-items: center;
            background-color: white;
            box-shadow: 0 0px 10px rgba(0, 0, 0, 0.2);
            border-radius: 16px;
        
        background-image: url(../image/item_card.png);
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
        /* 卡片自带上下间距：两张卡之间、卡片和正文之间都不用再手写 <br> */
        margin: 30px 0;}

        
        .image-carousel-container {
            position: relative;
            width: 100%;
            margin-bottom: 30px;
            display: flex;
            justify-content: center;
        }
        
        .image-carousel {
            position: relative;
            max-width: 100%;
            border-radius: 16px;
            overflow: hidden;
            filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.5));
            display: flex;
            justify-content: center;
            align-items: center;
        }
        
        .carousel-container {
            position: relative;
            width: 100%;
            max-width: 900px; /* 最大宽度限制 */
            overflow: hidden;
        }
        
        .carousel-slide {
            position: relative;
            width: 100%;
            display: none;
            transition: opacity 0.8s ease-in-out;
        }
        
        .carousel-slide.active {
            display: block;
            animation: slideIn 0.8s ease;
        }
        
        .carousel-slide img {
            width: 100%;
            height: auto;
            display: block;
            border-radius: 16px;
        }
        
        .slide-caption {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            color: rgb(36, 36, 36);
            padding: 15px 25px;
            text-align: center;
            font-size: 18px;

        }
        
        /* 翻页按钮位置调整 */
        .carousel-nav {
            position: absolute;
            top: 50%;
            left: 0;
            right: 0;
            transform: translateY(-50%);
            display: flex;
            justify-content: space-between;
            z-index: 20;
            padding: 0;
            pointer-events: none;
        }
        
        .carousel-btn {
            background: rgba(255, 255, 255, 0.7);
            border: none;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
            pointer-events: auto;
        }
        
        .prev-btn {
            margin-left: -70px; /* 向左移动 */
        }
        
        .next-btn {
            margin-right: -70px; /* 向右移动 */
        }
        
        .carousel-btn:hover {
            background: white;
            transform: scale(1.1);
        }
        
        .carousel-btn i {
            font-size: 24px;
            color: #1a2a6c;
        }
        
        .carousel-indicators {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 10px;
            z-index: 20;
        }
        
        .indicator {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.5);
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .indicator.active {
            background: white;
            transform: scale(1.2);
        }
        #icon-btn {
            background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
            border: none;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            justify-content: center;
            align-items: center;
            box-shadow: 0 5px 20px rgba(0,0,0,0.3);
            transition: all 0.3s ease;
            position: relative;
        }

        
        #icon-btn:hover {
            transform: translateY(-5px) rotate(10deg);
            box-shadow: 0 8px 25px rgba(0,0,0,0.4);
            background: linear-gradient(135deg, #fad0c4 0%, #ff9a9e 100%);
        }
        
        #icon-btn i {
            font-size: 32px;
            color: #fff;
        }
        @keyframes abbr-tooltip-animation {
            from { 
                opacity: 0; 
                transform: translateX(-50%) translateY(10px); 
            }
            to { 
                opacity: 1; 
                transform: translateX(-50%) translateY(0); 
            }
        }
        
        /* 工具提示 */
        .tooltip {
            position: absolute;
            bottom: -40px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.8);
            color: white;
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 14px;
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            pointer-events: none;
        }
        
        #icon-btn:hover .tooltip {
            opacity: 1;
            visibility: visible;
            bottom: -35px;
        }

        abbr {
        cursor: help;
        position: relative;
        text-decoration: none;
        transition: all 0.3s ease;
        }

                /* 自定义工具提示 */
        abbr[title]:hover::after {
            content: attr(title);
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: #2c3e50;
            color: white;
            padding: 8px 15px;
            border-radius: 6px;
            font-size: 0.9rem;
            white-space: nowrap;
            z-index: 100;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            animation: abbr-tooltip-animation 0.3s ease;
        }
        
        /* 为工具提示添加小箭头 */
        abbr[title]:hover::before {
            content: '';
            position: absolute;
            bottom: calc(100% - 5px);
            left: 50%;
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-top-color: #2c3e50;
        }

        /* 经典下划线样式。
           两种写法都能生效：
             · <abbr class="underline">…</abbr>                  ← 类写在 abbr 自己身上（编辑器「虚线样式」开关用这个）
             · <span class="underline"><abbr …>…</abbr></span>   ← 类写在外面一层
           （编辑器右栏「🏷 悬停说明」的虚线开关就是给 abbr 加 .underline） */
        abbr.underline {
        border-bottom: 2px dashed #3498db;
        }
        abbr.underline:hover {
        background-color: #e1f0fa;
        border-bottom: 2px solid #2980b9;
        }
        .underline abbr {
        border-bottom: 2px dashed #3498db;
        }
        .underline abbr:hover {
        background-color: #e1f0fa;
        border-bottom: 2px solid #2980b9;
        }
        a
        {
            color: inherit;
            text-decoration: none;
        }
        .search-box {
            display: flex;
            /* 多分辨率适配：固定 1000px 会撑破窄屏，改为自适应并保留原有上限 */
            width: 100%;
            max-width: 1000px;
            margin: 30px auto;
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
            border-radius: 20px;
            overflow: hidden;
        }
        
        .search-box input {
            flex: 1;
            padding: 15px 25px;
            border: none;
            font-size: 1.1rem;
            background: rgba(255, 255, 255, 0.9);
        }
        
        .search-box button {
            padding: 0 25px;
            background: #e6f2ff;
            color: rgb(42, 46, 71);
            border: none;
            cursor: pointer;
            font-size: 1.2rem;
            transition: all 0.3s ease;
        }
        
        .search-box button:hover {
            background: #5783b1;
        }
        
        .categories {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 30px;
        }
        
        .category-btn {
            background: rgba(255, 255, 255, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: rgb(0, 0, 0);
            padding: 8px 20px;
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .category-btn:hover, .category-btn.active {
            background: rgba(0, 0, 0, 0.3);
        }
        
        .grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
            gap: 15px;
            margin-top: 15px;
        }
        
        .card {
            background: rgba(255, 255, 255, 0.12);
            backdrop-filter: blur(8px);
            border: 1px solid rgba(255, 255, 255, 0.18);
            border-radius: 12px;
            width: 70px;
            height: 70px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            cursor: pointer;
            text-decoration: none;
            position: relative;
            overflow: hidden;
        }
        
        .card:hover {
            transform: translateY(-5px) scale(1.08);
            background: rgba(255, 255, 255, 0.2);
            box-shadow: 0 8px 20px rgba(0,0,0,0.2);
            z-index: 10;
        }
        
        .icon-img {
            width: 50px;
            height: 50px;
            object-fit: contain;
            border-radius: 8px;
            transition: all 0.3s ease;
        }
        
        .card:hover .icon-img {
            transform: scale(1.15);
        }
        
        .tags {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 8px;
            margin-top: 10px;
        }
        
        .tag {
            background: rgba(255, 255, 255, 0.15);
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
        }
        .empty-state {
            grid-column: 1 / -1;
            text-align: center;
            padding: 40px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            margin-top: 20px;
        }
        
        .empty-state i {
            font-size: 4rem;
            margin-bottom: 20px;
            opacity: 0.6;
        }
       @media (max-width: 768px) {
            .grid {
                gap: 12px;
            }
            
            h1 {
                font-size: 1.8rem;
            }
            
            .search-box {
                max-width: 400px;
            }
        }
        
        @media (max-width: 480px) {
            .grid {
                grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
                gap: 10px;
            }
            
            .card {
                width: 65px;
                height: 65px;
            }
            
            .icon-img {
                width: 45px;
                height: 45px;
            }
        }

/* ---------- 多分辨率适配 ---------- */
/* body 是 flex 容器，.main-content 作为 flex 子项在 min-width: auto 时
   无法收缩到内容宽度以下，会被内部固定宽度内容撑破视口 */
.main-content {
    min-width: 0;
}

/* ---------- 多分辨率适配：窄屏布局 ---------- */
@media (max-width: 768px) {
    /* 物品卡片由横向排列改为纵向，避免内容被裁掉 */
    .charitem {
        flex-wrap: wrap;
    }

    /* 文字区允许收缩，否则会被内部固定宽度内容撑开 */
    .item_text {
        min-width: 0;
        flex: 1 1 100%;
        padding: 25px 20px;
    }

    /* 信息栏在窄屏下独占整行 */
    .item_info {
        width: 100%;
        margin: 10px 0;
    }

    /* 内容区图片不超出视口 */
    .content-container img {
        max-width: 100%;
        height: auto;
    }

    /* 玻璃卡片内边距收窄 */
    .u-glass,
    .u-glass-top {
        padding: 18px !important;
    }

    .u-glass-top {
        margin-top: 20px !important;
    }
}

/* ---------- 多分辨率适配：轮播按钮 ---------- */
@media (max-width: 768px) {
    /* .prev-btn/.next-btn 的负外边距（-70px）会把按钮推到视口之外，
       窄屏下取消，桌面布局保持不变 */
    .prev-btn {
        margin-left: 0;
    }

    .next-btn {
        margin-right: 0;
    }
}

/* ---------- 多分辨率适配：内容自适应 ---------- */
/* 文字区允许收缩：flex 子项默认 min-width:auto，会被内部固定宽度内容撑开 */
.item_text {
    min-width: 0;
}

/* 输入框默认 min-width:auto，会把搜索按钮挤出搜索框 */
.search-box input {
    min-width: 0;
}

/* 内容区图片不超出容器 */
.content-container img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    /* 数据表格在窄屏下可横向滚动，避免右侧内容被裁掉 */
    .wiki-table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
    }
}

/* ---------- 多分辨率适配：窄屏顶部导航栏 ---------- */
@media (max-width: 768px) {
    /* 侧边栏由左侧竖栏改为顶部横栏，hover 展开一并取消 */
    .sidebar,
    .sidebar:hover {
        width: 100%;
        height: 60px;
        padding-right: 60px; /* 给返回首页按钮让位 */
        display: flex;
        align-items: center;
        /* 需要 visible，子菜单下拉面板才能显示到导航栏下方 */
        overflow: visible;
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
    }

    /* 顶部栏左侧的品牌图标 */
    .sidebar-header {
        height: 100%;
        padding: 0 12px;
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, 0.25);
        flex-shrink: 0;
    }

    .sidebar-header h2 {
        display: none;
    }

    /* 菜单横向排列，超出时左右滑动 */
    .menu {
        display: flex;
        align-items: center;
        flex: 1;
        padding: 0 6px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        /* 隐藏滚动条，仍可横向滑动 */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .menu::-webkit-scrollbar {
        display: none;
    }

    .menu-category {
        flex-shrink: 0;
    }

    .menu-item {
        height: 60px;
        padding: 12px 14px;
    }

    /* 触摸设备没有 hover，菜单文字需要常驻显示 */
    .menu-item span,
    .sidebar:hover .menu-item span {
        opacity: 1;
    }

    .menu-item i {
        margin-right: 8px;
    }

    /* 子菜单：点击菜单项后作为下拉面板展开 */
    .submenu {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        max-height: 0;
        margin-left: 0;
        overflow: hidden;
        background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
        border-radius: 0 0 12px 12px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
        transition: max-height 0.3s ease;
        z-index: 1002;
    }

    .menu-category.nav-open .submenu {
        max-height: 60vh;
        overflow-y: auto;
    }

    .menu-category.nav-open > .menu-item {
        background: rgba(255, 255, 255, 0.2);
    }

    /* 下拉面板里的条目常驻可见 */
    .submenu-item,
    .sidebar:hover .submenu-item {
        opacity: 1;
        padding: 14px 20px;
    }

    /* 主内容让出顶部导航栏的高度 */
    .main-content,
    .sidebar:hover ~ .main-content {
        margin-left: 0;
        margin-top: 60px;
    }

    /* 返回首页按钮固定在导航栏内并右对齐 */
    #icon-btn {
        position: fixed;
        top: 8px;
        right: 10px;
        width: 44px;
        height: 44px;
        z-index: 1001;
        /* 导航栏同为粉色渐变，改用白底以免按钮糊在一起 */
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    #icon-btn i {
        font-size: 22px;
        color: #e8666c;
    }

    #icon-btn:hover {
        transform: none;
        background: #fff;
    }
}

/* ---------- 多分辨率适配：chardata 数据面板 ---------- */
@media (max-width: 1200px) {
    /* 面板容器：单行水平排列，占满内容宽度；1200 以下空间都可能不足 */
    .chardata {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: stretch;
        gap: 6px;
        width: 100%;
        padding: 8px 0;
    }

    /* 各项等分剩余空间；空间不足时按比例收缩而不换行 */
    .paneldata {
        display: flex;
        flex: 1 1 auto;
        min-width: 0;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 10px 4px;
    }

    /* 数值字号随视口缩放 */
    .paneldata span {
        font-size: clamp(12px, 4vw, 16px);
        white-space: nowrap;
    }

    /* 图标随可用宽度收缩，避免把面板顶开 */
    .paneldata img {
        max-width: min(28px, 8vw);
        height: auto;
        flex-shrink: 0;
    }
}

/* =====================================================================
   数据表格（.wiki-table）
   —— 与人物页 css/character.css 保持一致，各页面的表格长得一样
   ===================================================================== */

.wiki-table {
    width: 100%;
    max-width: 760px;
    margin: 25px 0;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e0e8f0;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(26, 42, 108, 0.08);
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.wiki-table thead th {
    padding: 12px 20px;
    text-align: center;
    background: linear-gradient(135deg, #ff9a9e, #ff9a9e);
    color: #fff;
    font-weight: 600;
    letter-spacing: 1px;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.wiki-table tbody td {
    padding: 11px 20px;
    text-align: center;
    border-bottom: 1px solid #eef2f7;
    color: #444;
}

.wiki-table tbody tr:nth-child(even) td {
    background: #f6f9fd;
}

/*
.wiki-table tbody tr:hover td {
    background: #ecf3fb;
}
*/

.wiki-table tbody tr:last-child td {
    border-bottom: none;
}

/* ---------- 多分辨率适配：窄屏物品卡上下排列 ---------- */
@media (max-width: 768px) {
    /* 由左右分栏改为上下排列；内边距收窄，给内容留出更多宽度 */
    .charitem {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }

    /* 贴图 / 信息栏提到最前，让读者先看到物品外观再读机制 */
    .item_info,
    .item_img {
        order: -1;
    }

    .item_info {
        width: 100%;
        margin: 0 0 12px;
    }

    /* 贴图保持正方形，并随内容区宽度收缩，避免撑破卡片 */
    .item_img {
        width: 200px;
        max-width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        flex-shrink: 0;
        margin: 0 auto 12px;
    }

    /* 机制说明排在下方，原右侧分隔线改为底部 */
    .item_text {
        order: 0;
        width: 100%;
        flex: 0 0 auto;
        padding: 20px;
        border-right: none;
        border-bottom: 1px dashed #999;
    }
}

/* ---------- 默认行距 ---------- */
/* 页面此前没有全局行高，正文沿用浏览器默认值（约 1.2），中文正文偏挤。
   这里给出全局默认行距；已显式设置 line-height 的元素不受影响。 */
body {
    line-height: 1.6;
}

/* 标题保持紧凑，避免继承正文行距后过于松散 */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.35;
}

/* ---------- u-blur 区块的段距 ---------- */
/* .item_content.u-blur 内是逐行属性（伤害 / 耐久 / 堆叠上限 等），
   正文统一的 10px 段距对这类密集数据行偏挤，单独放宽。
   末行带 .u-mb1（!important）不受影响，仍保持 1px 收尾。 */
.item_content.u-blur p {
    margin-bottom: 14px;
}

/* ---------- 桌面端 u-blur 保持改动前取值 ---------- */
/* 全局行距改动前该块为 行高 1.0 / 段距 22px，桌面端维持原状；
   窄屏（≤768px）不受影响，仍用放宽后的 1.6 / 14px */
@media (min-width: 769px) {
    .item_content.u-blur p {
        line-height: 1.0;
        margin-bottom: 22px;
    }
}

/* ---------- 窄屏 u-blur 行高 ---------- */
/* 该块嵌在 .item_info 内，会命中 .item_info p 的 line-height: 10px；
   17px 字号下窄屏长句换行时行与行会重叠，这里补一个正常行高。
   单行短文本不受影响，桌面端仍由上方 min-width: 769px 的规则接管。 */
@media (max-width: 768px) {
    .item_content.u-blur p {
        line-height: 1.5;
    }
}
