/* ==========================================================================
   拼读星球 · 组件层
   ========================================================================== */

/* ============================ 按钮 ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: 42px;
  padding: 0 var(--sp-5);
  border-radius: var(--r-full);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.14s var(--ease), background 0.18s, border-color 0.18s, box-shadow 0.18s,
    color 0.18s;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  border-color: var(--brand-300);
  color: var(--brand-700);
}
.btn:active {
  transform: scale(0.968);
}
.btn[disabled],
.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-fill) 0%, var(--brand-fill-2) 100%);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(122, 85, 255, 0.28);
}
.btn-primary:hover {
  color: #fff;
  box-shadow: 0 8px 24px rgba(122, 85, 255, 0.36);
}

.btn-soft {
  color: var(--brand-700);
  background: var(--brand-100);
  border-color: transparent;
}
.btn-soft:hover {
  background: var(--brand-200);
  color: var(--brand-800);
}

.btn-orange {
  color: #fff;
  background: linear-gradient(135deg, #ff8a3d 0%, var(--orange-600) 100%);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(255, 103, 0, 0.26);
}
.btn-orange:hover {
  color: #fff;
}

.btn-teal {
  color: #fff;
  background: linear-gradient(135deg, #2ae8c4 0%, var(--teal-600) 100%);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(20, 224, 181, 0.26);
}
.btn-teal:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}
.btn-ghost:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

.btn-outline {
  background: transparent;
  border-color: var(--brand-300);
  color: var(--brand-700);
}

.btn-sm {
  height: 34px;
  padding: 0 var(--sp-4);
  font-size: var(--fs-sm);
}
.btn-lg {
  height: 52px;
  padding: 0 var(--sp-7);
  font-size: var(--fs-lg);
}
.btn-block {
  width: 100%;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: background 0.18s, color 0.18s, transform 0.14s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}
.icon-btn:active {
  transform: scale(0.92);
}
.icon-btn.is-round {
  border-radius: var(--r-full);
}
.icon-btn.is-active {
  background: var(--brand-100);
  color: var(--brand-700);
}

/* ============================ 卡片 ============================ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--sh-sm);
}
.card-flat {
  box-shadow: none;
}
.card-tight {
  padding: var(--sp-4);
}
.card-soft {
  background: var(--bg-soft);
  border-color: transparent;
  box-shadow: none;
}
.card-hover {
  transition: transform 0.2s var(--ease), box-shadow 0.2s, border-color 0.2s;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
  border-color: var(--brand-200);
}

/* ============================ 区块标题 ============================ */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.section-title {
  position: relative;
  padding-left: 14px;
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 20px;
  border-radius: var(--r-full);
  background: linear-gradient(180deg, var(--brand-400), var(--brand-600));
}
.section-sub {
  font-size: var(--fs-sm);
  color: var(--text-3);
  margin-top: var(--sp-1);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 28px;
  padding: 0 var(--sp-3);
  border-radius: var(--r-full);
  background: var(--brand-100);
  color: var(--brand-700);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.eyebrow.is-orange {
  background: var(--orange-50);
  color: var(--orange-600);
}
.eyebrow.is-teal {
  background: var(--teal-50);
  color: var(--teal-600);
}

/* ============================ 标签 / 胶囊 ============================ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  background: var(--bg-sunk);
  color: var(--text-2);
  white-space: nowrap;
}
.tag.is-brand {
  background: var(--brand-100);
  color: var(--brand-700);
}
.tag.is-orange {
  background: var(--orange-50);
  color: var(--orange-600);
}
.tag.is-teal {
  background: var(--teal-50);
  color: var(--teal-600);
}
.tag.is-green {
  background: var(--green-50);
  color: var(--green);
}
.tag.is-blue {
  background: var(--blue-50);
  color: var(--blue);
}
.tag.is-red {
  background: var(--red-50);
  color: var(--red);
}
.tag.is-amber {
  background: var(--amber-50);
  color: var(--orange-600);
}
.tag.is-pink {
  background: var(--pink-50);
  color: var(--pink);
}
.tag.is-lg {
  height: 30px;
  padding: 0 14px;
  font-size: var(--fs-sm);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 var(--sp-4);
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-2);
  transition: all 0.18s var(--ease);
  white-space: nowrap;
}
.chip:hover {
  border-color: var(--brand-300);
  color: var(--brand-700);
}
.chip.is-on {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: #fff;
  box-shadow: 0 4px 12px rgba(122, 85, 255, 0.24);
}

.dot-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-4);
  flex: none;
}

/* ============================ 大数字统计 ============================ */
.stat-big {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-5) var(--sp-3);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}
.stat-big .n {
  font-family: var(--font-en);
  font-size: var(--fs-4xl);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-big .u {
  font-size: var(--fs-md);
  font-family: var(--font-sans);
  font-weight: 600;
}
.stat-big .l {
  font-size: var(--fs-sm);
  color: var(--text-3);
  font-weight: 500;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--sp-3);
}

