/* ============================================================
 * 公众号 H5 成绩展示端
 * 移动优先 · 微信内置浏览器适配 · 海报感视觉
 * ============================================================ */

/* ============================================================
 * 主题 Token（与记分 App 同名同语义）
 *   - 默认 = 中国红；切换只替换 --brand* / 中性 / rgb 分量
 *   - 成绩语义色（低于/高于标准杆、金银铜）三主题共用
 *   - --g-* 是旧名兼容层，新代码请用 --brand*
 * ============================================================ */
:root {
  /* ---- 品牌色阶 9 阶（随主题切换；默认 = 中国红 China Red） ---- */
  --b-950: #540e0e; --b-900: #7a1515; --b-800: #9c1d1d; --b-700: #bd2626; --b-600: #de3636;
  --b-500: #e85454; --b-300: #f4a5a5; --b-100: #fbe0e0; --b-50: #fdeeee;

  /* ---- 语义映射：新代码统一用 --brand* / --b-* ---- */
  --brand: var(--b-600);      /* 主按钮 / 选中态 / LIVE 徽章（白字） */
  --brand-d: var(--b-700);    /* 正文强调、已完赛文字 */
  --brand-l: var(--b-100);    /* 浅底标签边、已记洞边框 */
  --brand-soft: var(--b-50);  /* 选中行、tag 底 */
  --brand-300: var(--b-300);  /* 深底上的次级强调 */
  --brand-line: var(--b-100);
  --brand-rgb: 222, 54, 54;   /* = --b-600，供 rgba() 使用 */
  --hero-bg: linear-gradient(158deg, var(--b-800) 0%, var(--b-900) 46%, var(--b-950) 100%);
  --hero-shadow: 0 16px 34px -22px rgba(84, 14, 14, 0.9);
  --glow-brand: 0 6px 14px -8px rgba(222, 54, 54, 0.9);
  --glow-soft: 0 6px 16px -8px rgba(222, 54, 54, 0.55);

  /* ---- 中性（随主题微调色相） ---- */
  --ink: #1f1212;
  --ink-2: #4a2f2f;
  --muted: #866565;
  --bg: #faf7f7;
  --card: #ffffff;
  --line: #f0e5e5;
  --line-2: #e3d2d2;
  --ink-rgb: 31, 18, 18;
  --bg-rgb: 250, 247, 247;
  --page-outside: #f2e6e6;
  --tint: #fdf5f5;
  --tint-2: #fdf8f8;
  --tint-3: #fefbfb;
  --hair: #f7eaea;
  --edge: #ddcaca;

  /* ---- 成绩与状态语义（不随主题变化） ---- */
  --gold: #d4a017;
  --gold-l: #fdf5e3;
  --gold-ink: #b07c00;
  --silver: #9aa8b2;
  --bronze: #b97a4d;
  --under: #0f8a44;
  --under-l: #ecf8f0;
  --under-line: #bfe6cc;
  --over: #b47c11;
  --over-l: #fdf7ee;
  --over-line: #f0e0c6;
  --danger: #d94a4a;

  /* ---- 兼容旧名 ---- */
  --g-900: var(--b-900);
  --g-700: var(--brand-d);
  --g-600: var(--brand);
  --g-500: var(--brand);
  --g-300: var(--brand-300);
  --g-50: var(--brand-l);
  --red: var(--danger);

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --maxw: 520px;
}

