/* 壹伍体育 · 夏日21天运动打卡 — 共享设计系统（海蓝品牌 + 珊瑚橙活力） */
:root{
  --brand:#206FB8;        /* 通透海蓝（品牌主色） */
  --brand-700:#15568F;
  --brand-50:#EAF3FA;
  --brand-100:#D2E6F4;
  --coral:#FF6B4A;        /* 夏日活力珊瑚橙（核心行动色） */
  --coral-700:#E8533A;
  --gold:#C8911F;         /* 卓越勋章金 */
  --gold-soft:#F6ECCF;
  --ink:#16233A;
  --ink-2:#3A4757;
  --muted:#7C8AA0;
  --line:#E4ECF4;
  --bg:#F4F8FB;
  --card:#FFFFFF;
  --radius:18px;
  --radius-lg:24px;
  --shadow-sm:0 1px 2px rgba(32,111,184,.04),0 4px 14px rgba(32,111,184,.06);
  --shadow-md:0 6px 14px rgba(32,111,184,.06),0 14px 34px rgba(32,111,184,.10);
}
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  background:linear-gradient(180deg,#EAF3FA 0%,#F4F8FB 220px);
  background-attachment:fixed;
  color:var(--ink);line-height:1.62;
  -webkit-font-smoothing:antialiased;
}
.wrap{max-width:480px;margin:0 auto;padding:0 18px 56px}

/* ---------- 顶部品牌栏 ---------- */
.topbar{
  position:sticky;top:0;z-index:30;
  display:flex;align-items:center;gap:10px;
  padding:10px 18px;
  background:rgba(255,255,255,.88);
  backdrop-filter:saturate(180%) blur(14px);
  -webkit-backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--line);
}
.logo{height:36px;width:auto;display:block;object-fit:contain}
.logo-text{
  width:38px;height:38px;border-radius:11px;
  background:linear-gradient(135deg,var(--brand) 0%,var(--brand-700) 100%);
  color:#fff;font-weight:800;font-size:17px;letter-spacing:1px;
  display:flex;align-items:center;justify-content:center;flex:0 0 auto;
}
.brand-name{font-weight:800;font-size:17px;color:var(--ink);letter-spacing:.5px}
/* 有logo图片时隐藏文字品牌名，避免重复 */
.topbar:has(.logo:not([src=""])) .brand-name{display:none}
.slogan{
  margin-left:auto;font-size:12px;color:var(--brand);font-weight:700;
  background:var(--brand-50);padding:5px 11px;border-radius:999px;white-space:nowrap;
  border:1px solid var(--brand-100);
}

/* ---------- 通用区块 ---------- */
.section-title{font-size:15px;font-weight:700;color:var(--ink);margin:0 0 12px;display:flex;align-items:center;gap:8px}
.section-title::before{content:"";width:4px;height:15px;border-radius:3px;background:var(--brand)}
.card{background:var(--card);border-radius:var(--radius);padding:20px;box-shadow:var(--shadow-sm);margin-bottom:16px;border:1px solid var(--line)}

/* ---------- 首页 Hero ---------- */
.hero{
  position:relative;overflow:hidden;
  background:linear-gradient(135deg,var(--brand) 0%,var(--brand-700) 100%);
  color:#fff;border-radius:var(--radius-lg);
  padding:26px 22px 24px;margin:16px 0 18px;box-shadow:var(--shadow-md);
}
.hero::after{
  content:"";position:absolute;right:-34px;top:-34px;
  width:150px;height:150px;border-radius:50%;
  background:radial-gradient(circle at 30% 30%,rgba(255,255,255,.18),rgba(255,255,255,0) 70%);
}
.hero::before{
  content:"";position:absolute;left:-40px;bottom:-46px;
  width:130px;height:130px;border-radius:50%;
  background:radial-gradient(circle at 50% 50%,rgba(255,255,255,.10),rgba(255,255,255,0) 70%);
}
.hero .eyebrow{font-size:12px;opacity:.85;letter-spacing:3px;font-weight:600}
.hero h1{font-size:25px;margin:8px 0 8px;font-weight:800;letter-spacing:.5px;position:relative}
.hero p{font-size:14px;opacity:.92;line-height:1.65;position:relative}
.badge-free{
  display:inline-block;margin-top:14px;position:relative;
  background:rgba(255,255,255,.18);color:#fff;
  font-size:12px;font-weight:600;padding:5px 13px;border-radius:999px;
  border:1px solid rgba(255,255,255,.25);
}