/* 服务数据条（54 节精讲 / 60 节 AI / 3 本教材） */
.serve-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
}
.serve-card .serve-ico {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  flex: none;
}
.serve-card .serve-n {
  font-family: var(--font-en);
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}
.serve-card .serve-n small {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-left: 2px;
}
.serve-card .serve-t {
  font-size: var(--fs-sm);
  color: var(--text-3);
  margin-top: 4px;
}

/* ============================ 点读按钮 ============================ */
.speak {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: var(--r-full);
  display: inline-grid;
  place-items: center;
  flex: none;
  color: var(--brand-600);
  background: var(--brand-100);
  transition: transform 0.16s var(--ease-bounce), background 0.18s, color 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.speak:hover {
  background: var(--brand-200);
}
.speak:active {
  transform: scale(0.9);
}
.speak.is-lg {
  width: 46px;
  height: 46px;
}
.speak.is-xl {
  width: 60px;
  height: 60px;
}
.speak.is-playing {
  background: var(--brand-500);
  color: #fff;
}
.speak.is-playing::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--brand-400);
  animation: lhx-soundwave 1.1s var(--ease) infinite;
}
.speak.is-loading {
  pointer-events: none;
}
.speak.is-loading svg {
  animation: lhx-spin 0.9s linear infinite;
}
.speak[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

/* ============================ 音素卡 ============================ */
.sound-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-xs);
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.sound-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
  border-color: var(--brand-200);
}
.sound-card.is-playing {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px var(--brand-100), var(--sh-md);
}
.sound-card.is-mastered {
  border-color: var(--teal);
}
.sound-card .sc-glyph {
  font-family: var(--font-en);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
  word-break: break-all;
}
.sound-card .sc-glyph.is-long {
  font-size: 28px;
}
.sound-card .sc-ipa {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--brand-600);
  font-weight: 600;
}
.sound-card .sc-key {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--text-3);
}
.sound-card .sc-badge {
  position: absolute;
  top: 10px;
  right: 10px;
}
.sound-card .sc-crown {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--teal-600);
}

/* ============================ 单词胶囊 ============================ */
.word-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 7px 8px 7px var(--sp-4);
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.18s, background 0.18s, transform 0.14s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.word-chip:hover {
  border-color: var(--brand-300);
  background: var(--brand-50);
}
.word-chip:active {
  transform: scale(0.97);
}
.word-chip .wc-w {
  font-family: var(--font-en);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink);
}
.word-chip .wc-zh {
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.word-chip .wc-seg {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--brand-600);
  letter-spacing: 0.02em;
}
.word-chip.is-plain {
  padding: 6px var(--sp-3);
  background: var(--bg-sunk);
  border-color: transparent;
}

/* 拼读切分展示 */
.seg-view {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.seg-part {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 46px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  background: var(--brand-100);
  color: var(--brand-800);
  font-family: var(--font-en);
  font-size: var(--fs-lg);
  font-weight: 700;
  transition: transform 0.16s var(--ease-bounce), background 0.18s;
}
.seg-part.is-hit {
  background: var(--brand-500);
  color: #fff;
  transform: translateY(-2px);
}

/* ============================ 进度 ============================ */
.progress {
  height: 8px;
  border-radius: var(--r-full);
  background: var(--bg-sunk);
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-400), var(--brand-600));
  transition: width 0.5s var(--ease);
}
.progress.is-thin {
  height: 5px;
}
.progress.is-teal > i {
  background: linear-gradient(90deg, #2ae8c4, var(--teal-600));
}
.progress.is-orange > i {
  background: linear-gradient(90deg, #ffa35c, var(--orange-600));
}

.ring {
  position: relative;
  width: 96px;
  height: 96px;
  flex: none;
}
.ring svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}
.ring .ring-track {
  fill: none;
  stroke: var(--bg-sunk);
}
.ring .ring-val {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.7s var(--ease);
}
.ring .ring-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  line-height: 1.1;
}
.ring .ring-num {
  font-family: var(--font-en);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--ink);
}
.ring .ring-num small {
  font-size: var(--fs-xs);
  margin-left: 1px;
}
.ring .ring-cap {
  font-size: var(--fs-xs);
  color: var(--text-3);
  margin-top: 2px;
}
.ring.is-sm {
  width: 68px;
  height: 68px;
}
.ring.is-sm .ring-num {
  font-size: var(--fs-md);
}

