:root {
  --tabs-dur: 250ms;
  --tabs-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tabs-text-muted: rgba(15, 15, 15, 0.8);
  --tabs-text-active: #0f0f0f;
  --tabs-bar-bg: #f1f1f1;
  --tabs-pill-bg: #ffffff;
}

/* The bar is just a flex container with padding for the pill
   to sit inside. Tabs sit on z-index: 1, the pill on z-index: 0,
   so labels read above the pill background. */
.t-tabs {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 48px;
  background: var(--tabs-bar-bg);
}
.t-tab {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  height: 30px;
  padding: 4px 12px;
  color: var(--tabs-text-muted);
  cursor: pointer;
  border-radius: 48px;
  z-index: 1;
  transition: color var(--tabs-dur) var(--tabs-ease);
}
.t-tab:not([aria-selected="true"]):hover,
.t-tab[aria-selected="true"] {
  color: var(--tabs-text-active);
}

/* The pill: width + transform are written inline by JS so
   the transition tweens between the previous and next
   measured positions. */
.t-tabs-pill {
  position: absolute;
  top: 3px;
  left: 0;
  height: 30px;
  width: 0;
  background: var(--tabs-pill-bg);
  border-radius: 48px;
  transform: translateX(0);
  transition:
    transform var(--tabs-dur) var(--tabs-ease),
    width     var(--tabs-dur) var(--tabs-ease);
  will-change: transform, width;
  z-index: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .t-tabs-pill, .t-tab { transition: none !important; }
}

:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --line: #e7e9f0;
  --line-strong: #d8dce6;
  --text: #18191f;
  --muted: #747b8b;
  --pink: #ef5b8d;
  --pink-soft: #fff0f5;
  --violet: #8068dc;
  --cyan: #268f96;
  --green: #239966;
  --amber: #bd7914;
  --danger: #dc4f5d;
  --shadow: 0 12px 36px rgba(34, 38, 55, .07);
  --radius: 18px;
}
html {
  --tabs-text-muted: rgba(36,39,47,.62);
  --tabs-text-active: #18191f;
  --tabs-bar-bg: #eceef3;
  --tabs-pill-bg: #ffffff;
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif; background: linear-gradient(180deg,#fff 0,#f6f7fb 320px); color: var(--text); }
button, input, select { font: inherit; }
button, select { color: inherit; }
.ambient { position: fixed; width: 42vw; height: 42vw; border-radius: 50%; filter: blur(120px); opacity: .055; pointer-events: none; z-index: -1; }
.ambient-a { background: var(--pink); top: -18vw; left: -10vw; }
.ambient-b { background: var(--violet); right: -20vw; top: 28vh; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 72px; display: flex; justify-content: space-between; align-items: center; padding: 12px clamp(18px,4vw,56px); border-bottom: 1px solid rgba(222,225,233,.82); background: rgba(255,255,255,.84); backdrop-filter: blur(18px); }
.brand-wrap, .live-wrap, .panel-head, .section-head, .compact, .live-wrap > div { display: flex; align-items: center; }
.brand-wrap { gap: 12px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; color:#fff; font-weight: 850; letter-spacing: -.06em; background: linear-gradient(145deg,var(--pink),var(--violet)); box-shadow: 0 10px 26px rgba(255,109,159,.22); }
h1,h2,h3,h4,p { margin-top: 0; }
h1 { margin: 0; font-size: 16px; letter-spacing: .01em; }
.brand-wrap p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.live-wrap { gap: 10px; }
.live-wrap > div { align-items: flex-start; flex-direction: column; gap: 2px; }
.live-wrap strong { font-size: 12px; }
.live-wrap small { color: var(--muted); font-size: 10px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 5px rgba(255,202,106,.1); }
.live-dot.ok { background: var(--green); box-shadow: 0 0 0 5px rgba(120,227,170,.1), 0 0 18px rgba(120,227,170,.5); }
.live-dot.error { background: var(--danger); }
.shell { width: min(1440px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 80px; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; padding: 24px 4px 26px; }
.eyebrow { display: block; margin-bottom: 8px; color: var(--pink); font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.hero h2 { max-width: 820px; margin-bottom: 10px; font-size: clamp(25px,4vw,45px); line-height: 1.08; letter-spacing: -.045em; }
.hero p, .section-head p { margin: 0; max-width: 760px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.countdown-card { min-width: 220px; padding: 17px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.countdown-card span,.countdown-card small { display:block; color:var(--muted); font-size:10px; }
.countdown-card strong { display:block; margin:5px 0; font-size:21px; letter-spacing:.02em; }
.total-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 0 0 18px; }
.total-card { position: relative; overflow: hidden; padding: 19px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.total-card::after { content:""; position:absolute; width:90px; height:90px; right:-35px; bottom:-40px; border-radius:50%; background:var(--pink-soft); }
.total-card span,.total-card small { display:block; color:var(--muted); font-size:10px; }
.total-card strong { display:block; margin:6px 0; font-size:24px; }
.total-card .delta { color:var(--green); }
.ops-strip { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:14px 0 18px; }
.ops-strip article { padding:16px 18px; border:1px solid var(--line); border-radius:16px; background:#fff; box-shadow:0 5px 20px rgba(36,39,52,.045); }
.ops-strip span,.ops-strip small { display:block; color:var(--muted); font-size:10px; }
.ops-strip strong { display:block; margin:6px 0 4px; font-size:20px; letter-spacing:-.03em; }
.ops-strip .danger strong { color:var(--danger); }
.ops-strip .good strong { color:var(--green); }
.tab-shell { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 20px 0 28px; }
.tab-actions { display:flex; gap:7px; }
.t-tabs { overflow-x: auto; max-width: 100%; }
.t-tab { height: 36px; padding: 5px 16px; white-space: nowrap; font-size: 12px; font-weight: 750; }
.t-tabs-pill { top: 3px; height: 36px; border: 1px solid rgba(0,0,0,.045); box-shadow:0 2px 8px rgba(32,35,45,.08); }
.ghost-btn,.primary-btn { appearance:none; border:1px solid var(--line-strong); border-radius:12px; cursor:pointer; font-weight:750; }
.ghost-btn { padding:9px 13px; background:#fff; color:var(--muted); font-size:11px; }
.ghost-btn:hover { color:var(--text); border-color:rgba(255,109,159,.45); }
.primary-btn { padding:13px 18px; background:linear-gradient(135deg,var(--pink),var(--violet)); color:#fff; box-shadow:0 12px 30px rgba(255,109,159,.2); }
.tab-panel { display:none; }
.tab-panel.is-active { display:block; animation:panel-in 250ms cubic-bezier(.22,1,.36,1); }
@keyframes panel-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
.section-head { justify-content:space-between; gap:20px; margin:0 2px 18px; align-items:flex-end; }
.section-head h3,.panel h3 { margin:0; font-size:19px; letter-spacing:-.02em; }
.section-head.compact { margin-top:28px; }
.member-tools,.table-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.member-tools input { width:130px; padding:8px 10px; font-size:10px; }
.member-tools select,.table-actions input { padding:8px 10px; font-size:10px; }
.table-actions { flex-direction:column; align-items:flex-end; }
.table-actions input { width:155px; }
.scope-hint { display:block; margin-top:6px; color:var(--danger); font-size:10px; font-weight:700; }
.ranking-scope { display:flex; gap:3px; padding:3px; border-radius:10px; background:#f0f2f6; }
.ranking-scope button { appearance:none; border:0; border-radius:8px; padding:6px 9px; background:transparent; color:var(--muted); cursor:pointer; font-size:9px; font-weight:800; }
.ranking-scope button.active { color:var(--pink); background:#fff; box-shadow:0 1px 5px rgba(30,33,43,.08); }
.rank-switch { display:flex; gap:4px; padding:4px; border-radius:12px; background:#f0f2f6; }
.rank-switch button { border:0; border-radius:9px; padding:7px 11px; background:transparent; color:var(--muted); cursor:pointer; font-size:10px; font-weight:800; }
.rank-switch button.active { color:var(--pink); background:#fff; box-shadow:0 1px 5px rgba(30,33,43,.08); }
.member-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.member-card { position:relative; overflow:hidden; min-height:156px; padding:17px; border:1px solid var(--line); border-radius:18px; background:#fff; cursor:pointer; transition:transform 250ms cubic-bezier(.22,1,.36,1), border-color 250ms ease, box-shadow 250ms ease; }
.member-card:hover,.member-card.selected { transform:translateY(-3px); border-color:rgba(239,91,141,.45); box-shadow:0 16px 38px rgba(42,46,62,.1); }
.member-card.selected::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:linear-gradient(var(--pink),var(--violet)); }
.member-id { color:var(--muted); font-size:10px; font-weight:800; }
.member-card h4 { margin:5px 0 20px; font-size:15px; }
.member-score { display:block; font-size:22px; font-weight:850; letter-spacing:-.04em; }
.member-meta { display:flex; justify-content:space-between; gap:8px; margin-top:9px; color:var(--muted); font-size:10px; }
.member-meta .hot { color:var(--amber); }
.difficulty { position:absolute; top:15px; right:15px; width:8px; height:8px; border-radius:50%; background:var(--green); }
.difficulty.high { background:var(--danger); box-shadow:0 0 14px rgba(255,122,133,.5); }
.difficulty.mid { background:var(--amber); }
.detail-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(380px,.65fr); gap:14px; margin-top:18px; }
.panel { border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); box-shadow:var(--shadow); }
.panel-head { justify-content:space-between; gap:12px; padding:18px 20px; border-bottom:1px solid var(--line); }
.panel-head .eyebrow { margin-bottom:5px; }
select,input { border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--text); outline:none; }
select { padding:8px 28px 8px 10px; font-size:11px; }
.chart-empty { min-height:360px; display:grid; place-items:center; color:var(--muted); font-size:12px; padding:20px; }
.chart-empty.tall { min-height:430px; }
.chart-wrap { width:100%; height:100%; min-height:330px; }
.chart-wrap svg { width:100%; height:330px; overflow:visible; }
.chart-grid { stroke:rgba(30,34,45,.09); stroke-width:1; }
.chart-line { fill:none; stroke:var(--pink); stroke-width:2.5; vector-effect:non-scaling-stroke; }
.chart-area { fill:url(#areaFill); opacity:.22; }
.chart-label { fill:var(--muted); font-size:10px; }
.chart-legend { display:flex; flex-wrap:wrap; gap:8px 14px; padding:15px 20px 0; color:var(--muted); font-size:10px; }
.chart-legend span { display:flex; align-items:center; gap:5px; }
.chart-legend i { width:8px; height:8px; border-radius:50%; }
.table-scroll { overflow:auto; max-height:430px; }
table { width:100%; border-collapse:collapse; font-size:12px; }
th { position:sticky; top:0; z-index:2; color:var(--muted); background:#f7f8fb; font-size:10px; text-align:left; }
th,td { padding:11px 14px; border-bottom:1px solid var(--line); white-space:nowrap; }
tbody tr:hover { background:#fff6f9; }
td:first-child { color:var(--pink); font-weight:800; }
tr.player-match { background:#fff0f5; box-shadow:inset 3px 0 var(--pink); }
tr.range-start td { border-top:3px solid #dfe3eb; }
.move-up { color:var(--green); font-weight:800; }
.move-down { color:var(--danger); font-weight:800; }
.status-tag { display:inline-flex; padding:3px 7px; border-radius:999px; color:var(--muted); background:#f0f2f6; font-size:9px; font-weight:800; }
.status-tag.burst { color:var(--danger); background:#fff0f1; }
.status-tag.sprint { color:var(--amber); background:#fff7e9; }
.status-tag.active { color:var(--green); background:#edf9f3; }
.muted { color:var(--muted); font-size:10px; }
.matrix-table th,.matrix-table td { text-align:right; }
.matrix-table th:first-child,.matrix-table td:first-child { left:0; text-align:left; position:sticky; background:#f7f8fb; }
.matrix-table tbody td:first-child { background:#fff; cursor:pointer; }
.pressure-chip { display:inline-flex; padding:4px 8px; border-radius:999px; font-size:9px; font-weight:850; }
.pressure-chip.high { color:var(--danger); background:#fff0f1; }
.pressure-chip.warm { color:var(--amber); background:#fff7e9; }
.pressure-chip.stable { color:var(--green); background:#edf9f3; }
.pressure-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.pressure-card,.advice-card { padding:18px; border:1px solid var(--line); border-radius:17px; background:#fff; box-shadow:0 5px 18px rgba(35,39,53,.04); }
.pressure-card header { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.pressure-card h4,.advice-card h4 { margin:0; font-size:13px; }
.pressure-card strong { display:block; margin:13px 0 4px; font-size:20px; }
.pressure-card p,.advice-card p { margin:0; color:var(--muted); font-size:10px; line-height:1.65; }
.advice-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.advice-card { position:relative; padding-top:34px; }
.advice-card > span { position:absolute; top:13px; left:17px; color:var(--pink); font-size:9px; font-weight:850; letter-spacing:.08em; }
.advice-card.warn { border-color:#f1dcae; }
.advice-card.danger { border-color:#f3cbd0; }
.method-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:14px; }
.formula-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.formula-card { padding:20px; border:1px solid var(--line); border-radius:18px; background:linear-gradient(145deg,#fff,#fafafd); }
.formula-card span { color:var(--pink); font-size:10px; font-weight:800; letter-spacing:.1em; }
.formula-card strong { display:block; margin-top:9px; font-size:18px; }
.formula-card p { margin:10px 0 0; color:var(--muted); font-size:11px; line-height:1.6; }
.timeline { position:relative; display:grid; gap:10px; margin:22px 0; }
.timeline::before { content:""; position:absolute; top:0; bottom:0; left:25px; width:1px; background:linear-gradient(var(--pink),rgba(167,136,255,.15)); }
.day-card { position:relative; display:grid; grid-template-columns:52px 120px 1fr; gap:16px; align-items:start; padding:17px 18px; border:1px solid var(--line); border-radius:17px; background:var(--surface); }
.day-date { z-index:1; width:34px; height:34px; display:grid; place-items:center; border-radius:11px; background:#fff0f5; color:var(--pink); font-weight:850; border:1px solid #ffdce8; }
.day-card h4 { margin:4px 0 0; font-size:13px; }
.day-card ul { margin:0; padding-left:17px; color:var(--muted); font-size:11px; line-height:1.75; }
.guide-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.prose { padding:22px; }
.prose ol,.prose ul { margin:15px 0 0; padding-left:20px; color:var(--muted); font-size:12px; line-height:1.9; }
.danger-note { border-color:rgba(255,202,106,.18); }
.planner-layout { display:grid; grid-template-columns:minmax(360px,.42fr) minmax(0,.58fr); gap:14px; align-items:start; }
.resource-form { padding:20px; }
.form-section { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:15px 0; border-bottom:1px solid var(--line); }
.form-section h4 { grid-column:1/-1; margin:0; font-size:12px; color:var(--pink); }
.form-section label { position:relative; display:flex; flex-direction:column; gap:6px; color:var(--muted); font-size:10px; }
.form-section input,.form-section select { width:100%; min-height:40px; padding:8px 10px; color:var(--text); }
.form-section label > span { position:absolute; right:10px; bottom:12px; }
.form-section .check-label { grid-column:1/-1; flex-direction:row; align-items:center; }
.check-label input { width:17px; min-height:17px; }
.resource-form .primary-btn { width:100%; margin-top:16px; }
.resource-form > small { display:block; margin-top:10px; color:var(--muted); line-height:1.5; }
.plan-results { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.result-card { padding:19px; border:1px solid var(--line); border-radius:18px; background:var(--surface); }
.result-card.wide { grid-column:1/-1; }
.result-card span { color:var(--muted); font-size:10px; }
.result-card strong { display:block; margin:6px 0; font-size:24px; }
.result-card p { margin:0; color:var(--muted); font-size:11px; line-height:1.65; }
.result-card.good strong { color:var(--green); }
.result-card.warn strong { color:var(--amber); }
.purchase-list { display:grid; gap:6px; margin-top:10px; }
.purchase-row { display:flex; justify-content:space-between; gap:12px; padding:9px 11px; border-radius:10px; background:#f7f8fb; font-size:11px; }
.generated-plan { display:grid; gap:10px; }
.generated-day { display:grid; grid-template-columns:110px 1fr auto; gap:16px; align-items:start; padding:18px; border:1px solid var(--line); border-radius:17px; background:var(--surface); }
.generated-day strong { color:var(--pink); }
.generated-day h4 { margin:0 0 8px; font-size:13px; }
.generated-day ul { margin:0; padding-left:17px; color:var(--muted); font-size:11px; line-height:1.75; }
.day-point { color:var(--green); font-weight:800; white-space:nowrap; }
.toast { position:fixed; left:50%; bottom:22px; z-index:50; transform:translate(-50%,20px); opacity:0; padding:10px 15px; border:1px solid var(--line-strong); border-radius:12px; background:#20242d; color:#fff; font-size:11px; pointer-events:none; transition:opacity 150ms ease, transform 250ms cubic-bezier(.22,1,.36,1); }
.toast.show { opacity:1; transform:translate(-50%,0); }
footer { display:flex; justify-content:space-between; gap:20px; padding:22px clamp(18px,4vw,56px); border-top:1px solid var(--line); color:var(--muted); font-size:10px; }
.skeleton-grid::before,.skeleton-row::before { content:"正在读取实时排名…"; grid-column:1/-1; display:grid; min-height:120px; place-items:center; color:var(--muted); border:1px solid var(--line); border-radius:18px; background:linear-gradient(100deg,#fafafd,#f1f3f7,#fafafd); background-size:200% 100%; animation:shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position:-200% 0; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; } }
@media (max-width:1100px) { .member-grid { grid-template-columns:repeat(3,1fr); } .detail-grid,.planner-layout { grid-template-columns:1fr; } .ranking-panel .table-scroll { max-height:360px; } .ops-strip,.advice-grid { grid-template-columns:repeat(2,1fr); } .pressure-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:720px) { .shell { width:min(100% - 22px,1440px); padding-top:18px; } .topbar { padding:11px 13px; } .brand-wrap p { display:none; } .live-wrap small { max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .hero { align-items:stretch; flex-direction:column; padding-top:16px; } .countdown-card { min-width:0; } .total-strip,.formula-grid,.guide-grid,.ops-strip,.advice-grid,.pressure-grid,.method-grid { grid-template-columns:1fr; } .tab-shell { align-items:flex-start; } .tab-actions { display:none; } .t-tabs { width:100%; } .t-tab { flex:1; padding-inline:9px; font-size:10px; } .section-head { align-items:flex-start; flex-direction:column; } .member-tools { justify-content:flex-start; width:100%; } .member-grid { grid-template-columns:repeat(2,1fr); gap:8px; } .member-card { min-height:145px; padding:14px; } .day-card { grid-template-columns:42px 1fr; } .day-card ul { grid-column:2; } .planner-layout { grid-template-columns:1fr; } .form-section { grid-template-columns:1fr 1fr; } .plan-results { grid-template-columns:1fr; } .result-card.wide { grid-column:auto; } .generated-day { grid-template-columns:1fr; } .day-point { white-space:normal; } footer { flex-direction:column; } }
@media (max-width:430px) { .member-grid,.form-section { grid-template-columns:1fr; } .brand-mark { width:36px; height:36px; } h1 { font-size:13px; } .hero h2 { font-size:27px; } }
