/* Girls Power V3 shell + components */

.cn-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: #fff4cc;
  border-bottom: 2px solid #ffc800;
  color: #5b3a00;
  font-size: 12px;
  font-weight: 800;
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
}
.cn-banner a { color: #1cb0f6; text-decoration: underline; }
body:has(.cn-banner:not([hidden])) .app-shell {
  margin-top: 48px;
  height: calc(100vh - 48px);
  height: calc(100dvh - 48px);
}

.app-shell {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  height: 100dvh;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 28%, var(--sky-bot) 55%, #ffffff 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 0 1px var(--line), 0 24px 64px rgba(10, 77, 140, 0.12);
}

.status-bar {
  height: 44px;
  padding: 12px 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  flex-shrink: 0;
  z-index: 5;
}
.status-bar .pill {
  background: var(--light-green);
  color: var(--green-deep);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
}

#view-root {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 16px calc(var(--nav-h) + var(--safe-bottom) + 16px);
  -webkit-overflow-scrolling: touch;
}
#view-root.no-pad { padding-left: 0; padding-right: 0; }

/* Bottom nav — Duolingo 5 tabs, AI center FAB */
.bottom-nav {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--bg);
  border-top: 2px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr 1fr 1fr;
  align-items: flex-start;
  z-index: 20;
}
.bottom-nav.hidden { display: none; }

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-top: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.nav-item img, .nav-item .nav-ico {
  width: 28px; height: 28px;
  object-fit: contain;
}
.nav-item.active { color: var(--green-deep); }
.nav-item.active .nav-ico-wrap {
  background: var(--light-green);
  border-radius: 12px;
}
.nav-ico-wrap {
  width: 40px; height: 36px;
  display: grid; place-items: center;
}

.nav-fab {
  margin-top: -18px;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--ink-btn);
  box-shadow: 0 8px 24px rgba(28, 28, 30, 0.28);
  display: grid; place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
  border: 3px solid rgba(255,255,255,0.9);
}
.nav-fab.active {
  background: var(--accent);
  box-shadow: 0 8px 24px rgba(10, 77, 140, 0.35);
}

/* Typography */
.page-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 4px 0 4px;
}
.page-sub { color: var(--muted); font-size: 13px; font-weight: 700; margin-bottom: 14px; }
.section-label {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 18px 0 8px;
}

/* Cards */
.card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 14px;
  margin-bottom: 12px;
  transition: transform .15s ease;
}
.card:active { transform: scale(0.98); }
.card.dopa-green { background: var(--light-green); border-color: #b6e388; }
.card.dopa-blue { background: var(--light-blue); border-color: #a6e0ff; }
.card.dopa-yellow { background: var(--light-yellow); border-color: #ffe08a; }
.card.dopa-pink { background: var(--light-pink); border-color: #ffb8d9; }
.card.dopa-purple { background: var(--light-purple); border-color: #e0b8ff; }
.card.dopa-orange { background: var(--light-orange); border-color: #ffc980; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.card-head h3 {
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-head .doodle {
  width: 36px; height: 36px;
  object-fit: contain;
}
.chip {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--line);
}
.chip.green { color: var(--green-deep); border-color: var(--green); background: #fff; }
.chip.yellow { color: var(--yellow-deep); border-color: var(--yellow); }
.chip.red { color: var(--red-deep); border-color: var(--red); }

.card-body { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.45; }
.card-body .muted { color: var(--muted); font-weight: 600; }
.card-cta {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 900;
  color: var(--blue-deep);
}

/* Today grid — 4 modules fit one viewport */
.today-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.today-grid .card {
  margin: 0;
  min-height: 148px;
  display: flex;
  flex-direction: column;
}
.today-grid .card-body { flex: 1; font-size: 12px; }
.avatar-mini {
  width: 100%;
  height: 88px;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 2px solid var(--line);
}
.avatar-mini gp-character-3d,
.avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  font-weight: 900;
  font-size: 15px;
  border: 2px solid transparent;
}
.btn-block { width: 100%; }
.btn-green {
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow-btn-green);
  border-bottom: 0;
}
.btn-green:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--green-deep); }
.btn-blue {
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow-btn-blue);
}
.btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--line);
  box-shadow: 0 3px 0 var(--line);
}
.btn-purple {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 4px 0 var(--purple-deep);
}

