/* U3a 首页视觉对齐：深蓝页头、滑动广告、竞技状态三栏与带图资讯列表。
   参考图 docs/design-references/home-candidate-3-20260909.png；素材只用纯 CSS 与内联 SVG。
   2026-09-14 品牌色由绿改蓝：本文件 --home-* 令牌全部改为深海军蓝族（#002080／#001040／
   #e8f0fb／#0b2a63），语义状态色（进行中等）另走 --ok-bg／--ok-ink 保留绿色。 */
.home-page{
  min-height:100%;
  color:var(--ink);
  background:#fafbfe;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","HarmonyOS Sans SC","Microsoft YaHei",sans-serif;
  --home-brand:#002080;
  --home-brand-deep:#001040;
  --home-mint:#e8f0fb;
  --home-mint-ink:#0b2a63;
  --home-amber:#fff4e0;
  --home-amber-ink:#a9660a;
  --home-muted:#6d746e;
  --home-line:#e8ecf4;
  --home-card:#fff;
}
.home-page *{box-sizing:border-box;font-family:inherit}
.home-page button{font:inherit}
.home-page main{padding:0 0 18px}

/* 顶栏：深蓝底、金色黑桃、白字，无额外装饰线 */
.home-header{
  min-height:52px;
  padding:0 17px;
  display:flex;
  align-items:center;
  color:#fff;
  background:var(--home-brand);
}
/* 品牌栏：平台改名后共 19 字，18px 在 320/390 都会溢出。字号按宽度自适应
   （390 正常、320 缩小），一行放不下走省略号；完整名称在 title／aria-label（realm/home.js）。 */
