* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: Arial, "Microsoft YaHei", sans-serif;
  background: #e9e9e9;
  color: #222;
}

.site-shell {
  width: 100%;
  max-width: 720px;
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  overflow: hidden;
}

.site-header {
  background: #fff;
  text-align: center;
  padding: 8px 8px 6px;
  border-bottom: 1px solid #e5e5e5;
}

.site-header h1 {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: #00894f;
  font-weight: 700;
}

/* 1. 顶部展示区域 */
.site2-showcase {
  position: relative;
  width: 100%;
  background: #fff;
  overflow: hidden;
}

.site2-showcase-track {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.site2-showcase-panel {
  display: none;
  width: 100%;
}

.site2-showcase-panel.active {
  display: block;
}

.site2-showcase-panel img {
  display: block;
  width: 100%;
  height: auto;
}

.site2-showcase-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  display: flex;
  justify-content: center;
  gap: 5px;
  pointer-events: none;
}

.site2-showcase-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  pointer-events: auto;
  cursor: pointer;
}

.site2-showcase-dot.active {
  background: #00985a;
}

.site2-showcase-empty {
  padding: 12px 8px;
  text-align: center;
  font-size: 13px;
  color: #999;
  background: #fafafa;
  border-bottom: 1px solid #eee;
}

/* 2. 开奖区空白占位模板 */
.draw-placeholder {
  margin: 0;
  padding: 6px;
  background: #fff;
  border-top: 1px solid #e6e6e6;
  border-bottom: 1px solid #e6e6e6;
}

.draw-placeholder-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 26px;
  padding: 0 6px;
  background: #f8f8f8;
  border: 1px solid #ddd;
  font-size: 12px;
  color: #333;
}

.draw-placeholder-title {
  font-weight: 700;
  color: #00985a;
}

.draw-placeholder-status {
  color: #999;
  font-size: 12px;
}

.draw-placeholder-balls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 0;
}

.draw-ball-empty {
  width: 28px;
  height: 28px;
  display: inline-block;
  border: 2px solid #ddd;
  border-radius: 50%;
  background: #fff;
}

.draw-plus-empty {
  display: inline-block;
  color: #999;
  font-weight: 700;
  font-size: 16px;
}

.draw-placeholder-info {
  display: flex;
  justify-content: center;
  gap: 16px;
  min-height: 22px;
  line-height: 22px;
  font-size: 12px;
  color: #999;
  border-top: 1px dashed #e5e5e5;
}

/* 3. 固定展示图片 */
.site2-media-group {
  margin: 0;
  padding: 0;
  background: #fff;
}

.site2-media-card {
  margin: 0;
  padding: 0;
  line-height: 0;
}

.site2-media-card img {
  display: block;
  width: 100%;
  height: auto;
}

/* 4. 帖子模板列表 */
.post-module {
  margin: 8px 6px 12px;
  background: #fff;
}

.post-module-title {
  height: 32px;
  line-height: 32px;
  background: #0aa35e;
  color: #fff;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid #078c50;
}

.post-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin-top: 4px;
  padding: 3px 10px 3px 6px;
  border: 1px solid #bfbfbf;
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
  color: inherit;
}

.post-left {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  color: #111;
  font-weight: 700;
}

.post-badge {
  display: inline-block;
  flex: 0 0 auto;
  margin-right: 5px;
  padding: 1px 4px;
  color: #fff;
  background: #00a85a;
  border-radius: 3px;
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
  animation: site2BadgeBlink 0.8s infinite;
}

@keyframes site2BadgeBlink {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.25;
  }

  100% {
    opacity: 1;
  }
}

.post-issue {
  display: inline-block;
  margin-right: 2px;
  white-space: nowrap;
}