/* Training modules */
.train-block {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-card);
}
.train-block-h {
  padding: 12px 14px;
  font-weight: 900;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.train-block-h > span { flex: 1; }
.train-block-h .block-check {
  margin-left: auto;
  flex-shrink: 0;
}
.train-block.warmup .train-block-h { background: var(--light-yellow); }
.train-block.main .train-block-h { background: var(--light-green); }
.train-block.cooldown .train-block-h { background: var(--light-blue); }

.ex-text-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: start;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}
.ex-text-row em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding-top: 2px;
}
.ex-text-row h4 {
  font-size: 14px;
  font-weight: 700;
}
.ex-text-row p {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}

/* 训练页顶部 · 紧凑姿态分析 */
.pose-panel {
  padding: 12px !important;
  margin-bottom: 10px;
}
.pose-panel-h {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
}
.pose-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.pose-titles strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}
.pose-titles span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.pose-score {
  font-style: normal;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  min-width: 36px;
  text-align: right;
}
.pose-stage {
  position: relative;
  margin-top: 10px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: #e8eef5;
  border: 1px solid var(--line);
}
.pose-stage video,
.pose-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pose-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.btn.ghost-sm,
button.ghost-sm {
  padding: 8px 12px;
  min-height: 40px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}
.pose-progress {
  margin-top: 8px;
}
.pose-progress .track {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.pose-progress .track > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: inherit;
  transition: width 0.2s ease;
}
.pose-progress p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}
.pose-out {
  margin-top: 8px;
}
.pose-report ul {
  margin: 4px 0 0 16px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-secondary);
}
.pose-report .pose-meta {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.pose-report .pose-tip {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.35;
}
.pose-report.ok .pose-meta { color: var(--accent); }
.pose-err {
  font-size: 12px;
  color: var(--red);
  font-weight: 600;
}

.ex-row {
  display: grid;
  grid-template-columns: 64px 1fr 36px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-top: 2px solid var(--line);
}
.ex-row img, .ex-row .ex-ph {
  width: 64px; height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-soft);
  border: 2px solid var(--line);
}
.ex-row .ex-ph {
  display: grid; place-items: center;
  font-size: 22px;
}
.ex-row h4 { font-size: 14px; font-weight: 900; }
.ex-row p { font-size: 11px; color: var(--muted); font-weight: 700; margin-top: 2px; }
.check {
  width: 32px; height: 32px;
  border-radius: 10px;
  border: 3px solid var(--line);
  display: grid; place-items: center;
  font-weight: 900;
  color: transparent;
}
.check.on {
  background: var(--green);
  border-color: var(--green-deep);
  color: #fff;
}

