/* 移动端皮肤：顶部横幅 + 胶囊栏目 + 三彩种 tab + 开奖结果卡。
   主要用于窄屏，但在桌面浏览器里也居中显示成手机宽度。 */

body[data-theme="mobile"] {
  margin: 0;
  background: #d9d9d9;
  color: #222;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body[data-theme="mobile"] .m-shell {
  width: min(480px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
  box-shadow: 0 0 18px rgba(0, 0, 0, .14);
  padding-bottom: 10px;
}

/* 顶部标题条 */
body[data-theme="mobile"] .m-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
}
body[data-theme="mobile"] .m-topbar-back,
body[data-theme="mobile"] .m-topbar-more { color: #8a8a8a; font-size: 15px; }
body[data-theme="mobile"] .m-topbar-titles { flex: 1; min-width: 0; text-align: center; }
body[data-theme="mobile"] .m-topbar-titles strong { display: block; color: #b3161c; font-size: 15px; font-weight: 700; }
body[data-theme="mobile"] .m-topbar-titles small { display: block; margin-top: 2px; color: #9a9a9a; font-size: 11px; }

/* 横幅 */
body[data-theme="mobile"] .m-banner {
  position: relative;
  overflow: hidden;
  padding: 18px 14px 16px;
  background: linear-gradient(135deg, #7d0d12 0%, #b3161c 45%, #6d0a0f 100%);
}
body[data-theme="mobile"] .m-banner-glow {
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 150%;
  background: radial-gradient(circle at 30% 20%, rgba(255, 208, 120, .38), transparent 60%);
  pointer-events: none;
}
body[data-theme="mobile"] .m-banner-text { position: relative; text-align: center; }
body[data-theme="mobile"] .m-banner-title {
  display: block;
  color: #ffe6a8;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: .04em;
  text-shadow: 0 2px 0 #5c0709, 0 4px 12px rgba(0, 0, 0, .45);
}
body[data-theme="mobile"] .m-banner-slogan {
  margin: 6px 0 0;
  color: #ffd98a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .28em;
}
body[data-theme="mobile"] .m-banner-tag {
  display: inline-block;
  margin-top: 9px;
  padding: 3px 10px;
  border: 1px solid rgba(255, 226, 160, .55);
  border-radius: 999px;
  color: #ffe9b8;
  font-size: 11px;
}
body[data-theme="mobile"] .m-banner-balls { position: absolute; right: 6px; bottom: 6px; width: 120px; height: 74px; }
body[data-theme="mobile"] .m-deco {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-style: normal;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  box-shadow: inset 0 -3px 7px rgba(0, 0, 0, .3);
}
body[data-theme="mobile"] .m-deco-1 { top: 2px;  left: 46px; width: 26px; height: 26px; background: #2ea84f; font-size: 11px; }
body[data-theme="mobile"] .m-deco-2 { top: 0;     left: 78px; width: 24px; height: 24px; background: #1f6fd0; font-size: 10px; }
body[data-theme="mobile"] .m-deco-3 { top: 22px;  left: 8px;  width: 16px; height: 16px; background: #b3161c; font-size: 8px; }
body[data-theme="mobile"] .m-deco-4 { top: 24px;  left: 30px; width: 42px; height: 42px; background: radial-gradient(circle at 34% 30%, #ff6a5e, #c00f16); font-size: 20px; }
body[data-theme="mobile"] .m-deco-5 { top: 8px;   left: 96px; width: 20px; height: 20px; background: #1f6fd0; font-size: 9px; }
body[data-theme="mobile"] .m-deco-6 { top: 46px;  left: 70px; width: 22px; height: 22px; background: #d4a017; font-size: 9px; }

/* 友情文字入口 */
body[data-theme="mobile"] .m-text-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 8px 4px;
  border-bottom: 1px solid #ecd9b8;
  background: #fffdf6;
}
body[data-theme="mobile"] .m-text-links a {
  padding: 4px 2px;
  color: #b3161c;
  font-size: 11px;
  text-align: center;
  text-decoration: none;
}
body[data-theme="mobile"] .m-text-links a:hover { text-decoration: underline; }

/* 胶囊栏目 */
body[data-theme="mobile"] .m-pills {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  padding: 8px 7px;
}
body[data-theme="mobile"] .m-pill {
  display: grid;
  place-items: center;
  min-height: 30px;
  padding: 4px 2px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #3f92e6, #2469c4);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}
body[data-theme="mobile"] .m-pill:hover { background: linear-gradient(180deg, #4ea1f2, #2b76d6); }
body[data-theme="mobile"] .m-pill-alert { color: #8a5a00; background: linear-gradient(180deg, #fdf0c4, #f6df95); }
body[data-theme="mobile"] .m-pill-alert:hover { background: linear-gradient(180deg, #fdf5d6, #f3d885); }

/* 黑条入口 */
body[data-theme="mobile"] .m-blackbars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 0 7px 8px;
}
body[data-theme="mobile"] .m-blackbars a {
  padding: 9px 4px;
  color: #e8353d;
  background: #000;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

/* 彩种 tab */
body[data-theme="mobile"] .m-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 7px 8px;
  border: 1px solid #e2e2e2;
}
body[data-theme="mobile"] .m-tab {
  padding: 11px 4px;
  color: #555;
  background: #f5f5f5;
  font-size: 13px;
  text-align: center;
  text-decoration: none;
  border-right: 1px solid #e2e2e2;
}
body[data-theme="mobile"] .m-tab:last-child { border-right: 0; }
body[data-theme="mobile"] .m-tab.active { color: #fff; background: #3aa757; font-weight: 700; }

/* 本期开奖结果 */
body[data-theme="mobile"] .m-result { padding: 0 10px 12px; }
body[data-theme="mobile"] .m-result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 7px;
  border-bottom: 2px solid #e9e9e9;
}
body[data-theme="mobile"] .m-result-head h2 { margin: 0; color: #2f9e4f; font-size: 15px; }
body[data-theme="mobile"] .m-result-history { color: #b3161c; font-size: 12px; text-decoration: none; }
body[data-theme="mobile"] .m-result-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px;
  padding: 9px 0 7px;
  color: #333;
  font-size: 12px;
}
body[data-theme="mobile"] .m-balls {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) 20px minmax(0, 1fr);
  gap: 4px;
  align-items: start;
}
body[data-theme="mobile"] .m-ball-slot { display: grid; gap: 3px; justify-items: center; min-width: 0; }
body[data-theme="mobile"] .m-ball {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 44px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .38);
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, .26);
}
body[data-theme="mobile"] .m-ball-red { background: radial-gradient(circle at 34% 28%, #ff5b56, #cf1017); }
body[data-theme="mobile"] .m-ball-blue { background: radial-gradient(circle at 34% 28%, #5b9dfa, #12489f); }
body[data-theme="mobile"] .m-ball-green { background: radial-gradient(circle at 34% 28%, #4ecb6d, #0a7a2c); }
body[data-theme="mobile"] .m-ball-unknown { background: radial-gradient(circle at 34% 28%, #9aa5a0, #5d6a63); }
body[data-theme="mobile"] .m-ball-meta { color: #666; font-size: 11px; white-space: nowrap; }
body[data-theme="mobile"] .m-plus {
  display: grid;
  place-items: center;
  align-self: center;
  color: #f0a02a;
  font-size: 20px;
  font-weight: 900;
}
body[data-theme="mobile"] .m-result-status { margin: 10px 0 0; color: #b3161c; font-size: 13px; font-weight: 700; }
body[data-theme="mobile"] .m-next {
  margin: 6px 0 0;
  padding-top: 7px;
  border-top: 1px solid #eee;
  color: #666;
  font-size: 12px;
}

/* 栏目标题条 + 表格 */
body[data-theme="mobile"] .m-block { margin: 0 0 12px; }
body[data-theme="mobile"] .m-block-head {
  margin: 0;
  padding: 9px 12px;
  color: #fff;
  background: #2f9e4f;
  font-size: 15px;
  font-weight: 700;
}
body[data-theme="mobile"] .m-table-wrap { padding: 8px; background: #fff; }
body[data-theme="mobile"] .m-table {
  width: 100%;
  border-collapse: collapse;
  background: #fdf6dc;
  font-size: 12px;
}
body[data-theme="mobile"] .m-table th,
body[data-theme="mobile"] .m-table td {
  padding: 10px 8px;
  border: 1px solid #e3d9a8;
  text-align: center;
  vertical-align: top;
}
body[data-theme="mobile"] .m-table thead th { color: #7a5a00; background: #f7ecc4; font-weight: 700; }
body[data-theme="mobile"] .m-table-period { color: #b3161c; font-weight: 700; white-space: nowrap; }
body[data-theme="mobile"] .m-table-body { color: #8a3b12; font-weight: 700; line-height: 1.6; }
body[data-theme="mobile"] .m-table-result { color: #b3161c; white-space: nowrap; }
body[data-theme="mobile"] .m-block-more {
  display: block;
  padding: 8px 12px 0;
  color: #b3161c;
  font-size: 12px;
  text-align: right;
  text-decoration: none;
}

body[data-theme="mobile"] .m-article-list { padding: 8px; }
body[data-theme="mobile"] .m-article { padding: 10px; border: 1px solid #eee; background: #fff; margin-bottom: 8px; }
body[data-theme="mobile"] .m-article-meta {
  display: flex;
  justify-content: space-between;
  color: #999;
  font-size: 11px;
}
body[data-theme="mobile"] .m-article h3 { margin: 6px 0 4px; color: #222; font-size: 14px; }
body[data-theme="mobile"] .m-article p { margin: 0; color: #555; font-size: 12px; line-height: 1.7; }

body[data-theme="mobile"] .m-daily { padding: 10px 12px; background: #fff; }
body[data-theme="mobile"] .m-daily-numbers { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
body[data-theme="mobile"] .m-daily-numbers .m-ball { width: 34px; font-size: 14px; }
body[data-theme="mobile"] .m-daily-note { margin: 9px 0 0; color: #888; font-size: 11px; }

body[data-theme="mobile"] .m-empty {
  margin: 0;
  padding: 14px 12px;
  color: #999;
  font-size: 12px;
  text-align: center;
}
body[data-theme="mobile"] .m-disclaimer {
  margin: 0;
  padding: 12px 12px 4px;
  color: #999;
  font-size: 11px;
  line-height: 1.7;
}
body[data-theme="mobile"] .m-footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-top: 1px solid #eee;
  color: #aaa;
  font-size: 11px;
  text-align: center;
}

/* 移动端皮肤下的内页（历史 / 每日参考号 / 栏目页）统一成同一种观感 */
body[data-theme="mobile"] .site-header,
body[data-theme="mobile"] .site-footer {
  width: min(480px, 100%);
  margin: 0 auto;
  background: #fff;
}
body[data-theme="mobile"] .site-header { border-bottom: 1px solid #e6e6e6; }
body[data-theme="mobile"] .brand-mark { color: #fff; background: #b3161c; }
body[data-theme="mobile"] .main-nav a.active,
body[data-theme="mobile"] .main-nav a:hover { color: #b3161c; border-color: #b3161c; }
body[data-theme="mobile"] .history-page,
body[data-theme="mobile"] .material-shell,
body[data-theme="mobile"] .daily-page {
  width: min(480px, calc(100% - 0px));
  margin: 8px auto 20px;
}
body[data-theme="mobile"] .history-years .history-year-button.active,
body[data-theme="mobile"] .history-year-button.active { color: #fff; background: #3aa757; border-color: #3aa757; }
body[data-theme="mobile"] .page-shell { width: min(480px, 100%); margin: 10px auto 20px; }