/* ---------------- 主题：常青绿 Evergreen ---------------- */
:root[data-theme='green'] {
  --b-950: #04281a; --b-900: #06331e; --b-800: #0a4a2b; --b-700: #0b6b34; --b-600: #0e7c3e;
  --b-500: #12833f; --b-300: #7fd69d; --b-100: #d8f0e1; --b-50: #ebf7ef;
  --brand-rgb: 14, 124, 62;
  --hero-shadow: 0 16px 34px -22px rgba(4, 40, 26, 0.9);
  --glow-brand: 0 6px 14px -8px rgba(14, 124, 62, 0.9);
  --glow-soft: 0 6px 16px -8px rgba(14, 124, 62, 0.55);
  --ink: #0e1f17;
  --ink-2: #33463c;
  --muted: #6e8578;
  --bg: #f4f6f2;
  --line: #e6ece7;
  --line-2: #d3ded7;
  --ink-rgb: 14, 31, 23;
  --bg-rgb: 244, 246, 242;
  --page-outside: #e8ece7;
  --tint: #f0f7f2;
  --tint-2: #f7faf7;
  --tint-3: #fbfdfb;
  --hair: #eef3ee;
  --edge: #c3cfc7;
}

/* ---------------- 主题：竞海蓝 Azure ---------------- */
:root[data-theme='blue'] {
  --b-950: #041e33; --b-900: #062844; --b-800: #0a3d63; --b-700: #0b4a7a; --b-600: #0f5c93;
  --b-500: #1471b0; --b-300: #9bcdf0; --b-100: #d6e9f8; --b-50: #e9f2fa;
  --brand-rgb: 15, 92, 147;
  --hero-shadow: 0 16px 34px -22px rgba(4, 30, 51, 0.9);
  --glow-brand: 0 6px 14px -8px rgba(15, 92, 147, 0.9);
  --glow-soft: 0 6px 16px -8px rgba(15, 92, 147, 0.55);
  --ink: #0e1c28;
  --ink-2: #33485c;
  --muted: #6c8296;
  --bg: #f3f6f9;
  --line: #e3eaf1;
  --line-2: #cddae7;
  --ink-rgb: 14, 28, 40;
  --bg-rgb: 243, 246, 249;
  --page-outside: #e6edf4;
  --tint: #eff5fb;
  --tint-2: #f7fafd;
  --tint-3: #fbfdff;
  --hair: #e9f1f8;
  --edge: #c2d2e0;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--page-outside);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

#app {
  max-width: var(--maxw);
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  padding-bottom: calc(72px + var(--safe-b));
  box-shadow: 0 0 60px rgba(var(--ink-rgb), .08);
}

/* ---------------- 加载态 ---------------- */
.boot { padding: 96px 24px; text-align: center; color: var(--muted); font-size: 13.5px; }
.boot-ball {
  width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid var(--g-50); border-top-color: var(--g-500);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }

.error-box { padding: 80px 28px; text-align: center; }
.error-box h3 { margin: 0 0 8px; font-size: 17px; }
.error-box p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.7; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; overflow: hidden;
  padding: calc(var(--safe-t) + 26px) 22px 24px;
  background: var(--hero-bg);
  color: #fff;
}
/* 发丝线网格：代替原来的大光斑，是「场地/标准方格」的暗示，不抢内容 */
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 82%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 82%);
}
.hero::after {
  content: ''; position: absolute; right: -60px; top: -70px;
  width: 210px; height: 210px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.22), rgba(255,255,255,0) 65%);
}
/* 头图并列另外两语的赛事名：数据提供了 name_ko / name_en 才出现 */
.hero .altname {
  position: relative; z-index: 1; margin-top: 6px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
  font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .66);
  line-height: 1.45;
}
.hero .altname i { font-style: normal; opacity: .5; }

.hero .row1 { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.hero .org {
  font-size: 11.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  opacity: .82;
}
.hero .badge {
  margin-left: auto; font-size: 11px; font-weight: 800;
  padding: 3px 9px; border-radius: 999px; letter-spacing: .3px;
  background: rgba(255,255,255,.16); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.22);
}
.hero .badge.live { background: rgba(255,86,86,.22); border-color: rgba(255,140,140,.4); }
.hero .badge.live::before {
  content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: #ff7b7b; margin-right: 5px; vertical-align: 1px;
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .2 } }