/* ============================ 进度条（学习路径） ============================ */
.path {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 4px;
}
.path-node {
  position: relative;
  flex: 1 1 0;
  min-width: 148px;
  padding: 0 var(--sp-2);
}
.path-line {
  position: absolute;
  top: 26px;
  left: 50%;
  right: -50%;
  height: 3px;
  border-radius: var(--r-full);
  background: var(--line);
}
.path-node:last-child .path-line {
  display: none;
}
.path-node.is-done .path-line {
  background: var(--brand-300);
}
.path-dot {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  margin: 0 auto;
  border-radius: var(--r-full);
  display: grid;
  place-items: center;
  font-family: var(--font-en);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: #fff;
  background: var(--bg-sunk);
  color: var(--text-4);
  box-shadow: 0 0 0 6px var(--bg-soft);
}
.path-node.is-done .path-dot {
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  color: #fff;
}
.path-node.is-current .path-dot {
  animation: lhx-ring 2s var(--ease) infinite;
  background: linear-gradient(135deg, var(--orange), var(--orange-600));
  color: #fff;
}
.path-cap {
  margin-top: var(--sp-3);
  text-align: center;
}
.path-cap .pc-t {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--ink);
}
.path-cap .pc-s {
  font-size: var(--fs-xs);
  color: var(--text-3);
  margin-top: 2px;
}

/* ============================ 列表 ============================ */
.list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.list-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line);
  transition: background 0.16s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  text-align: left;
}
.list-item:last-child {
  border-bottom: none;
}
.list-item:hover {
  background: var(--brand-50);
}
.list-item .li-ico {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  flex: none;
  background: var(--brand-100);
  color: var(--brand-700);
}
.list-item .li-t {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--ink);
}
.list-item .li-s {
  font-size: var(--fs-sm);
  color: var(--text-3);
  margin-top: 2px;
}
.list-item .li-r {
  margin-left: auto;
  color: var(--text-4);
  flex: none;
}
.list-item.is-static {
  cursor: default;
}
.list-item.is-static:hover {
  background: transparent;
}

/* ============================ 表单 ============================ */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field > label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
}
.input {
  height: 46px;
  padding: 0 var(--sp-4);
  border-radius: var(--r-md);
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-md);
  transition: border-color 0.18s, box-shadow 0.18s;
  width: 100%;
}
.input::placeholder {
  color: var(--text-4);
}
.input:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px var(--brand-100);
}
.input-group {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  height: 46px;
  padding: 0 var(--sp-4);
  border-radius: var(--r-md);
  border: 1.5px solid var(--line);
  background: var(--surface);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.input-group:focus-within {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px var(--brand-100);
}
.input-group input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  outline: none;
  font-size: var(--fs-md);
}

.switch {
  position: relative;
  width: 50px;
  height: 30px;
  border-radius: var(--r-full);
  background: var(--line-strong);
  flex: none;
  transition: background 0.22s var(--ease);
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s var(--ease-bounce);
}
.switch.is-on {
  background: var(--brand-500);
}
.switch.is-on::after {
  transform: translateX(20px);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r-full);
  background: var(--bg-sunk);
}
.segmented > button {
  height: 34px;
  padding: 0 var(--sp-4);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-3);
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.segmented > button.is-on {
  background: var(--surface);
  color: var(--brand-700);
  box-shadow: var(--sh-xs);
}
.segmented.is-block {
  display: flex;
}
.segmented.is-block > button {
  flex: 1;
}

