/* 群内足球报名 —— 移动端样式表 */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #EDF1EA;
  --surface: #FFFFFF;
  --ink: #152019;
  --ink2: #46564C;
  --muted: #7C8B81;
  --line: #E3E9E1;
  --pitch: #0E7A4D;
  --pitch-soft: #E6F3EB;
  --amber: #CF7426;
  --amber-soft: #FBEFE2;
  --danger: #B3453A;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(18, 40, 27, .06);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 14px calc(96px + var(--safe-bottom));
}

a { color: var(--pitch); text-decoration: none; }

/* ---------- 顶部 ---------- */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 2px 12px;
  min-height: 40px;
}
.topbar .back {
  width: 32px; height: 32px; border-radius: 11px; border: 1px solid var(--line);
  background: #fff; display: grid; place-items: center; color: var(--ink2);
  font-size: 16px; cursor: pointer; flex: 0 0 auto;
}
.topbar .grow { flex: 1; min-width: 0; }
.topbar .label { font-size: 12px; color: var(--muted); letter-spacing: .3px; }
.topbar .ttl {
  font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.live {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--pitch); font-weight: 600; white-space: nowrap;
}
.live i { width: 6px; height: 6px; border-radius: 50%; background: #139B60; animation: pulse 2.2s infinite; }
.live.off i { background: #B9C4BA; animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(19, 155, 96, .45); }
  70% { box-shadow: 0 0 0 7px rgba(19, 155, 96, 0); }
  100% { box-shadow: 0 0 0 0 rgba(19, 155, 96, 0); }
}

/* ---------- 首页 hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(158deg, #108054, #0B6A45 60%, #095C3B);
  border-radius: 24px; padding: 22px 20px 20px; color: #fff;
  box-shadow: 0 16px 34px rgba(10, 92, 59, .24);
}
.hero::after {
  content: ""; position: absolute; right: -58px; top: -70px; width: 210px; height: 210px;
  border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .12);
  box-shadow: 0 0 0 28px rgba(255, 255, 255, .045), 0 0 0 60px rgba(255, 255, 255, .028);
}
.hero .eyebrow {
  display: inline-block; font-size: 11px; letter-spacing: .4px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2);
  padding: 5px 10px; border-radius: 99px; position: relative; z-index: 1;
}
.hero h1 { font-size: 26px; line-height: 1.32; margin: 14px 0 8px; position: relative; z-index: 1; letter-spacing: -.3px; }
.hero p { font-size: 13px; color: rgba(255, 255, 255, .82); position: relative; z-index: 1; }
.hero .cta {
  position: relative; z-index: 1; margin-top: 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; height: 48px; border: 0; border-radius: 14px;
  background: #fff; color: #0B6A45; font-size: 15.5px; font-weight: 700;
  font-family: inherit; cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .14);
}
.hero .cta:active { transform: scale(.985); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 15px; margin-top: 12px;
  box-shadow: var(--shadow);
}
.card > h2 {
  font-size: 12.5px; font-weight: 650; color: var(--muted);
  letter-spacing: .4px; margin-bottom: 10px;
}

/* ---------- 活动信息（锁定） ---------- */
.info {
  position: relative; overflow: hidden;
  background: linear-gradient(158deg, #108054, #0B6A45 62%, #0A5E3D);
  border-radius: 22px; padding: 16px; color: #fff;
  box-shadow: 0 12px 26px rgba(11, 95, 62, .22);
}
.info::after {
  content: ""; position: absolute; right: -46px; top: -58px; width: 190px; height: 190px;
  border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .13);
  box-shadow: 0 0 0 26px rgba(255, 255, 255, .045), 0 0 0 54px rgba(255, 255, 255, .03);
}
.info-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.badge {
  font-size: 10.5px; background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .22); padding: 4px 8px; border-radius: 99px;
}
.badge.warn { background: rgba(255, 214, 170, .18); border-color: rgba(255, 214, 170, .35); color: #FFE2C4; }
.code-tag { font-size: 10.5px; letter-spacing: 1.6px; color: rgba(255, 255, 255, .8); }
.info h1 { font-size: 19.5px; line-height: 1.36; margin: 11px 0 12px; position: relative; z-index: 1; }
.meta { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: rgba(255, 255, 255, .9); position: relative; z-index: 1; }
.meta div { display: flex; align-items: center; gap: 8px; }
.meta svg { width: 14px; height: 14px; opacity: .75; flex: 0 0 auto; }
.info-foot {
  margin-top: 13px; padding-top: 11px; border-top: 1px solid rgba(255, 255, 255, .16);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: rgba(255, 255, 255, .72); position: relative; z-index: 1;
}
.fee { font-size: 15px; font-weight: 700; color: #fff; }
.fee small { font-size: 10.5px; font-weight: 400; opacity: .7; margin-left: 2px; }

/* ---------- 进度 ---------- */
.prog-top { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--ink2); }
.prog-top b { color: var(--pitch); font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 99px; background: #EEF2EC; margin-top: 9px; overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #17A567, #0E7A4D); transition: width .35s; }
.bar i.gk { background: linear-gradient(90deg, #E9A35F, #CF7426); }
.legend { display: flex; gap: 13px; margin-top: 9px; font-size: 10.5px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { width: 6px; height: 6px; border-radius: 2px; }

/* ---------- 队伍 ---------- */
.team { margin-top: 12px; }
.team-head { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.dot { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }
.tname { font-size: 14.5px; font-weight: 700; }
.tcount { margin-left: auto; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tcount b { color: var(--ink2); font-weight: 600; }

.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.slot {
  display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 8px 9px;
  border-radius: 11px; background: #FBFCFA; border: 1px dashed #D7E1D6;
  font-size: 12px; color: var(--ink); text-align: left; font-family: inherit;
  cursor: pointer; transition: transform .12s, border-color .15s, background .15s;
  overflow: hidden;
}
.slot:active { transform: scale(.97); }
.slot.on { border-style: solid; border-color: #E3EAE1; background: #F7FAF6; cursor: default; }
.slot.mine { border-color: var(--pitch); background: var(--pitch-soft); }
.idx {
  width: 20px; height: 20px; border-radius: 7px; background: #EDF2EA; color: #8B9A8E;
  font-size: 10px; font-weight: 700; display: grid; place-items: center; flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}
.slot.on .idx { background: #E4EFE2; color: #4F6B54; }
.slot.mine .idx { background: #CFE8D8; color: #0B6A45; }
.nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot:not(.on) .nm { color: #AAB7AC; font-size: 11.5px; }
.slot.dim { opacity: .45; cursor: not-allowed; }

/* ---------- 预留位（施耐德1-5 / 泰国1-5） ---------- */
.adopt {
  display: flex; align-items: center; gap: 8px; margin: -3px 0 11px;
  padding: 7px 9px; border-radius: 10px; background: #F4F8F2; border: 1px solid #E8EFE4;
}
.adopt-label { font-size: 10.5px; font-weight: 700; color: #4F6B54; flex: 0 0 auto; }
.adopt-sel {
  appearance: none; -webkit-appearance: none;
  width: 50px; height: 26px; padding: 0 20px 0 9px; border-radius: 8px;
  border: 1px solid #CFE0CB; background: #FFF;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%234F6B54' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center;
  font-family: inherit; font-size: 12.5px; font-weight: 700; color: #2F4437;
  font-variant-numeric: tabular-nums; cursor: pointer; flex: 0 0 auto;
}
.adopt-sel:disabled { opacity: .55; cursor: wait; }
.adopt-sel:focus-visible { outline: 2px solid #9CC6A8; outline-offset: 1px; }
.adopt-hint { font-size: 10.5px; color: var(--muted); line-height: 1.45; }
.adopt-hint b { color: #2F4437; font-weight: 700; }

.slot.ph { border-style: solid; border-color: #DCE8DC; background: #F1F7EF; cursor: not-allowed; }
.slot.ph .idx { background: #E1EEDD; color: #4F7A57; }
.slot:not(.on).ph .nm { color: #4F7A57; font-weight: 650; font-size: 11.5px; }
.slot.ph::after {
  content: "预留"; font-size: 9px; color: #6E8B72; background: #E6F1E2;
  padding: 1px 4px; border-radius: 4px; flex: 0 0 auto;
}

.keeper { margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.ktag { font-size: 10px; font-weight: 700; color: #A85A18; background: var(--amber-soft); padding: 3px 6px; border-radius: 6px; flex: 0 0 auto; }
.kslot {
  flex: 1; display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 9px;
  border-radius: 11px; background: #FEFAF5; border: 1px dashed #E4D6C6;
  font-size: 12px; font-family: inherit; color: var(--ink); text-align: left; cursor: pointer;
}
.kslot.on { border-style: solid; border-color: #EFE0D0; background: #FDF7F0; cursor: default; }
.kslot.mine { border-color: var(--amber); background: #FBEFE2; }
.kslot:not(.on) .nm { color: #C0AC97; font-size: 11.5px; }
.kslot.dim { opacity: .45; cursor: not-allowed; }

/* ---------- 底部操作栏 ---------- */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + var(--safe-bottom));
}
.actionbar .inner { max-width: 480px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.actionbar .status { flex: 1; min-width: 0; }
.actionbar .status .k { font-size: 10.5px; color: var(--muted); }
.actionbar .status .v { font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn {
  height: 46px; padding: 0 20px; border-radius: 14px; border: 0;
  font-family: inherit; font-size: 15px; font-weight: 650; cursor: pointer;
  background: var(--pitch); color: #fff; white-space: nowrap;
  box-shadow: 0 8px 18px rgba(14, 122, 77, .24);
  transition: transform .12s;
}
.btn:active { transform: scale(.97); }
.btn.ghost { background: #fff; color: var(--ink2); border: 1px solid var(--line); box-shadow: none; }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid #EFD9D5; box-shadow: none; }
.btn.block { width: 100%; }
.btn[disabled] { background: #DCE3DA; color: #8FA094; box-shadow: none; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink2); margin-bottom: 7px; }
.field .hint { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.input, .textarea, select.input {
  width: 100%; border: 1px solid var(--line); background: #FBFCFA; border-radius: 12px;
  padding: 12px 13px; font-size: 15px; font-family: inherit; color: var(--ink);
  outline: none; transition: border-color .15s, background .15s; appearance: none;
}
.input:focus, .textarea:focus { border-color: var(--pitch); background: #fff; }
.input::placeholder, .textarea::placeholder { color: #B4BFB6; }
.textarea { min-height: 78px; resize: vertical; line-height: 1.6; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lockhint {
  display: flex; gap: 9px; align-items: flex-start;
  background: #FFF8EC; border: 1px solid #F2E2C9; border-radius: 13px;
  padding: 11px 12px; font-size: 11.5px; line-height: 1.65; color: #8A6428; margin-bottom: 16px;
}
.lockhint b { color: #7A5620; }
.checkline { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--ink2); margin: 4px 0 18px; }
.checkline input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--pitch); flex: 0 0 auto; }

/* ---------- 列表项 ---------- */
.item {
  display: flex; align-items: center; gap: 12px; padding: 12px 2px;
  border-bottom: 1px solid #F1F4EF; cursor: pointer;
}
.item:last-child { border-bottom: 0; }
.item .when { text-align: center; flex: 0 0 auto; width: 46px; }
.item .when .d { font-size: 17px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.item .when .m { font-size: 10px; color: var(--muted); margin-top: 2px; }
.item .body { flex: 1; min-width: 0; }
.item .body .t { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .body .s { font-size: 11.5px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .tail { font-size: 11px; color: var(--muted); white-space: nowrap; flex: 0 0 auto; text-align: right; }
.pill { font-size: 10px; padding: 2px 7px; border-radius: 99px; background: var(--pitch-soft); color: var(--pitch); font-weight: 600; }
.pill.gray { background: #F0F2EE; color: var(--muted); }
.pill.amber { background: var(--amber-soft); color: #A85A18; }
.empty { font-size: 12.5px; color: var(--muted); line-height: 1.8; padding: 6px 0 2px; }

/* ---------- 弹层 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(16, 30, 22, .42); z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.mask.show { opacity: 1; pointer-events: auto; }
.sheet {
  width: 100%; max-width: 480px; background: #fff;
  border-radius: 22px 22px 0 0; padding: 18px 18px calc(18px + var(--safe-bottom));
  transform: translateY(18px); transition: transform .24s cubic-bezier(.2, .8, .3, 1);
  max-height: 88vh; overflow-y: auto;
}
.mask.show .sheet { transform: translateY(0); }
.sheet h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.sheet .sub { font-size: 12.5px; color: var(--muted); line-height: 1.65; }
.sheet .actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet .actions .btn { flex: 1; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.94);
  background: rgba(21, 32, 25, .9); color: #fff; font-size: 13.5px;
  padding: 11px 18px; border-radius: 12px; z-index: 90; max-width: 76vw; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; line-height: 1.5;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ---------- 骨架 ---------- */
.skeleton {
  background: linear-gradient(90deg, #F2F5F0 25%, #E9EEE7 37%, #F2F5F0 63%);
  background-size: 400% 100%; animation: sk 1.3s infinite;
  border-radius: var(--radius); height: 100px; margin-top: 12px;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.foot { text-align: center; font-size: 10.5px; color: var(--muted); line-height: 1.9; margin-top: 18px; }
.foot b { color: var(--ink2); font-weight: 600; }

/* ---------- 替补栏 ---------- */
.subcard { border-color: #EBE3D5; }
.subhead { display: flex; align-items: center; gap: 8px; }
.subtitle { font-size: 13.5px; font-weight: 700; }
.subcount {
  font-size: 10.5px; font-weight: 600; color: #A85A18;
  background: var(--amber-soft); padding: 2px 8px; border-radius: 99px;
}
.subtip { font-size: 11.5px; color: var(--muted); line-height: 1.7; margin-top: 7px; }
.sublist { margin-top: 10px; border-top: 1px solid #F5F1E9; }
.sub-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 0;
  border-bottom: 1px solid #F8F5EE; font-size: 12.5px;
}
.sub-item:last-child { border-bottom: 0; }
.sub-item.me .snm { color: #A85A18; font-weight: 650; }
.sidx {
  width: 20px; height: 20px; border-radius: 7px; background: #FBF3E8; color: #A85A18;
  font-size: 10px; font-weight: 700; display: grid; place-items: center;
  font-variant-numeric: tabular-nums; flex: 0 0 auto;
}
.snm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stag { font-size: 10px; padding: 2px 7px; border-radius: 6px; background: var(--pitch-soft); color: var(--pitch); flex: 0 0 auto; }
.stag.amber { background: var(--amber-soft); color: #A85A18; }
.subnext { margin-top: 10px; font-size: 11px; color: var(--muted); }
.subnext b { color: var(--ink2); font-weight: 650; }