.hero h1 {
  position: relative; z-index: 1;
  margin: 14px 0 8px; font-size: 25px; line-height: 1.28; font-weight: 800;
  letter-spacing: -.6px;
}
.hero .sub {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 5px 14px; font-size: 12.5px; opacity: .88;
}
.hero .numbers {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin-top: 20px; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.16);
}
.hero .numbers div { text-align: center; }
.hero .numbers b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.6px; line-height: 1.15; }
.hero .numbers span { font-size: 10.5px; opacity: .72; }
.hero .numbers b small { font-size: 11px; font-weight: 600; opacity: .8; margin-left: 1px; }

/* ---------------- 分段导航 ---------------- */
.segs {
  position: sticky; top: 0; z-index: 40;
  background: rgba(var(--bg-rgb), .94);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  padding: 10px 14px;
  display: flex; gap: 6px;
  border-bottom: 1px solid var(--line);
}
.seg {
  flex: 1; height: 36px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  background: #fff; border: 1.5px solid var(--line);
  transition: all .16s;
}
.seg.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--glow-brand); }

/* ---------------- 内容块 ---------------- */
.panel { padding: 14px 14px 4px; animation: fadeUp .3s ease; }
@keyframes fadeUp { from { transform: translateY(6px) } to { transform: none } }

.sect-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 2px 9px;
}
.sect-head h2 {
  margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 1.2px;
  color: var(--muted); text-transform: uppercase;
}
.sect-head .aside { font-size: 11.5px; color: var(--muted); }

.card {
  background: var(--card); border-radius: 18px;
  box-shadow: 0 1px 2px rgba(var(--ink-rgb), .03), 0 10px 26px -18px rgba(var(--ink-rgb), .22);
  overflow: hidden;
}
.card + .card { margin-top: 12px; }
.card-pad { padding: 16px; }