/* ============================ 覆盖层 / 弹窗 ============================ */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 18, 36, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: lhx-fade-up 0.2s var(--ease) both;
}
#toast-root,
#sheet-root,
#modal-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
}
#sheet-root,
#modal-root {
  display: flex;
}
#modal-root {
  align-items: center;
  justify-content: center;
  padding: var(--sp-5);
}
#sheet-root {
  align-items: flex-end;
  justify-content: center;
}
#toast-root {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: calc(var(--sa-t) + 16px);
  gap: var(--sp-2);
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  max-width: min(88vw, 420px);
  padding: 11px var(--sp-5);
  border-radius: var(--r-full);
  background: rgba(26, 26, 46, 0.94);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 500;
  box-shadow: var(--sh-lg);
  animation: lhx-pop 0.3s var(--ease-bounce) both;
}
.toast.is-out {
  animation: lhx-fade-up 0.24s var(--ease) reverse both;
}
.toast.is-ok {
  background: #14805e;
}
.toast.is-warn {
  background: #b45309;
}
.toast.is-err {
  background: #b91c1c;
}

.modal {
  pointer-events: auto;
  position: relative;
  width: min(94vw, 440px);
  max-height: 82vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  box-shadow: var(--sh-lg);
  animation: lhx-pop 0.32s var(--ease-bounce) both;
}
.modal-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: var(--sp-3);
}
.modal-body {
  font-size: var(--fs-base);
  color: var(--text-2);
  line-height: 1.7;
}
.modal-actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.modal-actions .btn {
  flex: 1;
}

.sheet {
  pointer-events: auto;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  padding: var(--sp-5) var(--sp-5) calc(var(--sp-5) + var(--sa-b));
  box-shadow: var(--sh-lg);
  animation: lhx-fade-up 0.3s var(--ease) both;
}
.sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: var(--r-full);
  background: var(--line-strong);
  margin: 0 auto var(--sp-4);
}
.sheet-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  margin-bottom: var(--sp-4);
}

/* ============================ 安装指引 ============================ */
/* 抽屉里的图文说明：编号步骤 + 注意事项 + （宽屏）扫码入口。
   目标只有一个——让 iOS / 微信这类「永远不会弹安装条」的设备，
   也能照着一句话点对地方。 */
.guide-lead {
  font-size: var(--fs-sm);
  line-height: 1.75;
  color: var(--text-2);
  margin: 0 0 var(--sp-4);
}
.guide-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}

.guide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.guide-step {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
}
.guide-step .gs-n {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: var(--r-full);
  background: var(--brand-fill);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  display: grid;
  place-content: center;
  margin-top: 1px;
}
.guide-step .gs-body {
  /* flex 子项默认 min-width:auto，长句子不会收缩，会把步骤编号挤出去 */
  flex: 1;
  min-width: 0;
}
.guide-step .gs-t {
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.5;
}
.guide-step .gs-d {
  font-size: var(--fs-sm);
  color: var(--text-3);
  line-height: 1.7;
  margin-top: 2px;
}

.guide-notes {
  margin-top: var(--sp-5);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--bg-sunk);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.guide-notes .gn-row {
  display: flex;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  line-height: 1.7;
  color: var(--text-3);
}
.guide-notes .gn-i {
  flex: none;
  display: inline-flex;
  color: var(--brand-600);
  margin-top: 2px;
}

.guide-qr {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-5);
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.guide-qr img {
  flex: none;
  width: 132px;
  height: 132px;
  border-radius: var(--r-sm);
  /* 二维码必须是白底深码，不能跟着主题翻色 */
  background: #fff;
}
.guide-qr .qr-side {
  min-width: 0;
}
.guide-qr .qr-t {
  font-size: var(--fs-base);
  font-weight: 700;
}
.guide-qr .qr-s {
  font-size: var(--fs-xs);
  color: var(--text-3);
  line-height: 1.7;
  margin-top: 3px;
  word-break: break-all;
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}
.guide-foot {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--text-3);
  line-height: 1.7;
}

/* ============================ 空态 / 骨架 ============================ */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-10) var(--sp-5);
  text-align: center;
  color: var(--text-3);
}
.empty .empty-art {
  width: 84px;
  height: 84px;
  border-radius: var(--r-full);
  display: grid;
  place-items: center;
  background: var(--brand-50);
  color: var(--brand-300);
}
.empty .empty-t {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-2);
}
.empty .empty-s {
  font-size: var(--fs-sm);
  max-width: 300px;
}