.post-name {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.post-right {
  flex: 0 0 auto;
  max-width: 120px;
  margin-left: 8px;
  color: #008040;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 公共模板标题图片 */
.template-title-image {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  margin: 0 0 8px;
  padding: 0 85px;
  background-image: url("/static/site2/images/template-title/template2.webp");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% 100%;
  color: #fff6b9;
  font-size: 14px;
  font-weight: 700;
  line-height: 44px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}

.template-title-image span {
  transform: translateY(-5px);
}

/* 5. 图片模板区 */
.pic-template-section {
  margin: 0 0 12px;
  background: #fff;
}

.pic-template-block {
  margin: 0 6px 18px;
  padding: 20px 0 30px;
  background: #fff;
  border-bottom: 8px solid #f1f1f1;
}

.pic-template-item {
  margin: 0;
  padding: 0;
}

.pic-template-item img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #ececec;
  background: #fff;
}

/* 6. 文字模板区 */
.text-template-section {
  margin: 0 0 12px;
  background: #fff;
}

.text-template-card {
  margin: 0 6px 20px;
  padding: 6px 0 14px;
  background: #fff;
  border-bottom: 8px solid #f1f1f1;
}

.template-desc {
  padding: 10px 8px 6px;
  text-align: center;
  font-size: 14px;
  line-height: 1.8;
  color: #222;
}

.template-desc-label {
  color: #287bff;
  font-weight: 700;
}

.wuxing-desc {
  text-align: left;
  padding-left: 10px;
  padding-right: 10px;
  font-size: 13px;
  line-height: 1.75;
}

.wuxing-desc .template-desc-label {
  display: inline-block;
  min-width: 18px;
}

/* 灰框列表样式 */
.box-row-list {
  margin-top: 4px;
}

.box-row-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 78px;
  align-items: center;
  min-height: 28px;
  margin-top: 4px;
  padding: 0 8px;
  border: 2px solid #222;
  border-radius: 5px;
  background: #fefefe;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  column-gap: 4px;
  overflow: hidden;
}

