
  * { box-sizing: border-box;}
  .box { 
    position: relative;
    background-color: #0f0d1a; 
    color: #ccc;
    font-family: 'Microsoft YaHei', sans-serif;
    margin: 5 auto;
  }
  
  .boxcontainer { 
    position: relative;
    max-width: 100%;
  }
  
  .boxheader { 
    margin: 5px auto; 
    background: #16142a;
    border-radius: 6px;
    border: 1px solid #444;
    text-align: center; 
    line-height: 0.5;
  }
  
  .palace-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 8px;
    counter-reset: palace;
  }
  
  .palace {
    height: 200px;
    position: relative;
    background: #16142a;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #444;
  }
  
  .outer-palace {
    border: 1px dashed #444;
  }
  
  .palace-content {
    display: grid;
    grid-template-rows: 1fr 1fr 1fr;
    height: 100%;
    position: relative;
    font-size: 0.8rem;
  }
  
  .palace-title {
    position: absolute;
    top: 3px;
    right: 2px;
    font-size: 0.9rem;
    z-index: 10;
    display: flex;
    align-items: center;
  }
  
  .palace-name {
    font-weight: bold;
    margin-right: 1px;
  }
  
  .palace-direction {
    font-size: 0.7rem;
    color: #888;
  }
  
  .shen-position { 
    grid-row: 1;
    display: grid;
    justify-content: center;
    align-items: center;
    height: 30px;
    font-weight: bold;
  }
  
  .shen-position .zhifu {
    color: #00BCD4;
  }
  
  .star-position {
    grid-row: 2;
    display: grid;
    grid-template-columns: 25% 50% 25%;
    align-items: center;
    height: 30px;
  }
  
  .door-position {
    grid-row: 3;
    display: grid;
    grid-template-columns: 25% 50% 25%;
    align-items: center;
    height: 30px;
  }
  
  .dark-gan {
    color: #666;
    font-size: 0.8rem;
    text-align: left;
    padding-left: 1px;
  }
  
   .centerdark-gan {
    position: absolute;
    font-size: 0.8rem ;
    color: #666;
    display: block;
    line-height: 1.1;
    top: 33%;
    right: 20px;
    text-align: right;
  }
  
  .tianpan-container, .dipan-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
  }
  
  .tianpan-gan, .dipan-gan {
    display: flex;
    position: relative;
  }
  
  /* 寄干样式 */
  .ji-gan {
    font-size: 0.8rem;
    color: #fff;
    display: block;
    line-height: 1.1;
    margin-top: 1px;
    padding-right: 9px;
  }
  
  .wangshuai {
    text-align: left;
    padding-left: 2px;
    font-size: 0.8rem;
    color: #aaa;
  }
  
  .center-content {
    text-align: center;
    font-weight: bold;
  }
  
  .status-mark {
    position: absolute;
    font-size: 0.55rem;
    padding: 1px 1px;
    border-radius: 2px;
    top: -15px;
    color: white;
  }
  
  .xing-mark { background: #F44336; left: 0; }
  .po-mark { background: #9C27B0; left: 10px; }
  
  .horse-mark {
    position: absolute;
    top: 2px;
    left: 25px;
    font-size: 0.55rem;
    padding: 0px 1px;
    border-radius: 2px;
    background: #2196F3;
    color: white;
  }
  
  .empty-circle {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border: 1px solid #33f7c5;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.4rem;
    color: #33f7c5;
    z-index: 5;
  }
  
  .tomb-mark {
    color: #a433ff !important;
    font-weight: bold;
    font-size: 0.6rem;
  }
  .tomb-mark2 {
    color: #888 !important;
    font-size: 0.6rem;
  }
  
  .day-gan {
    color: #e60000;
  }

  .hour-gan {
    color: #ff66cb;
  }
  
  .center-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    font-size: 0.75rem;
    text-align: left;
    padding: 2px;
  }
  
  .center-info-item {
    margin: 2px 0;
    line-height: 1.2;
  }
  
  .dipan-container-center {
    position: absolute;
    font-size: 0.8rem ;
    color: #fff;
    display: block;
    line-height: 1.1;
    top: 57%;
    right: 10px;
    text-align: right;
  }

    .palace-footer {
    grid-row: 4;
    display: grid;
    margin-bottom: 3px;
    align-items: center;
    display: flex;
justify-content: space-between;
    font-size: 0.5rem;
    color: #888;
    height: 40px;
  }
  
  .number-list {
    position: absolute;
    top: 25px;
    left: 2px;
    font-size: 0.6rem;
    color: #888;
    text-align: left;
    padding-left: 1px;
  }
  
  .pattern-list {
    text-align: center;
    max-height: 40px;
    overflow: hidden;
    line-height: 1;
  }
  
  .pattern-list div {
    line-height: 1.2;
  }
  
  @media (max-width: 480px) {
    .palace-grid { grid-gap: 5px; }
    .palace { height: 150px; padding: 2px; }
    .palace-content { font-size: 0.75rem; }
    .shen-position, .star-position, .door-position { height: 24px; }
    .center-info { font-size: 0.65rem; }
    .palace-footer {font-size: 0.5rem;}
  }

/* 模态框样式 */
.boxmodal {
  display: none;
  margin:5px auto;
}

.boxmodal-content {
  background-color: #1a1a1a;
  border: 1px solid #444;
  width: 100%;
  font-size: 14px;
  border-radius: 5px;
  position: relative;
  line-height: 1.3;
  color: #eee;
  padding-left: 5px;
  padding-right: 3px;
}

.boxmodal-title {
  top:10px;
  font-size: 16px;
  font-weight: bold;
  position: relative;
  color: #eee;
  line-height: 1.3;
}

.boxclose {
  color: #aaa;
  position: absolute;
  font-size: 28px;
  font-weight: bold;
  top:0px;
  left:92%;
}

.boxclose:hover {
  color: white;
}

/* 可点击元素样式 */
.clickable {
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 1px dashed #666;
}

.clickable:hover {
  color: #ffcc00;
  border-bottom: 1px solid #ffcc00;
}

.pattern-item {
  margin-bottom: 1px;
}

.showdoff
{
	display:block;
}

.xsstyle{
position: absolute;
display: flex;
left: 85%;
top:80px;
transform: translate(-50%);
}
.xs-btn {
    padding: 8px 8px;
    background: #00757f;
	border: 0;
    color: white;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 300;
    cursor: pointer;
    transition: background 0.2s;
    width: 50px;
}

.xsstyle2{
position: relative;
 justify-content: center;
display: flex;
left: 50%;
top:-5px;
transform: translate(-50%);
}
.xs-btn2 {
    padding: 10px 10px;
    background: #00757f;
    color: white;
    border: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 300;
	text-align:center;
    cursor: pointer;
    transition: background 0.2s;
    width: 85vw;
}

.xs-btn3 {
    padding: 10px 10px;
    background: #002b37;
    color: white;
    border: 1;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 300;
	text-align:center;
    cursor: pointer;
    transition: background 0.2s;
    width: 85vw;
}

.picker-container {
    position: relative;
    display: flex;
    top:0vh;
    left: 50%;
    width: 85vw;
    gap: 2vw;
    justify-content: center;
    margin: 3vh 0;
    background: #0c0b19;
    padding:  2vw;
    border-radius: 12px;
    border: 1px solid #606060;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transform: translate(-50%);
}

.scroll-picker {
    flex: 1;
    height: 120px; /* 3组数字高度：3*60px */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #606060;
    border-radius: 8px;
    background: #002b37;
    position: relative;
}

.scroll-picker.year-picker {
    flex: 1.5; /* 年份宽度是其他的2倍 */
}

.scroll-picker::-webkit-scrollbar {
    display: none;
}

.picker-item {
    height: 40px; /* 单组数字高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #b0b0b0;
    transition: all 0.2s;
}

.picker-item.active {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    background: #00757f;
}

.picker-item.placeholder {
    color: #555555;
    visibility: visible;
    textContent: ' '; /* 仅显示一个空格占位 */
}

.pic {  position: relative;
         top:1px;
            width: 60vw;
            height: auto;
			max-width:400;
            display: block;
            justify-content: center;
            align-items: center;
            margin: 0 auto;
            overflow: hidden;
        }