.home-brand{display:flex;flex:1;align-items:center;gap:9px;min-width:0;font-size:13px;font-weight:800;letter-spacing:0}
@media (min-width:361px){ .home-brand{font-size:15px;letter-spacing:.01em} }
@media (min-width:430px){ .home-brand{font-size:16px;letter-spacing:.02em} }
.home-brand .ico{width:19px;height:19px;flex:none;color:#e9cd85}
.home-brand span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.home-competitive,.home-news{margin:0;background:var(--home-card)}
.home-competitive{padding:15px 16px 14px;border-bottom:1px solid var(--home-line)}
.home-news{padding:14px 14px 18px}
.home-section-title{
  min-height:34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.home-section-title>div{min-width:0}
.home-section-title h1,.home-section-title h2{margin:0;font-size:18px;font-weight:800;line-height:1.25;letter-spacing:.01em}
.home-section-title h2 a{color:inherit;text-decoration:none}
.home-status-user{color:var(--home-brand-deep)}
/* 参考图：标题行下方一条细分隔线，再开始三栏数值 */
.home-status-head{padding-bottom:10px;border-bottom:1px solid var(--home-line)}
.home-section-title>button,.home-section-title>a{
  min-height:32px;
  padding:0;
  display:inline-flex;
  align-items:center;
  border:0;
  color:var(--home-mint-ink);
  background:transparent;
  font-size:12.5px;
  font-weight:700;
  text-decoration:none;
  white-space:nowrap;
  cursor:pointer;
}

.home-profile-guest{
  min-height:70px;
  margin-top:12px;
  padding:11px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid #dbe0ea;
  border-radius:14px;
  background:var(--home-mint);
}
.home-profile-guest>div{min-width:0;display:flex;flex-direction:column;gap:4px}
.home-profile-guest b{font-size:15px;line-height:1.35}
.home-profile-guest span{color:var(--home-muted);font-size:12px;line-height:1.5}
.home-profile-guest>button{
  min-width:62px;
  min-height:44px;
  padding:0 14px;
  flex:none;
  border:0;
  border-radius:12px;
  color:#fff;
  background:var(--home-brand);
  font-weight:700;
  cursor:pointer;
}
.home-unplayed{
  margin:12px 0 0;
  padding:9px 12px;
  border-radius:10px;
  background:var(--home-mint);
  color:var(--home-mint-ink);
  font-size:12.5px;
  line-height:1.4;
}

/* 我的竞技状态：三栏数值 + 分隔细线（对齐参考图） */
.home-metrics{
  margin-top:12px;
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  background:transparent;
}
.home-metric{
  min-width:0;
  min-height:66px;
  padding:4px 6px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  border:0;
  border-right:1px solid var(--home-line);
  color:var(--ink);
  background:transparent;
  text-align:center;
  cursor:pointer;
}
.home-metric:last-child{border-right:0}
.home-metric small{color:var(--home-muted);font-size:12.5px;line-height:1.2}
.home-metric strong{
  max-width:100%;
  color:var(--home-brand-deep);
  font-size:28px;
  font-weight:800;
  line-height:1.15;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.home-metric-long strong{font-size:23px}
.home-metric:active{background:#f2f6fc}

/* 成长进度：左标签、右提示、下方圆角进度条 */
.home-tier-goal,.home-tier-note{margin-top:14px}
.home-growth-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px}
.home-growth-head span{color:var(--home-muted);font-size:12.5px}
.home-growth-head b{color:var(--home-brand-deep);font-size:14.5px;font-weight:800}
.home-growth-note{display:block;color:var(--home-muted);font-size:11.5px;line-height:1.35}
.home-growth-head .home-growth-note{margin:0 0 0 auto;text-align:right}
.home-progress{height:8px;margin-top:9px;overflow:hidden;border-radius:999px;background:#e5eaf4}
.home-progress i{display:block;height:100%;border-radius:inherit;background:var(--home-brand)}
.home-tier-note{padding:11px 12px;display:flex;flex-direction:column;gap:4px;border:1px solid #f0e3c6;border-radius:12px;background:var(--home-amber)}
.home-tier-note b{color:var(--home-amber-ink);font-size:13.5px}
.home-tier-note span{color:var(--home-muted);font-size:12.5px;line-height:1.45}

.home-state{
  min-height:68px;
  margin-top:12px;
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-radius:12px;
  background:#f6f8fc;
  color:var(--home-muted);
  font-size:13px;
  line-height:1.45;
}
.home-state-error{color:var(--red);background:#fdf3f1}
.home-retry{
  min-width:62px;
  min-height:44px;
  padding:0 13px;
  flex:none;
  border:1px solid currentColor;
  border-radius:12px;
  color:var(--home-brand-deep);
  background:#fff;
  font-weight:700;
  cursor:pointer;
}

/* 平台资讯：标题与分段筛选同一行，当前项下划线 */
.home-news-head{align-items:center}
.home-news-tabs{display:flex;align-items:center;gap:16px;flex:none}
.home-news-tabs button{
  position:relative;
  min-width:0;
  min-height:40px;
  padding:0 2px;
  border:0;
  color:var(--home-muted);
  background:transparent;
  font-size:12.5px;
  font-weight:650;
  white-space:nowrap;
  cursor:pointer;
}
.home-news-tabs button.active{color:var(--home-brand-deep);font-weight:800}
.home-news-tabs button.active:after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:5px;
  height:3px;
  border-radius:2px;
  background:var(--home-brand);
}
.home-news-list{margin-top:4px}
.home-news-card{
  min-width:0;
  padding:14px 0;
  display:flex;
  align-items:center;
  gap:12px;
  border-bottom:1px solid var(--home-line);
}
.home-news-card:last-child{border-bottom:0}
.home-news-copy{min-width:0;flex:1}
.home-news-meta{min-width:0;display:flex;align-items:center;gap:8px}
.home-news-kind{
  flex:none;
  padding:2px 7px;
  border-radius:6px;
  background:var(--home-mint);
  color:var(--home-mint-ink);
  font-size:11px;
  font-weight:800;
  line-height:1.35;
}
.home-news-meta>small{min-width:0;color:#8b918c;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.home-news-title{
  display:-webkit-box;
  margin-top:7px;
  overflow:hidden;
  color:var(--ink);
  font-size:15.5px;
  font-weight:800;
  line-height:1.35;
  text-decoration:none;
  overflow-wrap:anywhere;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.home-news-card p{
  display:-webkit-box;
  margin:5px 0 0;
  overflow:hidden;
  color:var(--home-muted);
  font-size:12px;
  line-height:1.45;
  overflow-wrap:anywhere;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
/* 缩略图：真实封面在上，无封面或加载失败时露出内联 SVG 占位封面，不留空 */
.home-news-thumb{
  position:relative;
  width:124px;
  height:72px;
  flex:0 0 124px;
  overflow:hidden;
  border-radius:10px;
  background:linear-gradient(135deg,#002080,#001040);
}
.home-news-ph{position:absolute;inset:0;display:block}
.home-news-ph svg{display:block;width:100%;height:100%}
.home-news-ph-accent{fill:#7fa9e8;opacity:.85}
.home-news-thumb.announcement .home-news-ph-accent{fill:#e0b45f}
.home-news-thumb.result .home-news-ph-accent{fill:#8fc9d6}
.home-news-thumb.region .home-news-ph-accent{fill:#c9a86a}
.home-news-cover{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  background:#1c3a72;
}
.home-more{
  width:100%;
  min-height:46px;
  margin-top:12px;
  border:1px solid #d7dce6;
  border-radius:12px;
  color:var(--home-brand-deep);
  background:#fff;
  font-weight:700;
  cursor:pointer;
}
.home-more:disabled{color:#8c928d;cursor:default}
.home-more-error{
  min-height:54px;
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-radius:12px;
  background:#fdf3f1;
  color:var(--red);
  font-size:12.5px;
}
.home-more-error button{
  min-width:82px;
  min-height:44px;
  padding:0 10px;
  flex:none;
  border:1px solid currentColor;
  border-radius:12px;
  color:var(--home-brand-deep);
  background:#fff;
  font-weight:700;
  cursor:pointer;
}

@media(max-width:370px){
  .home-header{padding-left:13px;padding-right:13px}
  .home-competitive,.home-news{padding-left:12px;padding-right:12px}
  .home-section-title h1,.home-section-title h2{font-size:17px}
  .home-metric{padding-left:2px;padding-right:2px}
  .home-metric strong{font-size:24px}
  .home-metric-long strong{font-size:19px}
  .home-news-tabs{gap:12px}
  .home-news-tabs button{font-size:12px}
  .home-news-card{gap:10px}
  .home-news-thumb{width:104px;height:62px;flex-basis:104px}
}
@media(min-width:420px){
  .home-header{padding-left:19px;padding-right:19px}
  .home-competitive,.home-news{padding-left:17px;padding-right:17px}
  .home-news-thumb{width:136px;height:78px;flex-basis:136px}
}

/* U3b 首页滑动广告：自动轮播 + 手指拖动 + 圆点指示器。公开接口为空或失败时不渲染该区域。 */
.home-promotions{position:relative;padding:12px 12px 14px;background:#fafbfe}
.home-promotion-viewport{position:relative;overflow:hidden;border-radius:14px;background:#102446;box-shadow:0 8px 20px rgba(8,18,44,.14)}
.home-promotion-track{display:flex;align-items:stretch;transition:transform .42s cubic-bezier(.22,.61,.36,1);will-change:transform}
.home-promotion-card{position:relative;flex:0 0 100%;min-width:100%;min-height:132px;aspect-ratio:405/156;display:block;overflow:hidden;color:#fff;text-decoration:none}
.home-promotion-cover{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:cover;background:#1b2f5c}
.home-promotion-shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(4,12,32,.88) 0%,rgba(4,12,32,.6) 48%,rgba(4,12,32,.1) 84%),linear-gradient(180deg,transparent 46%,rgba(4,12,32,.32))}
.home-promotion-copy{position:absolute;left:15px;right:34%;top:13px;bottom:13px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.home-promotion-copy small{padding:4px 10px;border-radius:999px;background:#f7dc95;color:#7c4d11;font-size:11.5px;font-weight:800;line-height:1.3}
.home-promotion-copy strong{
  display:-webkit-box;
  overflow:hidden;
  font-size:26px;
  font-weight:800;
  line-height:1.24;
  text-shadow:0 2px 6px rgba(0,0,0,.32);
  overflow-wrap:anywhere;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.home-promotion-cta{margin-top:auto;color:#f3d489;font-size:13.5px;font-weight:800;font-style:normal}
.home-promotion-controls{position:absolute;right:12px;bottom:11px;display:flex;align-items:center;gap:4px}
.home-promotion-arrow{
  width:32px;
  height:32px;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:999px;
  background:rgba(4,12,32,.42);
  color:#fff;
  font-size:19px;
  line-height:1;
  cursor:pointer;
}
.home-promotion-arrow:active{background:rgba(4,12,32,.62)}
.home-promotion-dots{display:flex;align-items:center}
.home-promotion-dots button{position:relative;width:22px;height:32px;padding:0;border:0;background:transparent;cursor:pointer}
.home-promotion-dots button:after{content:"";position:absolute;left:7px;top:12px;width:8px;height:8px;border-radius:999px;background:rgba(255,255,255,.45)}
.home-promotion-dots button.on:after{background:#fff;box-shadow:0 0 0 3px rgba(255,255,255,.16)}

.hp-admin-page{min-height:100%;padding:14px;color:var(--ink);background:var(--paper)}
.hp-admin-page *{box-sizing:border-box}
.hp-admin-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;margin-bottom:14px}
.hp-admin-head>a{min-height:44px;display:inline-flex;align-items:center;color:var(--felt-700);font-size:13px;font-weight:700;text-decoration:none}
.hp-admin-head>div{min-width:0}
.hp-admin-head h1{margin:0;font-size:21px;line-height:1.25}
.hp-admin-head p{margin:4px 0 0;color:var(--ink-2);font-size:12px;line-height:1.45}
.hp-primary{padding:0 14px;border:0;border-radius:8px;background:var(--felt-700)!important;color:#fff!important;justify-content:center}
.hp-admin-state{min-height:64px;padding:14px;display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--ink-2);font-size:13px;line-height:1.5}
.hp-admin-error{color:var(--red)}
.hp-admin-state button,.hp-more{min-height:44px;padding:0 14px;border:1px solid var(--line-2);border-radius:8px;background:#fff;color:var(--felt-700);font:inherit;font-weight:700;cursor:pointer}
.hp-admin-list{overflow:hidden;border:1px solid var(--line);border-radius:10px;background:var(--card)}
.hp-admin-row{min-width:0;padding:13px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;border-bottom:1px solid var(--line)}
.hp-admin-row:last-child{border-bottom:0}
.hp-admin-row h2{margin:0;font-size:15px;line-height:1.4;overflow-wrap:anywhere}
.hp-admin-row p,.hp-admin-row small{display:block;margin:3px 0 0;color:var(--ink-2);font-size:12px;line-height:1.4}
.hp-admin-row>a{min-height:44px;display:inline-flex;align-items:center;color:var(--felt-700);font-size:13px;font-weight:700;text-decoration:none}
.hp-status{padding:4px 7px;border-radius:999px;background:#eceef6;color:var(--ink-2);font-size:11px;font-weight:800;white-space:nowrap}
.hp-status-live{background:var(--ok-bg);color:var(--ok-ink)}
.hp-more{width:100%;margin-top:12px}
.hp-admin-note{margin-bottom:12px;padding:11px 12px;border-left:4px solid #b68a3d;background:#fbf5e7;color:var(--ink-2);font-size:13px;line-height:1.5}
.hp-form{margin:0;padding:14px;display:grid;gap:13px;border:1px solid var(--line);border-radius:10px;background:var(--card)}
.hp-form>label,.hp-time-grid label{display:grid;gap:6px;color:var(--ink-2);font-size:13px;font-weight:700}
.hp-form input,.hp-form select{width:100%;min-height:44px;padding:9px 11px;border:1.5px solid var(--line-2);border-radius:8px;background:#fff;color:var(--ink);font:inherit}
.hp-form input:focus,.hp-form select:focus{outline:0;border-color:var(--felt-600);box-shadow:0 0 0 3px rgba(0,32,128,.12)}
.hp-time-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.hp-target-tools{display:flex;align-items:center;justify-content:space-between;gap:10px}
.hp-target-tools button,.hp-cover button,.hp-editor-actions button{min-height:44px;padding:0 14px;border:1px solid var(--line-2);border-radius:8px;background:#fff;color:var(--felt-700);font:inherit;font-weight:700;cursor:pointer}
.hp-target-view{min-height:44px;display:inline-flex;align-items:center;color:var(--felt-700);font-size:13px;font-weight:700;text-decoration:none}
.hp-target-error,.hp-cover-error{color:var(--red);font-size:12px;line-height:1.45}
.hp-cover{margin-top:12px;padding:14px;border:1px solid var(--line);border-radius:10px;background:var(--card)}
.hp-cover h2{margin:0 0 10px;font-size:16px}
.hp-cover>img,.hp-cover-empty{width:100%;height:152px;display:flex;align-items:center;justify-content:center;object-fit:cover;border-radius:8px;background:#e7eaf2;color:var(--ink-2);font-size:13px}
.hp-cover p{color:var(--ink-2);font-size:12px;line-height:1.5}
.hp-file{min-height:44px;margin-top:10px;display:flex;align-items:center;color:var(--felt-700);font-size:13px;font-weight:700;cursor:pointer}
.hp-file input{max-width:100%;margin-left:8px}
.hp-cover button{margin:8px 8px 0 0}
.hp-cover button.danger{color:var(--red)}
.hp-editor-actions{margin-top:12px;display:flex;gap:10px}
.hp-editor-actions button{flex:1}
.hp-editor-actions button:disabled,.hp-cover button:disabled,.hp-more:disabled{opacity:.55;cursor:default}

@media(max-width:420px){
  .home-promotion-copy{left:14px;right:30%;gap:7px}
  .home-promotion-copy strong{font-size:20px}
  .home-promotion-controls{right:10px;bottom:9px;gap:2px}
  .home-promotion-arrow{width:30px;height:30px;font-size:18px}
  .home-promotion-dots button{width:18px;height:30px}
  .home-promotion-dots button:after{left:5px;top:11px;width:8px;height:8px}
  .hp-admin-head{grid-template-columns:auto minmax(0,1fr)}
  .hp-admin-head>.hp-primary{grid-column:1/-1;width:100%}
  .hp-admin-row{grid-template-columns:auto minmax(0,1fr)}
  .hp-admin-row>a{grid-column:2;justify-self:start}
  .hp-time-grid{grid-template-columns:1fr}
  .hp-target-tools{align-items:flex-start;flex-direction:column}
  .hp-editor-actions{flex-direction:column}
}