/* Reward popup — 限定时间 / 连击奖励 */
.reward-overlay {
  position: absolute;
  inset: 0;
  background: rgba(245, 247, 250, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px 16px;
  overflow-y: auto;
}
.reward-sheet {
  width: 100%;
  max-width: 340px;
  text-align: center;
  animation: pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.reward-limited {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}
.reward-boost {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
}
.boost-ico {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: radial-gradient(circle, #efe5ff 0%, #d4b8ff 100%);
}
.boost-body strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
}
.boost-body p {
  margin: 4px 0 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.boost-timer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff4cc;
  color: #8a6a00;
  font-size: 12px;
  font-weight: 700;
}
.reward-hero {
  position: relative;
  margin: 8px auto 16px;
  width: 180px;
  height: 200px;
}
.reward-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(10, 77, 140, 0.18));
}
.reward-hero .confetti::before,
.reward-hero .confetti::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #a6e0ff;
  top: 20%;
  left: 8%;
  transform: rotate(20deg);
}
.reward-hero .confetti::after {
  left: auto;
  right: 10%;
  top: 28%;
  background: #ffb8d9;
  border-radius: 50%;
}
.reward-combo {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 6px;
}
.reward-combo em {
  font-style: normal;
  color: #7b61ff;
}
.reward-today {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 12px;
}
.reward-attrs {
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 0 0 10px;
}
.reward-attrs h4 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.reward-attrs ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}
.reward-attrs li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}
.reward-attrs li span { flex: 1; color: var(--ink-secondary); }
.reward-attrs li em {
  font-style: normal;
  color: #2f9e7a;
  font-weight: 800;
}
.reward-attrs li b {
  font-weight: 700;
  color: var(--muted);
  font-size: 11px;
}
.reward-kcal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 0 0 14px;
}
.reward-kcal em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.reward-kcal strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  margin: 2px 0 4px;
}
.reward-kcal p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-secondary);
  font-weight: 600;
}
.reward-sheet .btn-ink {
  margin-top: 0;
}
@keyframes pop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.part-pick { margin-bottom: 12px; }
.part-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.part-chip {
  padding: 8px 12px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
}
.part-chip.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.reward-card {
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  padding: 24px 20px;
  text-align: center;
}
.reward-card .big { font-size: 56px; line-height: 1; }
.reward-card h2 { font-size: 22px; font-weight: 900; margin: 8px 0; }
.reward-card p { color: var(--muted); font-weight: 700; margin-bottom: 16px; }

/* AI ask */
.ai-refs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 10px;
}
.ai-ref {
  flex: 0 0 auto;
  max-width: 200px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--light-purple);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}
.ai-refs.compact {
  gap: 5px;
  margin-bottom: 6px;
  max-height: 36px;
  padding-bottom: 0;
}
.ai-refs.compact .ai-ref {
  max-width: 110px;
  padding: 5px 8px;
  border-radius: 8px;
  border-width: 1px;
  background: rgba(255, 255, 255, 0.75);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  display: flex;
  align-items: center;
  min-height: 0;
}
.ai-refs.compact .ai-ref strong {
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-refs.compact .ai-ref span {
  display: none;
}
.refs-label {
  margin: 2px 0 4px;
  font-size: 11px;
}
.suggest-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.suggest {
  padding: 8px 12px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 0 var(--line);
}
.chat-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  min-height: 180px;
}
.bubble {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  border: 2px solid var(--line);
}
.bubble.bot { align-self: flex-start; background: var(--light-blue); }
.bubble.me { align-self: flex-end; background: var(--light-green); }
.chat-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  position: sticky;
  bottom: 0;
  background: var(--bg);
  padding-top: 8px;
}
.chat-input-row input {
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 14px;
}

/* Forum */
.forum-post {
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  background: #fff;
  box-shadow: var(--shadow-card);
}
.forum-post img.cover {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--bg-soft);
}
.forum-post .body { padding: 12px 14px; }
.forum-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.forum-meta .ava {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
}
.forum-meta strong { font-size: 13px; font-weight: 900; }
.forum-meta span { font-size: 11px; color: var(--muted); font-weight: 700; }
.forum-text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
}
.forum-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.forum-tag {
  font-size: 12px;
  font-weight: 800;
  color: var(--purple-deep);
}
.forum-like {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-secondary);
  cursor: pointer;
}
.forum-like.on {
  border-color: #ffb0c8;
  background: #fff0f5;
  color: #e11d70;
}
.forum-like em {
  font-style: normal;
  font-weight: 800;
}

