/* ===== 多彩星图 · 首页（选彩种）+ 样式库 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  background: #EEF2F6; color: #12335C; font-size: 14px; line-height: 1.5;
  display: flex; flex-direction: column;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1100px 520px at 12% -6%, #DCEAF8 0%, rgba(220,234,248,0) 62%),
    radial-gradient(900px 480px at 92% 4%, #FBE6DC 0%, rgba(251,230,220,0) 60%),
    linear-gradient(180deg, #F3F6FA 0%, #E8EDF3 100%);
}

/* ===== 顶栏 ===== */
.home-head {
  position: relative; flex: none; padding: 26px 28px 18px; display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
}
.home-head .brand { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 700; letter-spacing: 2px; color: #0B4E93; }
.home-head .brand img { width: 34px; height: 34px; border-radius: 8px; }
.home-head h1 { font-size: 30px; font-weight: 700; letter-spacing: 4px; color: #163A66; }
.home-head .sub { margin-left: auto; font-size: 13px; color: #6C87A6; letter-spacing: 1px; }

/* ===== 默认入口（电视走势图版） ===== */
.default-entry {
  max-width: 1280px; margin: 4px 0 20px; background: #fff;
  border: 1px solid #D7E1EC; border-left: 5px solid #0B4E93; border-radius: 14px;
  padding: 15px 18px 16px; box-shadow: 0 2px 10px rgba(20,50,90,.07);
  display: flex; flex-direction: column; gap: 12px;
}
.de-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.de-tag {
  font-size: 12px; font-weight: 700; color: #fff; background: #0B4E93;
  padding: 2px 10px; border-radius: 11px; letter-spacing: 1px; white-space: nowrap;
}
.de-name { font-size: 19px; font-weight: 700; color: #163A66; letter-spacing: 1px; }
.de-desc { font-size: 12px; color: #7C93AE; margin-left: auto; }
.de-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.de-pills { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.de-pill {
  font-size: 13px; color: #2A5C96; background: #F5F8FC; border: 1px solid #C9D9EA;
  padding: 6px 15px; border-radius: 16px; cursor: pointer; font-family: inherit; min-height: 34px;
}
.de-pill.on { background: #0B4E93; border-color: #0B4E93; color: #fff; font-weight: 600; }
.de-go {
  flex: none; text-decoration: none; font-size: 15px; font-weight: 700; color: #fff;
  background: linear-gradient(90deg, #0B4E93, #1E6FB8); padding: 10px 24px; border-radius: 22px;
  box-shadow: 0 3px 10px rgba(11,78,147,.25);
}
@media (max-width: 520px) {
  .de-desc { margin-left: 0; width: 100%; }
  .de-pill { padding: 6px 12px; }
  .de-go { width: 100%; text-align: center; padding: 12px 24px; }
}

/* ===== 彩种卡片 ===== */
.home-main { flex: 1; padding: 6px 28px 30px; }
/* minmax(min(300px,100%),1fr)：窄屏时下限跟随容器，避免 320px 以下被硬撑破 */
.type-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 18px; max-width: 1280px;
}
.type-card {
  display: block; text-decoration: none; color: inherit; background: #fff;
  border: 1px solid #D7E1EC; border-radius: 14px; padding: 18px 18px 16px;
  box-shadow: 0 2px 8px rgba(20,50,90,.06); transition: transform .16s, box-shadow .16s, border-color .16s;
  position: relative; overflow: hidden;
}
.type-card::before {
  content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--c), var(--a));
}
.type-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(20,50,90,.16); border-color: var(--c); }
.tc-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.tc-name { font-size: 22px; font-weight: 700; color: var(--c); letter-spacing: 2px; }
.tc-badge { font-size: 12px; color: #7C93AE; margin-left: auto; }
.tc-balls { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 30px; }
.tb-ball {
  width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 700;
}
.tb-ball.r { background: radial-gradient(circle at 35% 28%, #E8485C, #C8102E 72%); }
.tb-ball.b { background: radial-gradient(circle at 35% 28%, #5B8FD6, #1E5FA8 72%); }
.tc-issue { font-size: 12px; color: #8AA0BA; margin-left: 6px; }
.sk { font-size: 13px; color: #9AAEC6; }
.tc-meta { margin-top: 14px; padding-top: 11px; border-top: 1px dashed #DCE4EE; display: flex; flex-direction: column; gap: 3px; }
.tc-stylecount { font-size: 12px; color: var(--c); font-weight: 600; }
.tc-stylelist { font-size: 12px; color: #7C93AE; line-height: 1.6; }

.home-foot {
  flex: none; padding: 12px 28px; font-size: 12px; color: #8AA0BA; text-align: center; border-top: 1px solid #DCE4EE;
}

/* ===== 样式库 ===== */
.gal-head {
  flex: none; padding: 20px 26px 14px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.gal-head .brand { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: #0B4E93; text-decoration: none; letter-spacing: 2px; }
.gal-head .brand img { width: 28px; height: 28px; border-radius: 7px; }
.gal-head h1 { font-size: 24px; font-weight: 700; letter-spacing: 2px; }
.gal-head .back { font-size: 13px; color: #6C87A6; text-decoration: none; margin-left: auto; }
.gal-head .back:hover { color: #0B4E93; }
.gal-tabs { flex: none; display: flex; gap: 8px; padding: 0 26px 12px; flex-wrap: wrap; }
.gal-tabs a {
  font-size: 13px; text-decoration: none; color: #2A5C96; background: #fff; border: 1px solid #C9D9EA;
  padding: 5px 16px; border-radius: 15px;
}
.gal-tabs a.on { background: #0B4E93; border-color: #0B4E93; color: #fff; font-weight: 600; }
.gal-default {
  display: inline-flex; align-items: center; margin: 0 26px 14px; text-decoration: none;
  font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(90deg, #0B4E93, #1E6FB8); padding: 9px 18px; border-radius: 20px;
  box-shadow: 0 3px 10px rgba(11,78,147,.22);
}

.gal-main { flex: 1; padding: 0 26px 30px; }
/* 同上：窄屏时列宽下限跟随容器，320px 以下不再横向溢出 */
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 18px; max-width: 1420px; }
.style-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid #D7E1EC; border-radius: 14px;
  overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 2px 8px rgba(20,50,90,.06);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.style-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(20,50,90,.16); border-color: #0B4E93; }
.preview {
  height: 176px; overflow: hidden; background: #F7FAFD; border-bottom: 1px solid #E3EAF2; position: relative;
}
.preview .pv-inner { position: absolute; left: 0; top: 0; transform-origin: top left; }
.style-info { padding: 12px 15px 14px; display: flex; flex-direction: column; gap: 5px; }
.style-info .si-name { font-size: 16px; font-weight: 700; color: #163A66; }
.si-flag {
  display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: #C8102E;
  padding: 1px 8px; border-radius: 9px; margin-left: 8px; vertical-align: 2px; letter-spacing: 1px;
}
.style-info .si-desc { font-size: 12px; color: #7C93AE; line-height: 1.6; }
.style-info .si-src { font-size: 11px; color: #A6B7CB; }
.style-card:hover .si-name { color: #0B4E93; }

/* ========== 遥控器焦点环（2026-10-26）==========
 * 仅键盘/遥控器操作（body.rf）时显示；鼠标点击不留痕。
 * 首页/样式库共用本文件，卡片、页签、按钮统一金色高亮。 */
body.rf :is(a, button, select):focus {
  outline: 3px solid #FFC93C;
  outline-offset: 3px;
  border-radius: 10px;
  box-shadow: 0 0 0 6px rgba(255, 201, 60, .28);
}
body.rf .type-card:focus,
body.rf .style-card:focus { transform: scale(1.03); transition: transform .12s; }

/* 首页头部「开奖数据」入口（2026-10-26） */
.head-link { position:absolute; top:16px; right:16px; color:#0B4E93; font-size:13px; text-decoration:none;
  background:rgba(11,78,147,.10); padding:6px 12px; border-radius:14px; font-weight:600; }