.box-row-issue {
  min-width: 0;
  color: #1f75ff;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.box-row-main {
  min-width: 0;
  color: #ff2a2a;
  font-weight: 700;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.box-row-result {
  min-width: 0;
  color: #1f75ff;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.box-row-list-multiline .box-row-item {
  min-height: 52px;
  padding: 6px 8px;
  white-space: normal;
  overflow: visible;
}

.box-row-list-multiline .box-row-main {
  white-space: pre-line;
}

/* 六肖十二码样式 */
.liu-xiao-12-list {
  border-top: 1px solid #d8d8d8;
}

.liu-xiao-12-group {
  padding: 8px 6px;
  border-bottom: 2px solid #222;
  font-size: 13px;
  line-height: 1.85;
  color: #111;
}

.liu-xiao-12-group div {
  border-bottom: 1px solid #ddd;
}

.liu-xiao-12-group div:last-child {
  border-bottom: 0;
}

.liu-xiao-12-group span {
  color: #111;
  font-weight: 700;
}

.liu-xiao-12-group b {
  color: #ff0000;
  font-weight: 700;
}

/* 橙色表格样式 */
.orange-table-wrap {
  width: 100%;
  overflow-x: hidden;
}

.orange-table {
  width: 100%;
  margin-top: 6px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
  line-height: 1.35;
  background: #fff;
}

.orange-table th,
.orange-table td {
  border: 1px solid #e5e5e5;
  padding: 5px 2px;
  text-align: center;
  vertical-align: middle;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}

.orange-table th {
  background: #f39a00;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.orange-table td {
  color: #ff2a2a;
  font-weight: 700;
}

.orange-table th:nth-child(1),
.orange-table td:nth-child(1) {
  width: 15%;
}

.orange-table th:nth-child(2),
.orange-table td:nth-child(2),
.orange-table th:nth-child(3),
.orange-table td:nth-child(3),
.orange-table th:nth-child(4),
.orange-table td:nth-child(4),
.orange-table th:nth-child(5),
.orange-table td:nth-child(5) {
  width: 17%;
}

.orange-table th:nth-child(6),
.orange-table td:nth-child(6) {
  width: 14%;
}

.orange-table .col-issue {
  color: #ec09d9;
  font-weight: 700;
  white-space: normal;
}

.orange-table .col-result {
  color: #1f75ff;
  font-weight: 700;
  white-space: normal;
}

.orange-table-wide th:nth-child(1),
.orange-table-wide td:nth-child(1) {
  width: 16%;
}

.orange-table-wide th:nth-child(2),
.orange-table-wide td:nth-child(2) {
  width: 64%;
}

.orange-table-wide th:nth-child(3),
.orange-table-wide td:nth-child(3) {
  width: 20%;
}

.orange-table-wide .col-predict {
  color: #ff2a2a;
  font-weight: 700;
  white-space: normal;
}

.template-domain-line {
  margin: 8px 0 0;
  padding: 5px 8px;
  color: #0076ff;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  border-top: 1px dashed #e5e5e5;
}

/* 右下角悬浮按钮 */
.float-actions {
  position: fixed;
  right: 16px;
  bottom: 22px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.float-btn {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  list-style: none;
}

.float-btn strong {
  font-size: 17px;
  line-height: 1;
}

.float-btn span {
  font-size: 11px;
  line-height: 1;
}

.float-btn-top {
  background: #20c463;
}

.float-btn-nav {
  background: #ff9800;
}

.float-btn-notice {
  background: #7c4dff;
}

.float-details {
  position: relative;
}

.float-details summary {
  list-style: none;
}

.float-details summary::-webkit-details-marker {
  display: none;
}

.float-panel {
  position: absolute;
  right: 58px;
  bottom: 0;
  width: 145px;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  color: #333;
  font-size: 12px;
}

.float-nav-panel a {
  display: block;
  padding: 9px 10px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.float-nav-panel a:hover {
  background: #f5f5f5;
  color: #00985a;
}

.float-notice-panel {
  width: 190px;
  max-height: 180px;
  padding: 10px;
  line-height: 1.6;
  color: #008040;
  font-weight: 700;
}

@media (max-width: 430px) {
  .float-actions {
    right: 12px;
    bottom: 20px;
  }
}

/* 详情页 */
.detail-header {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  height: 48px;
  background: #fff;
  border-bottom: 1px solid #efefef;
}

.detail-header h1 {
  margin: 0;
  color: #00a85a;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.detail-back {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  color: #00a85a;
  font-size: 28px;
  line-height: 1;
  text-decoration: none;
  font-weight: 400;
}

.detail-header-placeholder {
  display: block;
}

.detail-page {
  min-height: calc(100vh - 48px);
  padding: 16px 8px;
  background: #fff;
}

.detail-card {
  padding: 14px 12px;
  border: 1px solid #c9f5d9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 168, 90, 0.06);
}

.detail-subtitle {
  margin-bottom: 14px;
  text-align: center;
  color: #00b45c;
  font-size: 15px;
  font-weight: 700;
}

.detail-record-list {
  margin: 0;
  padding: 0;
}

.detail-record-row {
  display: flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px dashed #e6e6e6;
  font-size: 17px;
  font-weight: 700;
}

.detail-record-issue {
  flex: 0 0 auto;
  color: #ff3344;
}

.detail-record-content {
  color: #00152f;
}

.detail-empty {
  padding: 24px 8px;
  border-top: 1px dashed #e6e6e6;
  border-bottom: 1px dashed #e6e6e6;
  color: #999;
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}

.detail-footer-text {
  margin-top: 16px;
  padding: 10px;
  border: 1px solid #c8f3d7;
  border-radius: 6px;
  background: #f0fff6;
  color: #00a85a;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 700;
}

img {
  max-width: 100%;
  height: auto;
}
/* 网站底部固定图片：仅展示，不参与模板生成 */
.bottom-static-images {
  margin: 0 6px 16px;
  padding: 0 0 12px;
  background: #fff;
}

.bottom-static-images img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 10px;
  border: 1px solid #e5e5e5;
  background: #fff;
}

.bottom-static-images img:last-child {
  margin-bottom: 0;
}
/* 网站2文字/帖子规则生成资料：命中项黄底高亮。杀类规则不会写入 hit_items，所以不会高亮。 */
.site2-hit-item {
  display: inline-block;
  padding: 0 2px;
  margin: 0 1px;
  background: #fff100;
  color: #e60012;
  border-radius: 2px;
  font-weight: 800;
}

.text-template-empty {
  margin: 8px 8px 10px;
  padding: 14px 10px;
  border: 1px solid #f0c36d;
  border-radius: 8px;
  background: #fffdf5;
  color: #8a5b00;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
}

/* Clean one-template / four-tab material switcher. Templates are not duplicated; only tab_key changes the generated records. */
.site2-material-tabs{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
  padding:8px;
  background:#fff7d7;
  border:2px solid #e00000;
  border-radius:8px;
  margin:8px 0;
}
.site2-material-tab{
  display:block;
  text-align:center;
  text-decoration:none;
  font-weight:900;
  color:#b00000;
  background:linear-gradient(#fff,#ffe38a);
  border:1px solid #e00000;
  border-radius:999px;
  padding:9px 4px;
  font-size:15px;
}
.site2-material-tab.active{
  color:#fff;
  background:linear-gradient(#ff4b4b,#c40000);
  box-shadow:0 2px 8px rgba(196,0,0,.28);
}


/* ===== 图片模板文字层：site1-site4 统一前台叠加层 ===== */
.lhc-image-layer-template{
    position:relative;
    display:block;
    width:100%;
    overflow:hidden;
}
.lhc-image-layer-base{
    display:block;
    width:100%;
    height:auto;
}
.lhc-image-layer{
    position:absolute;
    box-sizing:border-box;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:1px 2px;
    white-space:pre-line;
    word-break:break-word;
    text-shadow:0 1px 2px rgba(255,255,255,.65);
    pointer-events:none;
}
.lhc-image-layer-img{
    object-fit:contain;
}
@media(max-width:640px){
    .lhc-image-layer{
        padding:0 1px;
        text-shadow:0 1px 1px rgba(255,255,255,.7);
    }
}

/* ===== 图片模板文字层 v4 通用叠加层 ===== */
.lhc-image-layer-template{position:relative;display:block;width:100%;overflow:visible}
.lhc-image-layer-base{display:block;width:100%;height:auto}
.lhc-image-layer{position:absolute;box-sizing:border-box;display:flex;align-items:center;justify-content:center;white-space:pre-line;word-break:break-word;pointer-events:auto}
.lhc-image-layer-img{object-fit:contain}
/* ===== 图片模板文字层 v4.2 通用叠加层 ===== */
.lhc-image-layer-template{position:relative;display:block;width:100%;overflow:visible}
.lhc-image-layer-base{display:block;width:100%;height:auto}
.lhc-image-layer,.lhc-image-fixed-layer{position:absolute;box-sizing:border-box;display:flex;align-items:center;justify-content:center;white-space:pre-line;word-break:break-word;pointer-events:auto}
.lhc-image-layer-img{object-fit:contain}

/* v9.3: desktop uses 720px container; mobile remains fluid. */
.site-shell {
  width: 100%;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.site-shell img,
.site-shell video,
.site-shell canvas {
  max-width: 100%;
}
.float-actions {
  right: 16px;
  bottom: 22px;
}
@media (max-width: 430px) {
  .float-actions {
    right: 12px;
    bottom: 20px;
  }
}

/* v9.5: keep site2 desktop 720px and keep floating buttons at viewport right-bottom. */
.site-shell{width:100% !important;max-width:720px !important;margin-left:auto !important;margin-right:auto !important;}
.site-shell img,.site-shell video,.site-shell canvas{max-width:100%;height:auto;}
.float-actions{position:fixed !important;right:16px !important;bottom:22px !important;left:auto !important;z-index:80 !important;}
@media(max-width:430px){.site-shell{max-width:none !important}.float-actions{right:12px !important;bottom:20px !important}}

/* v20260521: site2 mobile readable fonts + stable layout. */
html, body { max-width:100%; overflow-x:hidden; }
.site-shell { overflow-x:hidden; }
.site-shell img,.site-shell video,.site-shell canvas,.site-shell svg { max-width:100%; height:auto; }
.lhc-image-layer-template { overflow:hidden !important; max-width:100%; }
.text-template-card .box-row-item,
.text-template-card .template-desc,
.text-template-card .template-domain-line,
.text-template-card .liu-xiao-12-group,
.text-template-card .text-template-empty {
  font-size:16px;
  line-height:1.55;
}
.text-template-card .orange-table {
  font-size:14px;
  line-height:1.45;
}
.post-module .post-row,
.post-module .post-module-title {
  font-size:15px;
}
.detail-record-row {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  column-gap:6px;
  align-items:center;
  font-size:18px;
  line-height:1.55;
}
.detail-record-content { min-width:0; overflow-wrap:anywhere; word-break:break-word; }
.detail-record-result { color:#ff3344; font-weight:800; white-space:nowrap; }
@media(max-width:430px){
  .text-template-card .box-row-item,
  .text-template-card .template-desc,
  .text-template-card .template-domain-line,
  .text-template-card .liu-xiao-12-group,
  .text-template-card .text-template-empty { font-size:16px !important; }
  .text-template-card .orange-table { font-size:14px !important; }
  .detail-record-row { font-size:17px !important; grid-template-columns:auto minmax(0,1fr); }
  .detail-record-result { grid-column:2; justify-self:end; }
}

/* image-layer-cross-device-v2 20260615: 图片模板文字层跨设备一致显示，不改后台保存的坐标/字号/颜色 */
html,body{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}
.lhc-image-layer-template[data-lhc-image-layer-template="1"],.lhc-image-layer-template{position:relative!important;display:block!important;width:100%!important;max-width:100%!important;overflow:hidden!important;-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}
.lhc-image-layer-base{display:block!important;width:100%!important;height:auto!important;}
.lhc-image-layer{position:absolute!important;box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important;white-space:pre-line!important;word-break:keep-all!important;overflow-wrap:normal!important;word-wrap:normal!important;line-break:strict!important;max-width:none!important;text-rendering:geometricPrecision;-webkit-font-smoothing:antialiased;}
.lhc-image-layer-text{unicode-bidi:plaintext;}
.lhc-image-layer-img{object-fit:contain!important;}
.lhc-image-fixed-layer{position:absolute!important;box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important;}

/* image-layer-wrap-fix-v4 20260615: 诗词/长句允许换行，号码期数继续不换行 */
.lhc-image-layer-template{
  background:transparent!important;
}
.lhc-image-layer-text[data-layer-key*="poem"],
.lhc-image-layer-text[data-layer-key*="gift"],
.lhc-image-layer-text[data-layer-key*="orange"],
.lhc-image-layer-text[data-layer-key*="explain"],
.lhc-image-layer-text[data-layer-key*="desc"],
.lhc-image-layer-text[data-layer-key*="text"],
.lhc-image-layer-text[data-layer-key="one"],
.lhc-image-layer-text[data-layer-key="e1"],
.lhc-image-layer-text[data-layer-key="e2"],
.lhc-image-layer-text[data-layer-label*="诗"],
.lhc-image-layer-text[data-layer-label*="句"],
.lhc-image-layer-text[data-layer-label*="解释"],
.lhc-image-layer-text[data-layer-label*="说明"],
.lhc-image-layer-text[data-layer-label*="暗藏"],
.lhc-image-layer-text[data-layer-label*="赠"],
.lhc-image-layer-text[data-layer-label*="送区"]{
  white-space:pre-wrap!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
  word-wrap:break-word!important;
  line-break:auto!important;
}

/* image-layer-wrap-final-v5 20260615: 只允许诗词/说明/解释/赠诗等长文字换行 */
.lhc-image-layer-template{
  background:transparent!important;
}
.lhc-image-layer-text[data-long-text="1"]{
  display:block!important;
  white-space:pre-wrap!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
  word-wrap:break-word!important;
  line-break:auto!important;
}