.ex-row .sets-plan {
  margin: 2px 0 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.ex-row .sets-plan b {
  color: var(--accent);
  font-weight: 800;
  margin-right: 4px;
}
.ex-row .ex-sub {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

/* Me */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.stat {
  text-align: center;
  padding: 12px 8px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: var(--light-yellow);
}
.stat b { display: block; font-size: 20px; font-weight: 900; }
.stat span { font-size: 11px; font-weight: 800; color: var(--muted); }

.attr-bars { display: flex; flex-direction: column; gap: 8px; }
.attr-row { display: grid; grid-template-columns: 56px 1fr 28px; gap: 8px; align-items: center; font-size: 12px; font-weight: 800; }
.bar {
  height: 12px;
  background: var(--bg-soft);
  border-radius: 999px;
  border: 2px solid var(--line);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 999px;
}

.unlock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.unlock-item {
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  text-align: center;
  background: #fff;
  position: relative;
}
.unlock-item.locked { opacity: .55; filter: grayscale(.4); }
.unlock-item img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  margin-bottom: 6px;
}
.unlock-item .lvl {
  position: absolute;
  top: 8px; right: 8px;
  font-size: 10px;
  font-weight: 900;
  background: var(--yellow);
  padding: 2px 6px;
  border-radius: 999px;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--nav-h) + 24px);
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  z-index: 60;
  display: none;
  white-space: nowrap;
}