/* ---------------- 领奖台 ---------------- */
.podium-card { padding: 16px 12px 0; }
.podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: end; gap: 6px; }
.pod { text-align: center; padding-bottom: 0; }
.pod .av {
  width: 46px; height: 46px; margin: 0 auto 7px; border-radius: 15px;
  display: grid; place-items: center; font-size: 16px; font-weight: 800;
  background: var(--brand-l); color: var(--brand-d);
  position: relative;
}
.pod .crown {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  font-size: 15px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.18));
}
.pod.p1 .av { width: 56px; height: 56px; border-radius: 18px; font-size: 18px;
  background: linear-gradient(150deg, #ffe9a8, #e8b21f); color: #6b4700;
  box-shadow: 0 12px 22px -14px rgba(212,160,23,.95); }
.pod.p2 .av { background: linear-gradient(150deg, #eef3f6, #c6d0d8); color: #4c5a64; }
.pod.p3 .av { background: linear-gradient(150deg, #f6e2d0, #d9a97f); color: #6b4526; }
/* 名字 + 国旗：名字可压缩（省略号），国旗不参与压缩，永远不会被挤没 */
.pnm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .nm { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 700; overflow: hidden; }
.pod .sc { font-size: 17px; font-weight: 800; color: var(--brand-d); letter-spacing: -.4px; line-height: 1.2; }
.pod .df { font-size: 10.5px; color: var(--muted); }
.pod .bar {
  margin-top: 9px; border-radius: 10px 10px 0 0; height: 34px;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800;
  background: var(--hair); color: var(--muted);
}
.pod.p1 .bar { height: 48px; background: linear-gradient(180deg,#fdf3d8,#f8e7bc); color: #b07c00; }
.pod.p2 .bar { height: 40px; background: #f1f5f7; color: #8b9aa4; }
.pod.p3 .bar { height: 34px; background: #faf0e8; color: #b0805c; }

/* ---------------- 榜单 ---------------- */
.lb-row { display: flex; align-items: center; gap: 11px; padding: 12px 15px; position: relative; }
.lb-row + .lb-row { border-top: 1px solid var(--line); }
.lb-row.me { background: linear-gradient(90deg, var(--brand-l), #fff 70%); }
.lb-row.me::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.rk {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: 9px;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 800;
  background: var(--hair); color: var(--muted); font-variant-numeric: tabular-nums;
}
.rk.r1 { background: linear-gradient(150deg,#ffe9a8,#e8b21f); color: #6b4700; }
.rk.r2 { background: linear-gradient(150deg,#eef3f6,#c6d0d8); color: #4c5a64; }
.rk.r3 { background: linear-gradient(150deg,#f6e2d0,#d9a97f); color: #6b4526; }
.lb-main { flex: 1; min-width: 0; }
.lb-main b { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 14.5px; font-weight: 700; letter-spacing: -.2px; }
.lb-main b .flag { font-size: 13px; }
.lb-main span { font-size: 11px; color: var(--muted); }
.lb-sc { text-align: right; flex: 0 0 auto; }
.lb-sc b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; line-height: 1.25; }
.lb-sc span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.mini-progress { height: 3px; border-radius: 2px; background: var(--hair); margin-top: 5px; overflow: hidden; }
.mini-progress i { display: block; height: 100%; background: var(--g-300); border-radius: 2px; }

/* ---------------- 成绩表 ---------------- */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { border-collapse: separate; border-spacing: 0; width: 100%; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 8px 7px; text-align: center; font-size: 12.5px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl thead th { background: var(--tint-2); color: var(--muted); font-weight: 700; font-size: 11px; position: sticky; top: 0; z-index: 2; }
.tbl td.nm, .tbl th.nm {
  text-align: left; padding-left: 12px; background: #fff; position: sticky; left: 0; z-index: 1;
  font-weight: 700; min-width: 104px; width: 104px;
}
.tbl thead th.nm { background: var(--tint-2); z-index: 4; }
/* 选手列后的国籍列：与选手/总杆一起钉在左侧，横向滚动时不丢 */
.tbl td.nat, .tbl th.nat {
  position: sticky; left: 104px; z-index: 2; background: #fff;
  width: 58px; min-width: 58px; padding: 8px 4px;
  box-shadow: 1px 0 0 var(--line);
}
.tbl thead th.nat { background: var(--tint-2); z-index: 4; }
.tbl td.nat i { font-style: normal; font-size: 10px; font-weight: 800; color: var(--muted); margin-left: 4px; }
.tbl td.nat .flag { font-size: 15px; }
.tbl td.tot, .tbl th.tot {
  position: sticky; left: 162px; z-index: 2; background: var(--tint-3);
  font-weight: 800; min-width: 52px; box-shadow: 1px 0 0 var(--line);
}
.tbl thead th.tot { background: var(--tint-2); z-index: 4; }
.tbl td.tot small { display: block; font-size: 10px; font-weight: 700; margin-top: -3px; color: var(--muted); }
.tbl td sup { font-size: 8px; vertical-align: super; opacity: .9; }
.rknum {
  display: inline-grid; place-items: center; width: 18px; height: 18px;
  border-radius: 6px; background: var(--hair); color: var(--muted);
  font-size: 10.5px; font-weight: 800; font-style: normal; margin-right: 6px;
}
.rknum.top { background: linear-gradient(150deg, #ffe9a8, #e8b21f); color: #6b4700; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td.tot { font-weight: 800; background: var(--tint-3); }
.tbl .u { color: var(--under); font-weight: 800; }
.tbl .o { color: var(--over); }
.tbl .e { color: var(--edge); }
.tbl .rk-cell { font-weight: 800; color: var(--muted); }
/* 多轮赛事：每轮首洞左侧分隔线 + 各轮小计加深 */
.tbl th.rfirst, .tbl td.rfirst { box-shadow: inset 2px 0 0 var(--line); }
.tbl th.rtot, .tbl td.rtot { background: var(--tint-3); font-weight: 800; box-shadow: inset 2px 0 0 var(--line); }
.tbl thead tr.rgroup th { background: var(--brand-l); color: var(--brand-d); font-size: 11px; font-weight: 800; }
.tbl thead tr.rgroup th + th { border-left: 1px solid var(--line); }

.legend { display: flex; gap: 14px; padding: 10px 14px 0; font-size: 11px; color: var(--muted); }
.legend i { font-style: normal; font-weight: 800; }

/* ---------------- 统计条 ---------------- */
.statrow { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--card); border-radius: 16px; overflow: hidden; }
/* 只有两项时（如排行页全场数据）用两列，避免右侧空出一格 */
.statrow.two { grid-template-columns: repeat(2, 1fr); }
.statrow div { padding: 13px 8px; text-align: center; position: relative; }
.statrow div + div::before { content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--line); }
.statrow b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.5px; }
.statrow span { font-size: 10.5px; color: var(--muted); }

/* ---------------- 赛程 ---------------- */
.group-card { padding: 14px 15px; }
.group-card + .group-card { border-top: 1px solid var(--line); }
.group-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.group-tag {
  min-width: 30px; height: 30px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-l); color: var(--brand-d); font-weight: 800; font-size: 13px;
}
.group-head b { font-size: 14px; }
.group-head span { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.mem { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.mem .av {
  width: 26px; height: 26px; border-radius: 9px; flex: 0 0 26px;
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
  background: var(--hair); color: var(--ink-2);
}
.mem .n { flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; font-size: 13px; }
.mem .n .flag { font-size: 12px; }
.mem .s { font-size: 12.5px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* 球场洞位 */
.hole-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px; }
.hole-cell {
  background: var(--tint-2); border-radius: 12px; padding: 9px 10px;
  border: 1px solid var(--line);
}
.hole-cell .no { font-size: 10.5px; color: var(--muted); font-weight: 700; letter-spacing: .3px; }
.hole-cell .par { font-size: 16px; font-weight: 800; letter-spacing: -.4px; line-height: 1.3; }
.hole-cell .dst { font-size: 10.5px; color: var(--muted); }

/* ---------------- 我的成绩 ---------------- */
.search-box { display: flex; gap: 8px; padding: 4px 0 2px; }
.search-box input {
  flex: 1; height: 46px; padding: 0 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: #fff; font-size: 15px; outline: none;
  -webkit-appearance: none;
}
.search-box input:focus { border-color: var(--brand); }
.search-box button {
  width: 76px; height: 46px; border-radius: 14px; border: 0;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 700;
}
/* 快速查看的人名一律单行：不折行，放不下就整块换行，过长才省略号收尾 */
.qchip {
  display: inline-block; max-width: 100%; height: 32px; line-height: 32px;
  padding: 0 12px; border-radius: 10px; background: var(--tint); color: var(--ink-2);
  font-weight: 600; font-size: 12.5px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: top;
}
.qchip:active { background: var(--tint-2); }
.match-list .lb-row { cursor: pointer; }
.suggest { padding: 6px 2px; font-size: 12px; color: var(--muted); }

/* 个人成绩卡 */
.pcard-hero {
  border-radius: 20px; padding: 20px; color: #fff; position: relative; overflow: hidden;
  background: var(--hero-bg);
  box-shadow: var(--hero-shadow);
}
.pcard-hero::after {
  content: ''; position: absolute; right: -40px; bottom: -70px; width: 180px; height: 180px;
  border-radius: 50%; background: radial-gradient(circle at 40% 40%, rgba(255,255,255,.12), transparent 68%);
}
.pcard-hero .who { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.pcard-hero .bigav {
  width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center;
  background: rgba(255,255,255,.18); font-size: 20px; font-weight: 800;
  border: 1px solid rgba(255,255,255,.24);
}
.pcard-hero .who b { font-size: 18px; letter-spacing: -.3px; }
.pcard-hero .who span { display: block; font-size: 11.5px; opacity: .78; }
.pcard-hero .scoreline {
  position: relative; z-index: 1;
  display: flex; align-items: flex-end; gap: 18px; margin-top: 18px;
}
.pcard-hero .scoreline .big { font-size: 46px; font-weight: 800; letter-spacing: -2px; line-height: .95; }
.pcard-hero .scoreline .cap { font-size: 11px; opacity: .72; }
.pcard-hero .scoreline .to { font-size: 15px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.18); margin-bottom: 6px; }
.pcard-hero .rankline { position: relative; z-index: 1; margin-top: 14px; font-size: 12.5px; opacity: .88; }

.hole-strip { display: flex; gap: 4px; padding: 14px; overflow-x: auto; }
/* 多轮：每段之前加一行轮次小标题，标明该轮杆数与 ± */
.strip-cap {
  padding: 12px 14px 0; font-size: 12px; font-weight: 800; color: var(--brand-d);
  border-top: 1px dashed var(--line); margin-top: 2px;
}
.card > .strip-cap:first-child, .card > .strip-cap:nth-child(1) { border-top: 0; }
/* 分轮小计（在我的成绩页统计卡下方） */
.rsum { margin-top: 12px; border-top: 1px solid var(--line); }
.rsum-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 4px;
  border-bottom: 1px dashed var(--line); font-size: 13px;
}
.rsum-item:last-child { border-bottom: 0; }
.rsum-item .rl { color: var(--muted); font-weight: 700; }
.rsum-item b { margin-left: auto; font-size: 16px; font-weight: 800; letter-spacing: -.4px; }
.rsum-item .rd { width: 52px; text-align: right; font-weight: 800; color: var(--brand-d); }
.rsum-item.todo b, .rsum-item.todo .rd { color: var(--edge); }
.hole-mini {
  flex: 0 0 auto; width: 34px; border-radius: 9px; padding: 6px 0; text-align: center;
  background: var(--tint-2); border: 1px solid var(--line);
}
.hole-mini .h { font-size: 9.5px; color: var(--muted); }
.hole-mini .v { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hole-mini .v sup { font-size: 8.5px; font-weight: 700; color: var(--muted); opacity: .9; }
.hole-mini.birdie { background: var(--under-l); border-color: var(--under-line); }
.hole-mini.birdie .v { color: var(--under); }
.hole-mini.bogey { background: var(--over-l); border-color: var(--over-line); }
.hole-mini.bogey .v { color: var(--over); }
.hole-mini.blank .v { color: var(--edge); }

.share-btn {
  display: block; width: 100%; height: 50px; border: 0; border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-d)); color: #fff;
  font-size: 15.5px; font-weight: 700; letter-spacing: .2px;
  box-shadow: var(--hero-shadow);
  margin-top: 14px;
}

/* ---------------- 底部 ---------------- */
.foot {
  padding: 26px 22px calc(88px + var(--safe-b)); text-align: center;
}
.foot .brand { font-size: 12px; font-weight: 700; color: var(--ink-2); letter-spacing: .5px; }
.foot .note { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.7; }

.wxbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: var(--maxw); z-index: 60;
  padding: 10px 16px calc(10px + var(--safe-b));
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.wxbar .ico {
  width: 34px; height: 34px; border-radius: 11px; flex: 0 0 34px;
  background: var(--brand-l); display: grid; place-items: center; font-size: 17px;
}
.wxbar .txt { flex: 1; min-width: 0; }
.wxbar .txt b { display: block; font-size: 12.5px; font-weight: 700; }
.wxbar .txt span { font-size: 10.5px; color: var(--muted); }
.wxbar .go {
  font-size: 12.5px; font-weight: 700; color: #fff; background: var(--brand);
  padding: 8px 14px; border-radius: 11px;
}

/* ---------------- 弹层 ---------------- */
.modal-host { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.modal-host.on { pointer-events: auto; }
.modal-mask { position: absolute; inset: 0; background: rgba(var(--ink-rgb), .55); opacity: 0; transition: opacity .22s; }
.modal-host.on .modal-mask { opacity: 1; }
.modal-panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.96);
  width: min(88vw, 400px); max-height: 86vh; overflow-y: auto;
  background: #fff; border-radius: 22px; padding: 18px;
  opacity: 0; transition: all .26s cubic-bezier(.2,.9,.3,1);
}
.modal-host.on .modal-panel { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal-panel h3 { margin: 0 0 12px; font-size: 16px; text-align: center; }
.modal-panel .tip { text-align: center; font-size: 12px; color: var(--muted); margin: 12px 0 0; line-height: 1.6; }
.modal-panel img { width: 100%; border-radius: 14px; display: block; }
.modal-close {
  position: absolute; right: 10px; top: 8px; width: 32px; height: 32px; border: 0;
  background: var(--hair); border-radius: 50%; font-size: 15px; color: var(--ink-2);
}

/* 分享指引 */
.share-hint {
  position: fixed; inset: 0; z-index: 300; background: rgba(var(--ink-rgb), .72);
  display: none; padding: 22px;
}
.share-hint.on { display: block; }
.share-hint .arrow { text-align: right; font-size: 40px; color: #fff; animation: bounce 1.6s infinite; }
@keyframes bounce { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
.share-hint p { color: #fff; text-align: right; font-size: 14px; line-height: 1.8; margin-top: 8px; opacity: .92; }

/* 空表 */
.blank-note { padding: 30px 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* 骨架 */
.skeleton { background: linear-gradient(90deg, var(--hair) 25%, var(--tint-2) 37%, var(--hair) 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50% } 100% { background-position: 0 50% } }

/* 多天赛事：成绩页「总成绩 / 第 N 天」切换 */
.segs.rsegs { flex-wrap: wrap; row-gap: 6px; }
.segs.rsegs .seg { padding: 0 14px; }

/* ============================================================
 * 右上角：语言 / 主题切换
 *   放在头图第一行右对齐，不与赞助方/状态徽章抢位置；
 *   触摸目标 ≥ 44px 宽；深底上的白字 + 半透明白底，保证对比。
 * ============================================================ */
.topctl {
  position: relative; z-index: 2;
  display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 16px;
}
.topctl button {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 34px; min-width: 44px; padding: 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff; font-family: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}
.topctl button:active { background: rgba(255, 255, 255, 0.3); }
.topctl .dots { display: flex; gap: 2px; }
.topctl .dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }

/* 语言 / 主题弹层里的选项 */
.opt-list { display: flex; flex-direction: column; gap: 8px; }
.opt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 50px; padding: 8px 12px; border: 0; border-radius: 14px;
  background: var(--tint-2); color: var(--ink);
  font-family: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; text-align: left;
}
.opt b { font-weight: 700; color: var(--ink); }
.opt small { font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.opt .tick { margin-left: auto; font-weight: 800; color: var(--brand-d); min-width: 14px; text-align: right; }
.opt .dots { display: flex; gap: 3px; }
.opt .dots i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.opt.on { background: var(--brand-l); box-shadow: inset 0 0 0 1.5px var(--brand-line); }
.opt.on b { color: var(--brand-d); }
.opt:active { transform: scale(0.98); }
/* 色板样品必须固定色：跟随当前主题会让三块看上去一样 */
.opt.t-green .dots i:nth-child(1) { background: #06331e; }
.opt.t-green .dots i:nth-child(2) { background: #0e7c3e; }
.opt.t-green .dots i:nth-child(3) { background: #d8f0e1; }
.opt.t-red .dots i:nth-child(1) { background: #7a1515; }
.opt.t-red .dots i:nth-child(2) { background: #de3636; }
.opt.t-red .dots i:nth-child(3) { background: #fbe0e0; }
.opt.t-blue .dots i:nth-child(1) { background: #062844; }
.opt.t-blue .dots i:nth-child(2) { background: #0f5c93; }
.opt.t-blue .dots i:nth-child(3) { background: #d6e9f8; }