.skeleton {
  border-radius: var(--r-sm);
  background: linear-gradient(
    90deg,
    var(--bg-sunk) 25%,
    var(--brand-50) 37%,
    var(--bg-sunk) 63%
  );
  background-size: 200% 100%;
  animation: lhx-shimmer 1.4s linear infinite;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--brand-200);
  border-top-color: var(--brand-600);
  animation: lhx-spin 0.8s linear infinite;
  flex: none;
}

/* ============================ 头像 ============================ */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
  font-size: var(--fs-base);
  font-weight: 700;
  user-select: none;
}
.avatar.is-sm {
  width: 32px;
  height: 32px;
  font-size: var(--fs-sm);
}
.avatar.is-lg {
  width: 56px;
  height: 56px;
  font-size: var(--fs-xl);
}
.avatar.is-xl {
  width: 76px;
  height: 76px;
  font-size: var(--fs-2xl);
}
.avatar.c-a { background: linear-gradient(135deg, #9277ff, #6a45f0); }
.avatar.c-b { background: linear-gradient(135deg, #2ae8c4, #0fb894); }
.avatar.c-c { background: linear-gradient(135deg, #ffa35c, #ff6700); }
.avatar.c-d { background: linear-gradient(135deg, #61a5ff, #2563eb); }
.avatar.c-e { background: linear-gradient(135deg, #f47ba6, #e8618c); }
.avatar.c-f { background: linear-gradient(135deg, #c4aaff, #9a72ea); }

/* ============================ 评分（跟读） ============================ */
.score-ring {
  position: relative;
  width: 104px;
  height: 104px;
  flex: none;
}
.score-ring svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}
.score-ring .sr-track {
  fill: none;
  stroke: var(--bg-sunk);
}
.score-ring .sr-val {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s var(--ease), stroke 0.3s;
}
.score-ring .sr-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.score-ring .sr-num {
  font-family: var(--font-en);
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}
.score-ring .sr-cap {
  font-size: var(--fs-xs);
  color: var(--text-3);
  margin-top: 3px;
}

.meter {
  height: 10px;
  border-radius: var(--r-full);
  background: var(--bg-sunk);
  overflow: hidden;
}
.meter > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #61e8c9);
  transition: width 0.08s linear;
}

.metric-row {
  display: grid;
  grid-template-columns: 76px 1fr 46px;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.metric-row .mv {
  text-align: right;
  font-family: var(--font-en);
  font-weight: 700;
  color: var(--ink);
}

/* 录音按钮 */
.rec-btn {
  width: 68px;
  height: 68px;
  border-radius: var(--r-full);
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  box-shadow: 0 8px 24px rgba(122, 85, 255, 0.32);
  transition: transform 0.16s var(--ease-bounce);
}
.rec-btn:active {
  transform: scale(0.93);
}
.rec-btn.is-rec {
  background: linear-gradient(135deg, #ff6b6b, #d32f2f);
  box-shadow: 0 8px 24px rgba(211, 47, 47, 0.34);
  animation: lhx-ring 1.6s var(--ease) infinite;
}
.rec-btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
  box-shadow: none;
}

/* ============================ 插画位 ============================ */
.rocket-art {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 16px 28px rgba(122, 85, 255, 0.22));
}
.float-soft {
  animation: lhx-float 4.5s ease-in-out infinite;
}
@keyframes lhx-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ============================ 分栏 / 网格 ============================ */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-4);
}
.grid-sounds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
  gap: var(--sp-3);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
}
@media (max-width: 720px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ============================ 标签页 ============================ */
.tabs {
  display: flex;
  gap: var(--sp-1);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs > button {
  position: relative;
  height: 44px;
  padding: 0 var(--sp-4);
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text-3);
  white-space: nowrap;
  transition: color 0.18s;
}
.tabs > button.is-on {
  color: var(--brand-700);
}
.tabs > button.is-on::after {
  content: "";
  position: absolute;
  left: var(--sp-3);
  right: var(--sp-3);
  bottom: -1px;
  height: 3px;
  border-radius: var(--r-full);
  background: var(--brand-500);
}
.tabs > button:hover {
  color: var(--brand-600);
}