/* ---------- 规则列表 ---------- */
.rules li{
  position:relative;list-style:none;
  padding:11px 0 11px 30px;font-size:14px;color:var(--ink-2);
  border-bottom:1px dashed var(--line);
}
.rules li:last-child{border-bottom:none}
.rules li::before{
  content:"✓";position:absolute;left:0;top:11px;
  width:19px;height:19px;border-radius:50%;
  background:var(--brand-50);color:var(--brand);
  font-size:12px;font-weight:800;
  display:flex;align-items:center;justify-content:center;
}
.rules b{color:var(--brand-700)}

/* ---------- 表单 ---------- */
label{display:block;font-size:13px;color:var(--ink-2);font-weight:600;margin:16px 0 7px}
label:first-of-type{margin-top:4px}
input,select,textarea{
  width:100%;padding:13px 14px;
  border:1.5px solid var(--line);border-radius:14px;
  font-size:15px;background:#FBFDFE;color:var(--ink);outline:none;
  transition:border-color .15s,box-shadow .15s;
  font-family:inherit;
}
input:focus,select:focus,textarea:focus{
  border-color:var(--brand);
  box-shadow:0 0 0 3px var(--brand-50);
}
.hint{font-size:12px;color:var(--muted);margin-top:6px;line-height:1.5}

/* ---------- 主按钮（珊瑚橙 · 夏日行动色） ---------- */
.btn{
  display:block;width:100%;padding:15px;border:none;border-radius:14px;
  background:linear-gradient(135deg,var(--coral) 0%,var(--coral-700) 100%);
  color:#fff;font-size:16px;font-weight:700;cursor:pointer;
  margin-top:22px;box-shadow:0 6px 16px rgba(255,107,74,.30);
  transition:transform .12s,box-shadow .2s;
  text-align:center;text-decoration:none;font-family:inherit;
}
.btn:active{transform:translateY(1px) scale(.99)}
.btn-ghost{
  display:block;text-align:center;margin-top:16px;
  color:var(--muted);font-size:13px;text-decoration:none;
}
.ok{color:var(--brand);font-size:14px;margin-top:14px;text-align:center;font-weight:600}

