﻿/* ==========================================================================
   Apple 风格外观层
   参考 apple.com 产品页：全局导航、超大居中标题、白/浅灰分区、胶囊按钮。
   这一层放在最后加载，用来覆盖旧版侧栏和后台式卡片。
   ========================================================================== */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --line: rgba(0, 0, 0, .10);
  --line-2: rgba(0, 0, 0, .06);
  --accent: #0071e3;
  --accent-ink: #0066cc;
  --ok: #0a8a4f;
  --warn: #b25000;
  --err: #d70015;
  --purple: #6e56cf;
  --radius: 18px;
  --max: 1120px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .06);
}

[data-theme="dark"] {
  --ink: #f5f5f7;
  --ink-2: #a1a1a6;
  --ink-3: #86868b;
  --bg: #000000;
  --bg-2: #1d1d1f;
  --line: rgba(255, 255, 255, .14);
  --line-2: rgba(255, 255, 255, .08);
  --accent: #2997ff;
  --accent-ink: #6cb7ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
}

[data-accent="orange"] { --accent: #e2620a; --accent-ink: #c95608; }
[data-accent="green"] { --accent: #0f8a4f; --accent-ink: #0c7944; }
[data-accent="purple"] { --accent: #7254c9; --accent-ink: #6547b8; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { min-height: 100vh; }
#app { display: flex; flex-direction: column; min-height: 100vh; }
#main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto !important;
  padding: 0 22px 70px !important;
  box-sizing: border-box;
}
#view { max-width: 100%; }
a { color: var(--accent-ink); }

/* ── 全局导航 ───────────────────────────────────────────── */
.globalnav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-2);
}
.gn-inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 48px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.gn-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  margin-right: 16px;
  flex: 0 0 auto;
}
.gn-mark {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  display: grid; place-items: center;
}
.gn-word { font-size: 14px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.gn-links { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.gn-link {
  font-size: 12px;
  line-height: 1;
  color: var(--ink);
  opacity: .82;
  text-decoration: none;
  padding: 9px 11px;
  border-radius: 9px;
  white-space: nowrap;
}
.gn-link:hover { opacity: 1; background: var(--bg-2); }
.gn-link.is-active { opacity: 1; font-weight: 600; }
.gn-link.is-open { opacity: 1; background: var(--bg-2); }
.gn-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.gn-icon {
  position: relative;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
}
.gn-icon:hover { background: var(--bg-2); }
.gn-badge {
  position: absolute;
  top: 2px; right: 1px;
  min-width: 15px; height: 15px;
  padding: 0 3px;
  border-radius: 8px;
  background: var(--err);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  display: grid; place-items: center;
}
.gn-badge[hidden] { display: none; }
.gn-login {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 980px;
  cursor: pointer;
}
.gn-login:hover { background: var(--bg-2); }
.gn-account-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 8px 3px 3px;
  border-radius: 980px;
  text-decoration: none;
  color: var(--ink);
}
.gn-account-btn:hover { background: var(--bg-2); }
.gn-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: grid; place-items: center;
}
.gn-name { font-size: 12px; max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gn-menu { display: none; }

/* 大菜单 */
.gn-mega {
  display: none;
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 30px 50px rgba(0, 0, 0, .10);
}
.globalnav.mega-open .gn-mega { display: block; }
.gn-mega-inner { max-width: var(--max); margin: 0 auto; padding: 26px 22px 32px; }
.gn-panel { display: none; }
.gn-panel.is-on { display: block; animation: gnDrop .16s ease both; }
@keyframes gnDrop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.gn-panel-title { font-size: 11px; letter-spacing: .1em; color: var(--ink-2); text-transform: uppercase; margin-bottom: 12px; }
.gn-panel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.gn-mega-link {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
}
.gn-mega-link:hover { background: var(--bg-2); }
.gn-mega-ico { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 8px; background: var(--bg-2); display: grid; place-items: center; font-size: 13px; }
.gn-mega-t { display: block; font-size: 14px; font-weight: 500; }
.gn-mega-d { display: block; font-size: 12px; color: var(--ink-2); margin-top: 2px; line-height: 1.4; }

/* ── 二级导航（场次 / 方案 / 身份） ─────────────────────── */
#toolbar { border-bottom: 1px solid var(--line-2); margin: 0 0 6px; }
.ln-inner { display: flex; align-items: center; gap: 18px; min-height: 52px; }
.ln-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ln-title { font-size: 19px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.ln-field { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-2); min-width: 0; }
.ln-label { letter-spacing: .04em; }
.ln-field select {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  max-width: 210px;
  padding: 5px 2px;
  cursor: pointer;
}
.ln-right { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.ln-link {
  border: 0; background: none;
  color: var(--ink-2);
  font: inherit; font-size: 12px;
  padding: 7px 9px;
  border-radius: 9px;
  cursor: pointer;
}
.ln-link:hover { color: var(--ink); background: var(--bg-2); }
.ln-who { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; padding: 0 6px; }
.ln-info { font-size: 11px; color: var(--ink-3); margin-right: 6px; }

/* ── 页头 ───────────────────────────────────────────────── */
.page-head { max-width: 780px; margin: 62px auto 34px; text-align: center; }
.page-kicker { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 10px; }
.page-title { font-size: clamp(34px, 5vw, 56px); line-height: 1.06; letter-spacing: -.03em; font-weight: 600; margin: 0; }
.page-desc { font-size: 17px; line-height: 1.5; color: var(--ink-2); margin: 12px auto 0; max-width: 620px; }
body[data-view="dashboard"] .page-head,
body[data-view="inbox"] .page-head { display: none; }

/* ── 按钮 / 表单 ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 980px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1;
  padding: 9px 17px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-2); }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.lg { font-size: 16px; padding: 12px 23px; }
.btn.tiny { font-size: 12px; padding: 6px 12px; }
.btn.danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.input, select.input, textarea.input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
}
.input:focus, select.input:focus, textarea.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
textarea.input { resize: vertical; min-height: 84px; line-height: 1.5; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: none;
}
.legend { font-size: 12px; color: var(--ink-2); line-height: 1.55; }
.muted { color: var(--ink-2); }
.tiny { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 980px;
  background: var(--bg-2);
  color: var(--ink-2);
  font-size: 11px;
  margin: 0 6px 6px 0;
}
.chip.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.chip.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.chip.err { color: var(--err); background: color-mix(in srgb, var(--err) 10%, transparent); }
.chip.purple { color: var(--purple); background: color-mix(in srgb, var(--purple) 10%, transparent); }

.empty, .empty-block {
  padding: 46px 24px;
  text-align: center;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.7;
}
.empty-block { border: 1px dashed var(--line); border-radius: var(--radius); }

/* ── 首页 ───────────────────────────────────────────────── */
.apple-home { margin: 0 auto; }
.apple-hero { text-align: center; padding: 70px 6px 0; }
.hero-eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.hero-display {
  font-size: clamp(44px, 7.4vw, 88px);
  line-height: 1.02;
  letter-spacing: -.045em;
  font-weight: 600;
  margin: 16px 0 0;
}
.hero-lede {
  max-width: 660px;
  margin: 22px auto 0;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
}
.hero-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.hero-date { font-size: 12px; color: var(--ink-2); margin-top: 16px; }
.court-stage {
  max-width: 940px;
  margin: 34px auto 0;
  padding: 26px 22px;
  background: var(--bg-2);
  border-radius: 28px;
  color: var(--ink);
}
.court-stage svg { width: 100%; height: auto; display: block; }
.stage-cards {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 820px;
  margin: -34px auto 0;
}
.stage-card {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  text-align: left;
  box-shadow: var(--shadow);
}
.stage-k { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.stage-v { font-size: clamp(28px, 3.2vw, 38px); font-weight: 600; letter-spacing: -.035em; margin: 5px 0 2px; }
.stage-v small { font-size: 15px; color: var(--ink-2); margin-left: 2px; }
.stage-d { font-size: 12px; color: var(--ink-2); }

.apple-section { padding: 84px 0; }
.apple-section.soft { background: var(--bg-2); margin: 0 -22px; padding-left: 22px; padding-right: 22px; }
.section-inner { max-width: var(--max); margin: 0 auto; }
.section-eyebrow { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.section-display { font-size: clamp(30px, 4.4vw, 50px); letter-spacing: -.03em; font-weight: 600; line-height: 1.08; margin: 0 0 14px; text-align: center; }
.section-lede { text-align: center; color: var(--ink-2); font-size: 17px; line-height: 1.5; max-width: 640px; margin: 0 auto 36px; }
.section-title { font-size: clamp(24px, 3vw, 36px); letter-spacing: -.025em; font-weight: 600; line-height: 1.1; margin: 0 0 18px; }
.section-link { display: inline-block; margin-top: 18px; font-size: 14px; color: var(--accent-ink); text-decoration: none; }
.section-link:hover { text-decoration: underline; }
.split-2 { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: start; }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature-tile {
  display: block;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: 24px 22px;
  color: var(--ink);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-num { font-size: clamp(36px, 4vw, 48px); font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.feature-num small { font-size: 15px; color: var(--ink-2); margin-left: 2px; letter-spacing: 0; }
.feature-title { margin-top: 14px; font-size: 15px; font-weight: 600; }
.feature-desc { margin-top: 4px; font-size: 12px; color: var(--ink-2); line-height: 1.5; }

.rank-list { border-top: 1px solid var(--line); }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.rank-row:hover { color: var(--accent-ink); }
.rank-no { width: 18px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rank-ava { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.rank-name { flex: 1; font-size: 15px; }
.rank-name small { display: block; font-size: 11px; color: var(--ink-2); font-weight: 400; margin-top: 1px; }
.rank-score { font-size: 20px; font-weight: 600; letter-spacing: -.02em; text-align: right; }
.rank-score small { display: block; font-size: 10px; color: var(--ink-2); font-weight: 400; letter-spacing: 0; }

.alert-list { border-top: 1px solid var(--line); }
.alert-item { display: flex; align-items: flex-start; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.alert-item:hover .alert-t { color: var(--accent-ink); }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: 0 0 auto; background: var(--warn); }
.alert-item.sev-ok .alert-dot { background: var(--ok); }
.alert-item.sev-info .alert-dot { background: var(--accent); }
.alert-item.sev-err .alert-dot { background: var(--err); }
.alert-body { flex: 1; }
.alert-t { display: block; font-size: 15px; font-weight: 500; }
.alert-d { display: block; font-size: 12px; color: var(--ink-2); margin-top: 3px; line-height: 1.5; }
.alert-arrow { color: var(--ink-3); }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-card { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line-2); text-decoration: none; color: var(--ink); }
.quick-card:hover { border-color: var(--line); box-shadow: var(--shadow); }
.quick-ico { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 9px; background: var(--bg-2); display: grid; place-items: center; font-size: 14px; }
.quick-t { display: block; font-size: 14px; font-weight: 500; }
.quick-d { display: block; font-size: 11px; color: var(--ink-2); margin-top: 2px; }

.notice { background: var(--bg); border: 1px solid var(--line-2); border-radius: 16px; padding: 20px; }
.notice-k { font-size: 10px; letter-spacing: .1em; color: var(--ink-2); text-transform: uppercase; }
.notice-t { font-size: 15px; line-height: 1.6; margin-top: 8px; white-space: pre-wrap; }

.feed { margin-top: 6px; }
.feed-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
.feed-ava { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.feed-b { min-width: 0; }
.feed-t { font-size: 13px; line-height: 1.45; }
.feed-d { font-size: 11px; color: var(--ink-2); margin-top: 2px; }

/* ── 待办 ───────────────────────────────────────────────── */
.inbox-list { border-top: 1px solid var(--line); }
.inbox-item { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.inbox-ico { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; font-size: 14px; }
.inbox-item.sev-warn .inbox-ico { color: var(--warn); }
.inbox-item.sev-err .inbox-ico { color: var(--err); }
.inbox-item.sev-ok .inbox-ico { color: var(--ok); }
.inbox-t { display: block; font-size: 16px; font-weight: 500; }
.inbox-d { display: block; font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.inbox-item:hover .inbox-t { color: var(--accent-ink); }

/* ── 出勤 ───────────────────────────────────────────────── */
.att-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.att-toolbar-actions { display: flex; gap: 8px; }
.att-sum { margin: 6px 0 18px; }
.att-card { padding: 6px 22px; }
.att-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.att-row:last-child { border-bottom: 0; }
.att-info { flex: 1; min-width: 150px; font-size: 15px; }
.att-name { font-weight: 500; }
.att-meta { color: var(--ink-2); font-size: 12px; }
.segmented { display: inline-flex; background: var(--bg-2); border-radius: 11px; padding: 3px; gap: 2px; }
.segmented button { border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 12px; padding: 6px 13px; border-radius: 8px; cursor: pointer; }
.segmented button.is-on { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); font-weight: 500; }
.att-seg button.is-on { color: var(--accent-ink); }
.att-card + .card textarea { min-height: 92px; }

/* ── 训练计划 ───────────────────────────────────────────── */
.plan-toolbar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.plan-focus { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.focus-card { border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: var(--bg); }
.focus-k { font-size: 11px; letter-spacing: .1em; color: var(--ink-2); text-transform: uppercase; }
.focus-name { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin-top: 6px; }
.focus-score { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.plan-table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 13px; }
.plan-table th { text-align: left; font-size: 11px; letter-spacing: .06em; color: var(--ink-2); font-weight: 500; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.plan-table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.55; }
.plan-table tr:last-child td { border-bottom: 0; }
.plan-table b { font-weight: 600; }
.saved-plans { border-top: 1px solid var(--line); }
.saved-plan { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }

/* ── 秒表 ───────────────────────────────────────────────── */
.timer-wrap { text-align: center; padding: 34px 0 20px; }
.timer-label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.timer-display { font-size: clamp(72px, 14vw, 164px); font-weight: 300; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; margin: 6px 0 26px; }
.timer-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.lap-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lap-row:last-child { border-bottom: 0; }
.lap-row b { font-variant-numeric: tabular-nums; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.card-head h3 { margin: 0; font-size: 16px; letter-spacing: -.01em; }

/* ── 球队设置 ───────────────────────────────────────────── */
.form-card { padding: 24px; }
.swatches { display: flex; gap: 10px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; background: none; padding: 2px; cursor: pointer; }
.swatch span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--sw); }
.swatch.is-on { border-color: var(--ink); }
.invite-row { display: flex; gap: 8px; }
.invite-row .input { flex: 1; }

/* ── 命令面板 ───────────────────────────────────────────── */
.palette-backdrop {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0, 0, 0, .32);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex; justify-content: center; align-items: flex-start;
  padding-top: 12vh;
}
.palette {
  width: min(640px, calc(100vw - 32px));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
  overflow: hidden;
  animation: paletteIn .18s ease both;
}
@keyframes paletteIn { from { opacity: 0; transform: translateY(-8px) scale(.99); } to { opacity: 1; transform: none; } }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette-key { font-size: 10px; border: 1px solid var(--line); border-radius: 5px; padding: 3px 5px; color: var(--ink-2); }
.palette-input input { flex: 1; border: 0; background: none; outline: none; color: var(--ink); font: inherit; font-size: 16px; }
.palette-list { max-height: 46vh; overflow: auto; padding: 6px; }
.palette-item { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 10px; color: var(--ink); cursor: pointer; }
.palette-item.is-active { background: var(--bg-2); }
.palette-ico { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 7px; background: var(--bg-2); display: grid; place-items: center; font-size: 12px; }
.palette-b { flex: 1; min-width: 0; }
.palette-t { display: block; font-size: 14px; }
.palette-s { display: block; font-size: 11px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-enter { font-size: 11px; color: var(--ink-3); }
.palette-empty { padding: 26px 16px; color: var(--ink-2); font-size: 13px; text-align: center; }
.palette-foot { padding: 9px 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--ink-2); }

/* ── 页脚 ───────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); padding: 22px; }
.site-foot-inner { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 11px; color: var(--ink-2); }
.site-foot-links { display: flex; gap: 14px; }
.site-foot-links a { color: var(--ink-2); text-decoration: none; }
.site-foot-links a:hover { color: var(--ink); }

/* ── 旧后台外壳的清理 ──────────────────────────────────── */
#side, #crumb, #nav-search, .nav-search-wrap, .side-foot { display: none !important; }
#toolbar .tb-field, #toolbar .tb-left, #toolbar .tb-right { display: none !important; }
#save-status {
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 90;
  font-size: 11px;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 980px;
  padding: 6px 12px;
  max-width: 320px;
}
#save-status:empty { display: none; }
#save-status[data-state="error"] { color: var(--err); }

/* 表格：更接近 Apple 的细分隔线 */
table { border-collapse: collapse; }
th, td { border-color: var(--line); }
thead th { color: var(--ink-2); font-weight: 500; font-size: 12px; }

/* ── 响应式 ─────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .split-2 { grid-template-columns: 1fr; gap: 40px; }
  .gn-name { display: none; }
}
@media (max-width: 860px) {
  .gn-links { display: none; }
  .gn-menu { display: grid; }
  .globalnav.nav-open .gn-mega { display: block; position: static; box-shadow: none; }
  .globalnav.nav-open .gn-panel { display: block; margin-bottom: 20px; }
  .gn-panel-grid { grid-template-columns: 1fr; }
  .ln-title { font-size: 17px; }
  .ln-info { display: none; }
  .page-head { margin: 40px auto 24px; }
  .apple-hero { padding-top: 46px; }
  .apple-section { padding: 60px 0; }
}
@media (max-width: 680px) {
  #main { padding: 0 16px 54px !important; }
  .apple-section.soft { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .gn-inner { padding: 0 14px; }
  .gn-word { display: none; }
  .hero-display { font-size: 42px; }
  .stage-cards { grid-template-columns: 1fr; margin-top: 18px; }
  .court-stage { padding: 12px; border-radius: 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .plan-focus { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .ln-left { gap: 10px; }
  .ln-field .ln-label { display: none; }
  .att-seg { width: 100%; justify-content: space-between; }
  .att-seg button { flex: 1; }
  .split-2 { gap: 28px; }
  .timer-display { font-size: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media print {
  .globalnav, #toolbar, #save-status, .site-foot, .hero-cta, .plan-toolbar, .section-link { display: none !important; }
  #main { max-width: 100%; padding: 0 !important; }
  .apple-section { padding: 12px 0 !important; }
  .page-head { margin: 0 0 16px; text-align: left; }
  body { background: #fff; color: #000; }
}

/* Apple 版：去掉旧版铺满页面的水印，保留留白 */
#motion-watermark { display: none !important; }
.gn-login { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
.gn-login:hover { background: var(--accent-ink, #0077ed); }

/* ============ Apple 登录页（覆盖旧版深色电影感外壳） ============ */
.lg-root { background: #fff !important; color: var(--ink); }
.lg-root .lg-canvas, .lg-root .lg-atmo, .lg-root .lg-horizon, .lg-root .lg-beams, .lg-root .lg-hero { display: none !important; }
.lg-root .lg-shell { min-height: 100vh; display: flex; flex-direction: column; padding: 0; max-width: none; }
.lg-root .lg-top { height: 48px; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(20px); }
.lg-root .lg-brand-mark { width: 28px; height: 28px; border-radius: 7px; background: #1d1d1f; color: #fff; font-size: 11px; }
.lg-root .lg-brand-txt { color: #1d1d1f; font-size: 11px; letter-spacing: .08em; }
.lg-root .lg-brand-txt em { display: block; color: #86868b; font-style: normal; font-size: 10px; letter-spacing: .02em; margin-top: 1px; }
.lg-root .lg-mode { color: #86868b; font-size: 11px; }
.lg-root .lg-mode-dot { background: #34c759; }
.lg-root .lg-skip { border: 0; background: transparent; color: #0066cc; font-size: 12px; padding: 6px 8px; }
.lg-root .lg-skip:hover { text-decoration: underline; }
.lg-root .lg-main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 56px 24px 40px; }
.lg-root .lg-panel { width: 100%; max-width: 440px; margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; }
.lg-root .lg-panel-head { display: block; margin-bottom: 26px; }
.lg-root .lg-panel-head h2 { font-size: 40px; line-height: 1.08; font-weight: 600; letter-spacing: -.02em; color: #1d1d1f; }
.lg-root .lg-panel-sub { display: block; margin-top: 8px; color: #86868b; font-size: 14px; letter-spacing: 0; }
.lg-root .lg-field { margin-bottom: 16px; }
.lg-root .lg-label { color: #6e6e73; font-size: 12px; letter-spacing: 0; margin-bottom: 6px; }
.lg-root .lg-input { height: 50px; border-radius: 12px; border: 1px solid #d2d2d7; background: #fff; color: #1d1d1f; font-size: 15px; }
.lg-root .lg-input::placeholder { color: #a1a1a6; }
.lg-root .lg-input:focus { border-color: #0071e3; box-shadow: 0 0 0 4px rgba(0,113,227,.14); background: #fff; }
.lg-root .lg-input:-webkit-autofill { -webkit-text-fill-color: #1d1d1f; -webkit-box-shadow: 0 0 0 1000px #fff inset; }
.lg-root .lg-btn { height: 50px; border-radius: 980px; background: #0071e3; font-size: 14px; letter-spacing: 0; font-weight: 500; margin-top: 18px; box-shadow: none; }
.lg-root .lg-btn:hover { background: #0077ed; transform: none; box-shadow: none; }
.lg-root .lg-btn::after { display: none; }
.lg-root .lg-panel-links { margin-top: 18px; font-size: 13px; gap: 8px; }
.lg-root .lg-link { color: #0066cc; }
.lg-root .lg-link:hover { text-decoration: underline; }
.lg-root .lg-dot { color: #d2d2d7; }
.lg-root .lg-note { color: #86868b; border-top: 1px solid #f0f0f2; font-size: 11px; padding-top: 14px; margin-top: 20px; }
.lg-root .lg-note code { background: #f5f5f7; color: #6e6e73; }
.lg-root .lg-hint { color: #86868b; }
.lg-root .lg-hint b { color: #1d1d1f; }
.lg-root .lg-alert { border-radius: 10px; background: #fff2f0; border: 1px solid #ffd6cf; color: #b3261e; }
.lg-root .lg-alert[data-type="info"] { background: #f5f9ff; border-color: #d6e6ff; color: #0058b0; }
.lg-root .lg-devc { background: #fffaf0; border: 1px dashed #f0c46b; border-radius: 12px; }
.lg-root .lg-code-target { color: #86868b; }
.lg-root .lg-code-target b { color: #1d1d1f; }
.lg-root .lg-code { height: 62px; font-size: 26px; letter-spacing: .5em; background: #fff; }
.lg-root .lg-invite { color: #86868b; }
.lg-root .lg-foot { color: #86868b; font-size: 11px; border-top: 1px solid #f0f0f2; padding: 14px 24px; }
.lg-root .lg-foot kbd { background: #f5f5f7; border: 1px solid #e5e5ea; color: #6e6e73; }

.lg-root .lg-panel::before, .lg-root .lg-panel::after { display: none !important; }

.lg-root .lg-devc-top { color: #8a6a1f; }
.lg-root .lg-devc-tag { color: #8a6a1f; border-color: #e8c98a; }
.lg-root .lg-devc-code { color: #b06a00; }
.lg-root .lg-devc-hint { color: #8a7a5a; }

/* 出勤页细节 */
.att-num { width: 46px; flex: 0 0 auto; text-align: center; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.att-toolbar .tb-field { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.att-toolbar .tb-field > span { white-space: nowrap; }
.att-toolbar .tb-field select { width: auto; min-width: 260px; }
.att-row { gap: 10px; }
.att-info { font-size: 15px; }

/* Apple 页面：滚动显现改为直接可见，避免截图/跳转时空白 */
.m-reveal { opacity: 1 !important; transform: none !important; }
.plan-toolbar { align-items: center; }
.plan-toolbar .tb-field { display: flex; flex-direction: row; align-items: center; gap: 10px; }
.plan-toolbar .tb-field > span { white-space: nowrap; }
.plan-toolbar .tb-field select { width: auto; min-width: 220px; }

/* 命令面板：完整显示 8 条，不裁切 */
.palette { max-height: min(640px, 84vh); }
.palette-list { max-height: calc(84vh - 112px); }
.palette-item { padding: 9px 12px; }

/* 工具栏标签统一横排，避免“排序/对象/场次”竖排 */
.tb-field { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.tb-field > span { white-space: nowrap; }
.hero-lede { text-wrap: balance; }

/* 统一旧数据表为 Apple 浅表头 */
.table-wrap { border: 1px solid var(--line); border-radius: 14px; overflow: auto; background: #fff; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid thead th { background: var(--bg-2) !important; color: var(--ink-2) !important; font-size: 11px; font-weight: 500; letter-spacing: .04em; text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
table.grid tbody th, table.grid tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line); background: #fff; color: var(--ink); }
table.grid tbody tr:last-child th, table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid tbody tr:hover th, table.grid tbody tr:hover td { background: #fafafa; }
.btn.danger, .btn.is-danger { color: var(--red, #c00); }


/* ===== 滚动叙事：苹果产品页式 ===== */
#scroll-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: 0 50%;
  z-index: 1500; pointer-events: none; opacity: .9;
}
html.fx .fx-reveal {
  opacity: 0; transform: translate3d(0, 26px, 0); filter: blur(8px);
  transition: opacity .85s cubic-bezier(.22,.61,.36,1),
              transform .85s cubic-bezier(.22,.61,.36,1),
              filter .85s cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform, filter;
}
html.fx .fx-reveal.is-in { opacity: 1; transform: none; filter: none; }

.scroll-story { position: relative; height: 320vh; background: #fff; }
.story-pin {
  position: sticky; top: 0; height: 100vh; max-width: 1120px; margin: 0 auto;
  padding: 72px 40px 40px; display: grid; grid-template-columns: 1.12fr .88fr;
  gap: 48px; align-items: center; box-sizing: border-box;
}
.story-visual {
  position: relative; display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 64vh;
}
.story-ring {
  position: absolute; top: 50%; left: 50%; width: min(68vh, 500px); height: min(68vh, 500px);
  transform: translate(-50%, -50%) rotate(-90deg); overflow: visible;
}
.story-ring-bg { fill: none; stroke: var(--line); stroke-width: 1; }
.story-ring-fg {
  fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0) * 100);
  opacity: .8; transition: stroke-dashoffset .12s linear;
}
.story-metric {
  position: relative; z-index: 1; font-size: clamp(96px, 15vw, 190px); line-height: .84;
  font-weight: 600; letter-spacing: -.075em; font-variant-numeric: tabular-nums;
  color: var(--ink); transform: scale(var(--sp, .94));
  transition: opacity .16s ease, filter .16s ease;
}
.story-metric small { font-size: .22em; font-weight: 500; letter-spacing: 0; margin-left: .08em; color: var(--ink-2); }
.story-metric.is-swap { opacity: 0; filter: blur(6px); }
.story-caption { margin-top: 24px; font-size: 12px; letter-spacing: .14em; color: var(--ink-2); }
.story-hint { margin-top: 10px; font-size: 11px; color: var(--ink-3, #86868b); letter-spacing: .08em; }
.story-copy { position: relative; min-height: 340px; }
.story-step {
  position: absolute; inset: 0; opacity: 0; transform: translateY(26px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.22,.61,.36,1);
  pointer-events: none;
}
.story-step.is-active { opacity: 1; transform: none; pointer-events: auto; }
.story-idx { font-size: 11px; letter-spacing: .16em; color: var(--ink-2); margin-bottom: 20px; }
.story-step h2 {
  margin: 0 0 20px; font-size: clamp(34px, 4.4vw, 56px); line-height: 1.05;
  font-weight: 600; letter-spacing: -.045em; color: var(--ink);
}
.story-step p { margin: 0; max-width: 420px; font-size: 16px; line-height: 1.7; color: var(--ink-2); }

@media (max-width: 860px) {
  .scroll-story { height: auto; }
  .story-pin { position: static; height: auto; display: block; padding: 36px 0 8px; }
  .story-visual { min-height: 300px; margin-bottom: 8px; }
  .story-ring { width: 240px; height: 240px; }
  .story-metric { font-size: 96px; }
  .story-copy { min-height: 0; }
  .story-step { position: static; opacity: 1; transform: none; pointer-events: auto; margin: 0 0 36px; }
  .story-step h2 { font-size: 32px; }
  .story-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html.fx .fx-reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .story-step { transition: none; }
  .story-metric { transition: none; }
}

/* 减弱动态效果 / 关闭动效时：三幕退化成静态卡片 */
html.no-scroll-fx .scroll-story { height: auto; }
html.no-scroll-fx .story-pin { position: static; height: auto; display: block; padding: 36px 0 8px; }
html.no-scroll-fx .story-visual { min-height: 300px; margin-bottom: 8px; }
html.no-scroll-fx .story-copy { min-height: 0; }
html.no-scroll-fx .story-step { position: static; opacity: 1; transform: none; pointer-events: auto; margin: 0 0 36px; }
html.no-scroll-fx .story-hint { display: none; }

/* 静态版收紧视觉，避免大数字压住正文 */
html.no-scroll-fx .story-metric { font-size: 96px; }
html.no-scroll-fx .story-ring { width: 220px; height: 220px; }
html.no-scroll-fx .story-visual { min-height: 260px; }
html.no-scroll-fx .story-copy { max-width: 680px; margin: 0 auto; }

@media (max-width: 720px) {
  .lg-root .lg-top { height: auto; min-height: 48px; padding: 8px 16px; gap: 8px; }
  .lg-root .lg-top-right { gap: 0; }
  .lg-root .lg-mode { display: none; }
  .lg-root .lg-skip { font-size: 11px; padding: 6px 6px; white-space: nowrap; }
  .lg-root .lg-brand-txt { font-size: 10px; letter-spacing: .04em; }
}