.video-box {
  border: 2px dashed var(--blue);
  border-radius: 16px;
  padding: 14px;
  background: var(--light-blue);
  text-align: center;
  margin-top: 10px;
}
.video-box input[type=file] { margin: 8px auto; display: block; max-width: 100%; }
.analysis-sample {
  margin-top: 10px;
  text-align: left;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.disclaimer {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.4;
  margin-top: 8px;
}

/* —— V3.1 polish: mockup-style stacked cards —— */
.greet h1 {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.greet p { color: var(--muted); font-size: 13px; font-weight: 700; margin-top: 4px; margin-bottom: 14px; }

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 2px solid var(--line);
  box-shadow: 0 6px 0 var(--line);
  padding: 16px;
  margin-bottom: 14px;
  background: var(--light-green);
}
.hero-card.pink { background: linear-gradient(135deg, #ffe0f0, #fff0f7); border-color: #ffb8d9; box-shadow: 0 6px 0 #ffb8d9; }
.hero-card.yellow { background: linear-gradient(135deg, #fff4cc, #fffaf0); border-color: #ffe08a; box-shadow: 0 6px 0 #ffe08a; }
.hero-card.blue { background: linear-gradient(135deg, #ddf4ff, #f0faff); border-color: #a6e0ff; box-shadow: 0 6px 0 #a6e0ff; }
.hero-card.green { background: linear-gradient(160deg, #d7ffb8 0%, #eaffd4 55%, #f5ffe8 100%); border-color: #b6e388; box-shadow: 0 6px 0 #b6e388; }

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  border: 2px solid rgba(0,0,0,.06);
  color: var(--green-deep);
  margin-bottom: 8px;
}
.hero-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 8px;
  align-items: end;
}
.hero-row .meta .name {
  font-size: 20px;
  font-weight: 900;
}
.hero-row .meta .sub {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-top: 4px;
}
.hero-visual {
  height: 110px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,.55);
}
.hero-visual gp-character-3d { width: 100%; height: 100%; }

.card-link {
  font-size: 12px;
  font-weight: 900;
  color: var(--blue-deep);
  white-space: nowrap;
}

.macro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.macro-cell {
  text-align: center;
  background: #fff;
  border-radius: 16px;
  border: 2px solid var(--line);
  padding: 10px 6px;
}
.macro-cell .ico {
  width: 40px; height: 40px;
  margin: 0 auto 6px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 20px;
  font-weight: 900;
}
.macro-cell .ico.p { background: var(--light-green); }
.macro-cell .ico.c { background: var(--light-blue); }
.macro-cell .ico.f { background: var(--light-orange); }
.macro-cell .label { font-size: 11px; font-weight: 800; color: var(--muted); }
.macro-cell .val { font-size: 13px; font-weight: 900; margin: 4px 0 6px; }
.macro-bar {
  height: 8px;
  border-radius: 999px;
  background: #eee;
  overflow: hidden;
}
.macro-bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--green);
}
.macro-bar.c > i { background: var(--blue); }
.macro-bar.f > i { background: var(--orange); }

.train-hero-body {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}
.train-hero-body h4 {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}
.train-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.btn-coral {
  background: #ff6b6b;
  color: #fff;
  box-shadow: 0 4px 0 #e04545;
  border-radius: 14px;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 900;
  font-size: 14px;
}
.btn-coral:active { transform: translateY(3px); box-shadow: 0 1px 0 #e04545; }

.cycle-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.cycle-fact {
  background: #fff;
  border-radius: 14px;
  border: 2px solid var(--line);
  padding: 10px;
}
.cycle-fact em {
  display: block;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}
.cycle-fact strong { font-size: 15px; font-weight: 900; }

.field {
  margin: 10px 0;
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 6px;
  color: var(--ink);
}
.field input, .field select {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 14px;
  background: #fff;
}

.meal-slots { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.meal-slot {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 4px 0 var(--line);
  overflow: hidden;
}
.meal-slot-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  font-weight: 900;
  font-size: 14px;
  background: var(--bg-soft);
}
.meal-slot.breakfast .meal-slot-h { background: var(--light-yellow); }
.meal-slot.lunch .meal-slot-h { background: var(--light-green); }
.meal-slot.dinner .meal-slot-h { background: var(--light-blue); }
.meal-slot.snack .meal-slot-h { background: var(--light-pink); }
.meal-item {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-top: 2px solid var(--line);
  font-size: 13px;
  font-weight: 700;
}
.meal-item .dot {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 18px;
}
.meal-empty {
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.food-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.food-card {
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  text-align: left;
  background: #fff;
  box-shadow: 0 3px 0 var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.food-card strong { font-size: 14px; font-weight: 900; }
.food-card .muted { font-size: 11px; color: var(--muted); font-weight: 700; }
.food-card .kcal-tag { font-size: 12px; font-weight: 900; color: var(--green-deep); }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.chip.duo-chip, .chips .chip {
  border: 2px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 0 var(--line);
}
.chips .chip.active {
  background: var(--light-green);
  border-color: var(--green);
  color: var(--green-deep);
}

.kcal-summary {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: center;
}
.kcal-ring-wrap { position: relative; width: 110px; height: 110px; }
.kcal-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.kcal-center strong { font-size: 22px; font-weight: 900; line-height: 1; }
.kcal-center span { font-size: 11px; font-weight: 800; color: var(--muted); }
.kcal-meta { display: grid; gap: 8px; }
.kcal-meta div {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
  background: #fff;
  border-radius: 12px;
  border: 2px solid var(--line);
  padding: 8px 10px;
}
.kcal-meta em { font-style: normal; color: var(--muted); }

.sym-row {
  display: grid;
  grid-template-columns: 64px 1fr 28px;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
  font-size: 13px;
  font-weight: 800;
}
.sym-row input[type=range] { width: 100%; }

/* —— Apple Medical Soft Glass：今日密集卡片 —— */
.glass-card, .glass-panel {
  background: var(--card-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 14px;
  margin-bottom: 12px;
}
.glass-panel {
  padding: 12px 14px;
  margin-bottom: 10px;
}
.card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.card-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.link-quiet {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
.btn-ink {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: var(--ink-btn);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow-btn);
  min-height: 48px;
}
.btn-ink.sm {
  width: auto;
  margin: 0;
  padding: 10px 16px;
  min-height: 44px;
  font-size: 14px;
  background: var(--accent);
}
.btn-ink.btn-block { width: 100%; }
.btn-ink:active { opacity: 0.88; transform: scale(0.99); }

.today-flow { padding-bottom: 4px; }
.today-greet h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.today-greet p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 500;
}

.partner-card .partner-stage {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 8px;
  align-items: center;
  min-height: 168px;
}
.partner-figure {
  height: 168px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(184, 217, 245, 0.5), rgba(255, 255, 255, 0.9));
  border: 1px solid var(--line);
}
.partner-figure gp-character-3d { width: 100%; height: 100%; }
.partner-radar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.radar-cap {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 2px;
}

.cycle-layout {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 10px;
  align-items: center;
}
.ring-wrap {
  position: relative;
  width: 132px;
  height: 132px;
}
.ring-wrap .cycle-ring-svg { display: block; }
.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.ring-center strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.ring-center span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 2px;
}
.cycle-side .phase-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  margin: 8px 0 6px;
}
.pill-status {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--light-blue);
  color: var(--accent);
}
.pill-status.ok { background: var(--light-green); color: var(--green-deep); }
.pill-status.warn { background: var(--light-yellow); color: #8a6a00; }
.pill-status.alert { background: var(--light-red); color: var(--red-deep); }
.phase-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.phase-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}
.phase-legend span.on { color: var(--ink); }
.phase-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.advice-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.advice-box h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}
.advice-box p {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--ink-secondary);
}

.macro-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.macro-pill {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
}
.macro-pill .m-ico .food-ico { width: 36px; height: 36px; }
.macro-pill em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.macro-pill b {
  font-size: 13px;
  font-weight: 700;
}
.eaten-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.eaten-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.eaten-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}
.eaten-ico .food-ico { width: 36px; height: 36px; }
.eaten-empty {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.train-head {
  font-size: 16px;
  font-weight: 700;
  display: block;
}
.train-meta {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 10px;
  font-weight: 500;
}
.plan-list {
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
}
.plan-list li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.plan-list li:last-child { border-bottom: none; }
.plan-list em {
  font-style: normal;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}
.plan-list b {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.burn-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--light-blue);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.burn-box em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.burn-box strong {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}
.burn-box p {
  font-size: 12px;
  color: var(--ink-secondary);
  margin-top: 4px;
  line-height: 1.35;
}
.rice-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  max-width: 96px;
  justify-content: flex-end;
}
.rice-stack .rice-bowl { font-size: 18px; line-height: 1; }
.rice-stack.empty {
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.rice-stack.empty em {
  font-size: 10px;
  color: var(--muted);
  font-style: normal;
}

.name-field {
  display: flex;
  gap: 8px;
  align-items: center;
}
.name-field input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  min-height: 44px;
}
.tip { font-size: 12px; margin-top: 8px; }

