body { min-height: 100vh; display: flex; flex-direction: column; }

.hub { width: 100%; max-width: 980px; margin: 0 auto; padding: 56px 24px 40px; flex: 1; }

.intro { margin-bottom: 32px; }
.intro h1 { margin: 0 0 10px; font-family: var(--serif); font-size: 34px; font-weight: 700; letter-spacing: 4px; line-height: 1.25; }
.intro p { margin: 0; max-width: 42em; text-wrap: pretty; color: var(--muted); font-size: 14px; line-height: 1.75; }

.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }

.tool { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--panel); color: inherit; text-decoration: none; overflow: hidden; transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease), background-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease); animation: rise var(--t-slow) var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
a.tool:hover { border-color: var(--line-2); background: #171d25; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
a.tool:active { transform: translateY(0) scale(.99); }
a.tool:hover .go i { transform: translateX(3px); }
a.tool:focus-visible { outline-offset: 3px; }
.tool.locked { cursor: not-allowed; }
.tool.locked .cover { filter: grayscale(1); opacity: .55; }
.tool.locked .tool-body { opacity: .75; }

.tool.skeleton { height: 292px; background: linear-gradient(100deg, var(--panel) 40%, var(--raised) 50%, var(--panel) 60%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
.load-error { color: var(--muted); grid-column: 1 / -1; }

/* 封面 */
.cover { position: relative; height: 156px; border-bottom: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.battle-cover { display: flex; align-items: center; justify-content: center; gap: 18px; background:
  linear-gradient(90deg, rgba(79, 143, 247, .07), transparent 45%, transparent 55%, rgba(239, 91, 91, .07)), var(--bg-2); }
.lineup { display: flex; }
.lineup span { width: 56px; height: 76px; border-radius: var(--r-md); background: var(--bg-2) center 12% / cover no-repeat; border: 2px solid var(--bg-2); box-shadow: 0 0 0 1px var(--line); }
.lineup span + span { margin-left: -14px; }
.lineup.atk span { box-shadow: 0 0 0 1px rgba(79, 143, 247, .55); }
.lineup.def span { box-shadow: 0 0 0 1px rgba(239, 91, 91, .55); }
.lineup.atk span:nth-child(2), .lineup.def span:nth-child(2) { transform: translateY(-6px); }
.vs { font-family: var(--serif); font-size: 18px; color: var(--faint); }
.map-cover { color: #7f8b99; }
.map-cover svg { width: 100%; height: 100%; display: block; }
.plain-cover { display: grid; place-items: center; }
.plain-cover span { font-family: var(--serif); font-size: 64px; color: var(--line-2); }

/* 正文 */
.tool-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 16px; flex: 1; }
.tool-title { display: flex; align-items: center; gap: 10px; }
.tool-title h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: 1px; }
.state { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 8px 1px 6px; }
.tool-body p { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.7; flex: 1; text-wrap: pretty; }
.tool-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 4px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12px; }
.tool-foot .meta { color: var(--faint); }
.go { color: var(--text); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.go i { font-style: normal; transition: transform var(--t-base) var(--ease); }
.soon { color: var(--faint); }

/* 页脚 */
.hub-foot { width: 100%; max-width: 980px; margin: 0 auto; padding: 18px 24px calc(22px + env(safe-area-inset-bottom)); display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; font-size: 12px; color: var(--faint); border-top: 1px solid var(--line); }
.hub-foot b { color: var(--muted); font-weight: 500; }

@media (max-width: 560px) {
  .hub { padding: 32px 16px 28px; }
  .intro { margin-bottom: 24px; }
  .intro h1 { font-size: 26px; letter-spacing: 3px; }
  .tools { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .cover { height: 128px; }
  .lineup span { width: 44px; height: 60px; }
  .hub-foot { padding-left: 16px; padding-right: 16px; }
}