/* ---------- 我的页 · 进度环 ---------- */
.ring-card{background:var(--card);border-radius:var(--radius-lg);padding:26px 20px 22px;text-align:center;box-shadow:var(--shadow-sm);margin-bottom:16px;border:1px solid var(--line)}
.ring{position:relative;width:184px;height:184px;margin:0 auto}
.ring svg{transform:rotate(-90deg);display:block}
.ring .num{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.ring .num b{font-size:42px;color:var(--brand);line-height:1;font-weight:800}
.ring .num small{color:var(--muted);font-size:13px;margin-top:4px}
.meta{display:flex;justify-content:space-around;margin-top:18px;font-size:13px;color:var(--muted)}
.meta b{display:block;font-size:19px;color:var(--ink);font-weight:700;margin-top:2px}
.meta .accent b{color:var(--brand-700)}

/* ---------- 我的页 · 勋章 ---------- */
.medals{display:flex;justify-content:space-around;background:var(--card);border-radius:var(--radius);padding:18px 12px;margin-bottom:16px;box-shadow:var(--shadow-sm);border:1px solid var(--line)}
.medal{text-align:center;opacity:.4;transition:.3s;flex:1}
.medal.on{opacity:1}
.medal .ic{
  width:48px;height:48px;border-radius:50%;margin:0 auto 6px;
  display:flex;align-items:center;justify-content:center;
  font-size:18px;font-weight:700;
  background:var(--brand-50);color:var(--muted);
}
.medal.on .ic{background:linear-gradient(135deg,var(--brand) 0%,var(--brand-700) 100%);color:#fff;box-shadow:0 4px 12px rgba(32,111,184,.30)}
.medal.gold .ic{background:var(--gold-soft);color:#B8860B}
.medal.gold.on .ic{background:linear-gradient(135deg,#E2B552,#C8911F);color:#fff;box-shadow:0 4px 12px rgba(200,145,31,.35)}
.medal span{font-size:11px;color:var(--muted);font-weight:600}
.medal.on span{color:var(--ink-2)}

/* ---------- 我的页 · 每日建议 ---------- */
.tips li{font-size:13.5px;color:var(--ink-2);margin:7px 0 7px 18px;line-height:1.55}
.tips h3{font-size:14px;color:var(--brand-700);margin-bottom:8px;font-weight:700}

/* ---------- 我的页 · 日历 ---------- */
.cal h3{font-size:14px;margin-bottom:12px;font-weight:700;color:var(--ink)}
.dots{display:grid;grid-template-columns:repeat(7,1fr);gap:7px}
.dot{
  aspect-ratio:1;border-radius:9px;background:var(--brand-50);
  font-size:11px;display:flex;align-items:center;justify-content:center;color:var(--muted);
  font-weight:600;
}
.dot.done{background:linear-gradient(135deg,var(--brand) 0%,var(--brand-700) 100%);color:#fff;box-shadow:0 2px 6px rgba(32,111,184,.25)}

/* ---------- 登录流程 · 匹配列表 ---------- */
.match-item{
  padding:13px 15px;border-radius:13px;border:1.5px solid var(--line);
  margin-bottom:10px;font-size:15px;font-weight:600;color:var(--ink);
  background:var(--bg);cursor:pointer;
  transition:border-color .15s,background .15s,transform .1s;
}
.match-item:active{transform:scale(.98)}
.match-item:hover{border-color:var(--brand);background:var(--brand-50)}

/* ---------- 登录流程 · 数字输入框（后4位/手机号） ---------- */
#input-phone4{max-width:160px;margin:0 auto 4px;text-align:center;font-size:20px;letter-spacing:6px;font-weight:700}
#input-phone-full{text-align:center;font-size:18px;letter-spacing:3px}

/* ---------- 打卡页 · 图片上传区域 ---------- */
.upload-zone{
  width:100%;border:2px dashed var(--line);border-radius:14px;
  padding:24px;text-align:center;cursor:pointer;transition:border-color .2s,background .2s;
  background:var(--bg);min-height:140px;display:flex;align-items:center;justify-content:center;
}
.upload-zone:hover{border-color:var(--brand);background:var(--brand-50)}
.upload-icon{
  width:48px;height:48px;border-radius:50%;border:2px solid var(--line);
  display:flex;align-items:center;justify-content:center;font-size:28px;color:var(--muted);
  margin:0 auto 8px;
}
.upload-text{font-size:13px;color:var(--muted);line-height:1.6}
#previewImg{width:100%;max-height:200px;object-fit:cover;border-radius:10px}

/* ---------- 我的页 · 日历视图 ---------- */
.cal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.cal-nav{
  width:32px;height:32px;border-radius:50%;border:1px solid var(--line);
  background:var(--bg);color:var(--brand);font-size:14px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;transition:background .15s;
}
.cal-nav:active{background:var(--brand-100)}
.cal-title{font-size:16px;font-weight:700;color:var(--ink)}
.cal-weekdays{
  display:grid;grid-template-columns:repeat(7,1fr);gap:6px;
  margin-bottom:6px;text-align:center;font-size:12px;color:var(--muted);font-weight:600;
}
.cal-grid{
  display:grid;grid-template-columns:repeat(7,1fr);gap:6px;
}
.cal-cell{
  aspect-ratio:1;border-radius:10px;background:var(--bg);text-align:center;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  font-size:14px;color:var(--ink);font-weight:600;cursor:default;position:relative;
  padding:4px 0;transition:transform .1s;
}
.cal-cell.empty{background:transparent;pointer-events:none}
.cal-cell.done{
  background:linear-gradient(135deg,var(--brand) 0%,var(--brand-700) 100%);color:#fff;
  box-shadow:0 2px 8px rgba(32,111,184,.25);cursor:pointer;
}
.cal-cell.done:active{transform:scale(.95)}
.cal-day{line-height:1.2}
.cal-dist{font-size:10px;opacity:.85;margin-top:2px;line-height:1}

/* ---------- 打卡详情弹窗 ---------- */
.modal{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center}
.modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.45)}
.modal-content{
  position:relative;background:var(--card);border-radius:var(--radius-lg);
  width:min(90%,380px);max-height:85vh;overflow-y:auto;
  box-shadow:0 20px 60px rgba(0,0,0,.25);animation:modalIn .25s ease;
}
@keyframes modalIn{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}
.modal-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 18px;border-bottom:1px solid var(--line);
}
.modal-header h3{font-size:16px;font-weight:700;color:var(--ink)}
.modal-close{
  width:30px;height:30px;border-radius:50%;border:none;
  background:var(--bg);color:var(--muted);font-size:16px;cursor:pointer;
}
.modal-body{padding:14px 18px 18px}
.modal-info{display:flex;flex-direction:column;gap:8px}
.modal-row{
  display:flex;justify-content:space-between;align-items:center;
  font-size:14px;padding:8px 0;border-bottom:1px dashed var(--line);
}
.modal-row:last-child{border-bottom:none}
.modal-row span{color:var(--muted)}
.modal-row b{color:var(--ink);font-weight:700}

/* ---------- 状态行 ---------- */
.status{text-align:center;font-size:13px;color:var(--muted);margin-top:14px;line-height:1.5;padding:0 6px}
.status.win{color:var(--brand-700);font-weight:600}