.stat-grid.medical .stat {
  background: var(--card-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: none;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.stat-grid.medical .stat-ico {
  font-size: 22px;
  line-height: 1;
}
.stat-grid.medical .stat b {
  font-size: 18px;
  font-weight: 700;
}
.stat-grid.medical .stat span:last-child {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.stat-grid.progress-icons .stat-ico {
  font-size: inherit;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
}
.stat-grid.progress-icons .stat-svg {
  width: 44px;
  height: 44px;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(10, 77, 140, 0.12));
}
.radar-card .me-radar-wrap {
  display: flex;
  justify-content: center;
  padding: 4px 0 8px;
}
.radar-card .attr-bars.compact {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.radar-card .attr-bars.compact .attr-row {
  font-size: 12px;
  margin: 6px 0;
}

.food-ico, .food-ico-wrap .food-ico {
  width: 40px;
  height: 40px;
  display: block;
}
.food-ico-lg .food-ico {
  width: 100%;
  height: 52px;
  margin-bottom: 4px;
}
.macro-cell .ico {
  background: transparent !important;
  width: auto;
  height: auto;
}
.macro-cell .ico .food-ico { margin: 0 auto; }
.chips .chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chips .chip .food-ico {
  width: 22px;
  height: 22px;
}
.meal-item .food-ico-wrap { flex-shrink: 0; }

.hero-card, .card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius);
}

.bottom-nav {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--line);
}
.nav-item.active { color: var(--accent); }
.nav-item.active .nav-ico-wrap {
  background: var(--light-blue);
  border-radius: 12px;
}

.status-bar .pill {
  background: var(--light-blue);
  color: var(--accent);
}

@media (max-height: 700px) {
  .partner-figure { height: 140px; }
  .partner-card .partner-stage { min-height: 140px; }
  .cycle-layout { grid-template-columns: 110px 1fr; }
  .ring-wrap { width: 110px; height: 110px; }
  .ring-wrap svg { width: 110px; height: 110px; }
}

