:root {
  --bg: #f4f6f1;
  --surface: #ffffff;
  --surface-soft: #eef2ea;
  --ink: #111713;
  --muted: #66706a;
  --line: #dce3db;
  --jade: #10845c;
  --jade-dark: #0a583f;
  --cinnabar: #c95535;
  --bronze: #9b7738;
  --night: #101514;
  --shadow: 0 18px 40px rgba(19, 30, 24, 0.12);
  --radius-card: 8px;
  --radius-control: 999px;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(16, 132, 92, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(16, 132, 92, 0.06) 1px, transparent 1px),
    #dde4dc;
  background-size: 44px 44px;
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    background 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

button:active:not(:disabled) {
  transform: scale(0.985);
}

.phone-shell {
  width: min(100vw, 430px);
  height: min(100dvh, 920px);
  min-height: 760px;
  display: grid;
  grid-template-rows: 36px 1fr 76px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid rgba(17, 23, 19, 0.1);
  box-shadow: 0 30px 80px rgba(16, 21, 20, 0.2);
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.status-cluster {
  display: flex;
  align-items: center;
  gap: 7px;
}

.signal {
  width: 16px;
  height: 10px;
  display: inline-block;
  background:
    linear-gradient(to top, var(--ink) 0 25%, transparent 25%) 0 6px / 3px 10px,
    linear-gradient(to top, var(--ink) 0 50%, transparent 50%) 5px 3px / 3px 10px,
    linear-gradient(to top, var(--ink) 0 75%, transparent 75%) 10px 0 / 3px 10px;
  background-repeat: no-repeat;
}

.wifi {
  width: 14px;
  height: 10px;
  border: 2px solid var(--ink);
  border-top-color: transparent;
  border-left-color: transparent;
  transform: rotate(45deg);
  border-radius: 2px;
}

.battery {
  width: 22px;
  height: 11px;
  border: 1.7px solid var(--ink);
  border-radius: 3px;
  position: relative;
}

.battery::before {
  content: "";
  position: absolute;
  inset: 2px 5px 2px 2px;
  background: var(--ink);
  border-radius: 1px;
}

.battery::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 3px;
  width: 2px;
  height: 5px;
  background: var(--ink);
  border-radius: 0 2px 2px 0;
}

.app-viewport {
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.app-viewport::-webkit-scrollbar {
  display: none;
}

.screen {
  min-height: 100%;
  padding: 18px 18px 24px;
}

.screen.dark {
  background: var(--night);
  color: #f3f7ee;
}

.topline,
.screen-head,
.section-head,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.row-between.tight {
  gap: 8px;
}

.brand-block {
  display: grid;
  gap: 3px;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.screen.dark .eyebrow {
  color: rgba(243, 247, 238, 0.62);
}

.brand-title,
.screen-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: 0;
}

.screen-title.small {
  font-size: 23px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-button.dark {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #f3f7ee;
}

.search-icon,
.back-icon,
.close-icon,
.more-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  position: relative;
}

.search-icon {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  width: 8px;
  height: 2px;
  background: currentColor;
  position: absolute;
  right: -6px;
  bottom: -3px;
  transform: rotate(45deg);
  border-radius: 2px;
}

.back-icon::before,
.back-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  background: currentColor;
  border-radius: 2px;
}

.back-icon::before {
  width: 16px;
  height: 2px;
}

.back-icon::after {
  width: 9px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: transparent;
  transform: rotate(45deg);
  top: 4px;
}

.close-icon::before,
.close-icon::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 8px;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.close-icon::before {
  transform: rotate(45deg);
}

.close-icon::after {
  transform: rotate(-45deg);
}

.more-icon,
.more-icon::before,
.more-icon::after {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.more-icon::before,
.more-icon::after {
  content: "";
  position: absolute;
  top: 0;
}

.more-icon::before {
  left: -7px;
}

.more-icon::after {
  right: -7px;
}

.favorite-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  position: relative;
}

.favorite-icon::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 50% 50% 2px 50%;
  transform: rotate(45deg);
}

.icon-button.is-favorite {
  background: var(--jade);
  border-color: var(--jade);
  color: #f7faf3;
}

.hero-card {
  margin-top: 22px;
  min-height: 220px;
  border: 0;
  border-radius: var(--radius-card);
  padding: 0;
  overflow: hidden;
  background: var(--night);
  color: #f6fbf4;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr;
  text-align: left;
  cursor: pointer;
}

.hero-media,
.course-media,
.detail-media,
.phase-visual,
.video-stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  min-height: 142px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    var(--night);
  background-size: 28px 28px;
}

.course-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
}

.hero-card .course-art {
  opacity: 0.8;
}

.slot-label {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  background: rgba(16, 21, 20, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 5px 7px;
  border-radius: 4px;
}

.hero-body {
  padding: 17px;
}

.hero-kicker {
  color: #a7d9c3;
  font-size: 12px;
  font-weight: 800;
}

.course-kicker {
  color: var(--jade);
  font-size: 12px;
  font-weight: 850;
}

.hero-title {
  margin: 7px 0 10px;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-meta,
.course-meta,
.compact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 700;
}

.tag-pill {
  background: var(--surface-soft);
  color: var(--jade-dark);
}

.tag-pill.member-tag {
  background: rgba(155, 119, 56, 0.15);
  color: #70501b;
}

.member-strip {
  width: 100%;
  min-height: 64px;
  margin-top: 16px;
  border: 1px solid #d8c79f;
  border-radius: var(--radius-card);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  background: #fffaf0;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.member-strip.is-active {
  border-color: rgba(16, 132, 92, 0.35);
  background: #eef7ef;
}

.member-strip strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.member-strip small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.member-strip > span:last-child {
  color: var(--jade-dark);
  font-size: 13px;
  font-weight: 900;
}

.detail-member {
  margin-top: 14px;
}

.daily-panel {
  display: grid;
  grid-template-columns: 1fr 128px;
  align-items: stretch;
  gap: 12px;
  margin-top: 16px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 14px;
}

.stat-card strong {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 7px;
}

.breath-ring {
  min-height: 112px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  position: relative;
}

.breath-ring::before {
  content: "";
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 8px solid #dfe8de;
  border-top-color: var(--jade);
  border-right-color: var(--cinnabar);
  transform: rotate(26deg);
}

.breath-ring span {
  position: absolute;
  font-size: 12px;
  font-weight: 800;
  color: var(--jade-dark);
}

.section {
  margin-top: 24px;
}

.section-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.text-link {
  border: 0;
  padding: 0;
  color: var(--jade);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.muted-link {
  color: var(--muted);
}

.action-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.small-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.search-panel {
  min-height: 46px;
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.search-panel .search-icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.search-field {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.result-count {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.catalog-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.catalog-summary article {
  min-width: 0;
  min-height: 68px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.catalog-summary strong {
  font-size: 22px;
  line-height: 1;
}

.catalog-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.filter-chip,
.soft-chip {
  min-height: 34px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 7px 13px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.filter-chip.is-active,
.soft-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #f6fbf4;
}

.smart-card {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(16, 132, 92, 0.28);
  border-radius: var(--radius-card);
  background:
    linear-gradient(90deg, rgba(16, 132, 92, 0.10), transparent 70%),
    var(--surface);
  text-align: left;
  cursor: pointer;
}

.smart-card strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}

.smart-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.onboarding-hero,
.history-hero {
  min-height: 252px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--night);
  color: #f7faf3;
  display: grid;
  align-content: space-between;
}

.onboarding-hero h1,
.history-hero h1 {
  margin: 10px 0 8px;
  font-size: 30px;
  line-height: 1.06;
  letter-spacing: 0;
}

.onboarding-hero p,
.history-hero p {
  margin: 0;
  color: rgba(247, 250, 243, 0.72);
  font-size: 14px;
  line-height: 1.65;
}

.onboarding-hero .manifest-summary div,
.history-hero .manifest-summary div {
  background: rgba(255, 255, 255, 0.08);
}

.onboarding-hero .manifest-summary span,
.history-hero .manifest-summary span {
  color: rgba(247, 250, 243, 0.64);
}

.onboarding-screen {
  padding-bottom: 122px;
}

.onboarding-screen .sticky-cta {
  position: static;
  margin: 24px 0 0;
  padding: 0;
  background: transparent;
}

.course-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.course-card {
  width: 100%;
  min-height: 146px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 0;
  display: grid;
  grid-template-columns: 132px 1fr;
  overflow: hidden;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.course-media {
  min-height: 146px;
  background: var(--night);
}

.lock-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  min-height: 25px;
  display: inline-grid;
  place-items: center;
  padding: 4px 8px;
  border-radius: var(--radius-control);
  background: rgba(255, 250, 240, 0.92);
  color: #6e501d;
  font-size: 12px;
  font-weight: 900;
}

.course-body {
  min-width: 0;
  padding: 13px 13px 12px;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

.course-title {
  margin: 4px 0 6px;
  font-size: 17px;
  line-height: 1.18;
  letter-spacing: 0;
}

.course-desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.course-card .meta-pill {
  background: var(--surface-soft);
  color: var(--muted);
}

.save-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #c8d2c9;
  flex: 0 0 auto;
}

.save-dot.is-saved {
  border-color: var(--jade);
  background: var(--jade);
}

.empty-state,
.notice-card,
.goal-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.empty-state {
  min-height: 118px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 7px;
  padding: 16px;
}

.empty-state strong,
.notice-card strong,
.goal-panel strong {
  font-size: 15px;
}

.empty-state span,
.notice-card span,
.goal-panel span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.notice-card {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
}

.notice-card.compact {
  margin-top: 14px;
}

.plan-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(118px, 1fr));
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.plan-strip::-webkit-scrollbar {
  display: none;
}

.plan-card {
  min-height: 108px;
  border: 0;
  padding: 13px;
  border-radius: var(--radius-card);
  color: #f7faf3;
  background: var(--ink);
  display: grid;
  align-content: space-between;
  text-align: left;
  cursor: pointer;
}

.plan-card:nth-child(2) {
  background: var(--jade-dark);
}

.plan-card:nth-child(3) {
  background: #5b4930;
}

.plan-card strong {
  font-size: 16px;
  line-height: 1.2;
}

.plan-card span {
  color: rgba(247, 250, 243, 0.72);
  font-size: 12px;
}

.active-plan,
.plan-hero,
.plan-day {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.active-plan {
  width: 100%;
  margin-top: 13px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.active-plan strong,
.plan-day strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.active-plan small,
.plan-day small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.active-plan .progress-bar {
  grid-column: 1 / -1;
  margin-top: 0;
}

.plan-progress {
  color: var(--jade);
  font-size: 13px;
  font-weight: 900;
}

.plan-hero {
  margin-top: 12px;
  padding: 18px;
}

.plan-hero h1 {
  margin: 8px 0 9px;
  font-size: 29px;
  line-height: 1.08;
}

.plan-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.plan-lock {
  width: fit-content;
  margin-top: 12px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 5px 10px;
  border-radius: var(--radius-control);
  background: rgba(155, 119, 56, 0.15);
  color: #6e501d;
  font-size: 12px;
  font-weight: 900;
}

.plan-lock.is-open {
  background: rgba(16, 132, 92, 0.13);
  color: var(--jade-dark);
}

.plan-hero > span {
  display: inline-flex;
  margin-top: 9px;
  color: var(--jade-dark);
  font-size: 12px;
  font-weight: 850;
}

.plan-day-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.plan-day {
  min-height: 74px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  text-align: left;
  cursor: pointer;
}

.plan-day.is-current {
  border-color: rgba(16, 132, 92, 0.36);
  background:
    linear-gradient(90deg, rgba(16, 132, 92, 0.10), transparent 68%),
    var(--surface);
}

.status-pill {
  min-width: 44px;
  min-height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.status-pill.is-done {
  background: rgba(16, 132, 92, 0.13);
  color: var(--jade-dark);
}

.status-pill.is-current {
  background: rgba(201, 85, 53, 0.12);
  color: #8c3d27;
}

.detail-media {
  height: 238px;
  margin: -18px -18px 0;
  background: var(--night);
}

.detail-nav {
  position: absolute;
  top: 14px;
  left: 18px;
  right: 18px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 54%;
  background: linear-gradient(transparent, rgba(16, 21, 20, 0.88));
  z-index: 1;
}

.detail-media-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  color: #f7faf3;
}

.detail-media-copy h1 {
  margin: 7px 0 9px;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: 0;
}

.detail-copy {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.action-row {
  width: 100%;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 11px 12px;
  background: var(--surface);
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 11px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.action-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--jade-dark);
  font-size: 12px;
  font-weight: 900;
}

.action-row h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.2;
}

.action-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.progress-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.progress-summary div {
  min-height: 72px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.progress-summary strong {
  display: block;
  font-size: 23px;
  line-height: 1;
}

.progress-summary span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.action-coverage-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.action-coverage-panel strong {
  font-size: 15px;
}

.action-coverage-panel .row-between > span {
  color: var(--jade-dark);
  font-size: 13px;
  font-weight: 900;
}

.standard-panel,
.calibration-panel {
  border: 1px solid rgba(16, 132, 92, 0.18);
  border-radius: var(--radius-card);
  background:
    linear-gradient(135deg, rgba(16, 132, 92, 0.1), transparent 58%),
    var(--surface);
  padding: 14px;
}

.standard-head {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
}

.standard-head strong,
.route-line strong,
.calibration-grid strong,
.practice-standard strong {
  display: block;
  font-size: 14px;
  line-height: 1.45;
}

.standard-head small,
.route-line span,
.calibration-grid article > span,
.practice-standard span,
.practice-standard small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.standard-panel p {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.standard-grid,
.calibration-grid {
  display: grid;
  gap: 10px;
  margin-top: 13px;
}

.standard-grid {
  grid-template-columns: 1fr 1fr;
}

.standard-grid article,
.route-line,
.calibration-grid article,
.practice-standard {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.68);
  padding: 11px;
}

.standard-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.source-link {
  display: inline-flex;
  margin-top: 13px;
  color: var(--jade);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.source-link:focus-visible {
  outline: 2px solid var(--jade);
  outline-offset: 3px;
}

.calibration-wrap {
  margin-top: 16px;
}

.route-line {
  margin-top: 13px;
}

.warning-chip {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: var(--radius-control);
  background: rgba(201, 85, 53, 0.12);
  color: #8c3d27;
  font-size: 12px;
  font-weight: 850;
}

.chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
}

.sticky-cta {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 22px -18px -24px;
  padding: 12px 18px 18px;
  background: linear-gradient(rgba(244, 246, 241, 0), var(--bg) 22%);
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.primary-button {
  background: var(--jade);
  color: #f8fff9;
}

.secondary-button {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.practice-screen {
  padding: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.video-stage {
  height: 342px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    #0d1110;
  background-size: 34px 34px;
}

.video-stage .course-art {
  opacity: 0.42;
}

.follow-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  z-index: 1;
}

.video-fallback {
  z-index: 0;
}

.video-topbar {
  position: absolute;
  top: 14px;
  left: 18px;
  right: 18px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
}

.video-slot-copy {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 26px;
  z-index: 3;
}

.video-slot-copy .slot-label {
  position: static;
  display: inline-flex;
}

.player-title {
  margin: 12px 0 0;
  color: #f7faf3;
  font-size: 25px;
  line-height: 1.08;
}

.player-subtitle {
  margin: 7px 0 0;
  color: rgba(247, 250, 243, 0.72);
  font-size: 13px;
  font-weight: 750;
}

.timer-panel {
  margin: -18px 18px 0;
  position: relative;
  z-index: 6;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px;
  box-shadow: var(--shadow);
}

.timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.time-readout {
  display: grid;
  gap: 3px;
}

.time-readout strong {
  font-size: 30px;
  line-height: 1;
}

.time-readout span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.breath-cue {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 9px solid #e2eadf;
  border-top-color: var(--jade);
  display: grid;
  place-items: center;
  color: var(--jade-dark);
  font-size: 13px;
  font-weight: 900;
}

.progress-bar {
  height: 8px;
  margin-top: 15px;
  border-radius: 99px;
  background: var(--surface-soft);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: var(--progress, 32%);
  border-radius: inherit;
  background: var(--jade);
}

.progress-bar.thin {
  height: 4px;
  margin-top: 8px;
  background: #edf1ea;
}

.screen.dark .progress-bar.thin {
  background: #e7ece4;
}

.cue-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.feedback-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 13px;
}

.feedback-row.wrap {
  display: flex;
  flex-wrap: wrap;
}

.feedback-row .soft-chip {
  min-height: 42px;
}

.cue {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  color: var(--jade-dark);
  font-size: 12px;
  font-weight: 850;
}

.phase-tracker {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.phase-tracker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.phase-tracker-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.phase-tracker-head strong {
  color: var(--jade-dark);
  font-size: 12px;
  line-height: 1.3;
}

.phase-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.phase-step {
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #f9fbf6;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  padding: 4px 5px;
  transition:
    background 180ms cubic-bezier(0.16, 1, 0.3, 1),
    color 180ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.phase-step.is-active {
  border-color: var(--jade);
  background: rgba(16, 132, 92, 0.12);
  color: var(--jade-dark);
}

.phase-step.is-done {
  border-color: rgba(16, 132, 92, 0.2);
  background: var(--jade);
  color: #f8fff9;
}

.phase-progress {
  margin-top: 10px;
}

.next-panel,
.profile-card,
.history-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.next-panel {
  margin: 14px 18px 0;
  padding: 14px;
}

.next-panel h2,
.breakdown-body h2 {
  margin: 0;
  font-size: 17px;
}

.next-panel p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.next-panel small {
  display: block;
  margin-top: 8px;
  color: var(--jade-dark);
  font-size: 12px;
  font-weight: 850;
}

.practice-standard {
  margin: 12px 18px 0;
  background:
    linear-gradient(135deg, rgba(16, 132, 92, 0.12), transparent 62%),
    #f7faf4;
}

.practice-standard strong {
  margin-top: 3px;
  color: var(--ink);
}

.practice-standard small {
  margin-top: 5px;
}

.preflight-screen {
  padding-bottom: 120px;
}

.preflight-hero {
  min-height: 232px;
  padding: 20px;
  border-radius: var(--radius-card);
  background:
    linear-gradient(135deg, rgba(16, 132, 92, 0.3), transparent 58%),
    var(--night);
  color: #f7faf3;
  display: grid;
  align-content: end;
}

.preflight-hero h1 {
  margin: 10px 0 9px;
  max-width: 12ch;
  font-size: 31px;
  line-height: 1.06;
  letter-spacing: 0;
  text-wrap: balance;
}

.preflight-hero p {
  margin: 0;
  color: rgba(247, 250, 243, 0.72);
  font-size: 14px;
  line-height: 1.6;
}

.preflight-list {
  display: grid;
  gap: 10px;
}

.check-row {
  min-height: 82px;
  display: grid;
  grid-template-columns: 22px 42px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  cursor: pointer;
}

.check-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--jade);
}

.check-row strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.check-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.player-controls {
  display: grid;
  grid-template-columns: 1fr 58px 1fr;
  align-items: center;
  gap: 12px;
  padding: 18px;
}

.round-control {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 0;
  background: #f7faf3;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.round-control.play {
  background: var(--jade);
  color: #f7faf3;
  position: relative;
}

.round-control.play::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid currentColor;
  position: absolute;
  left: 23px;
  top: 19px;
}

.round-control.pause {
  background: var(--cinnabar);
  color: #f7faf3;
  position: relative;
}

.round-control.pause::before,
.round-control.pause::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 6px;
  height: 22px;
  background: currentColor;
  border-radius: 2px;
}

.round-control.pause::before {
  left: 20px;
}

.round-control.pause::after {
  right: 20px;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.completion-card {
  min-height: 230px;
  padding: 22px;
  border-radius: var(--radius-card);
  background: var(--night);
  color: #f7faf3;
  display: grid;
  align-content: space-between;
}

.completion-card h1 {
  margin: 10px 0 18px;
  font-size: 28px;
  line-height: 1.08;
}

.completion-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.completion-stats div {
  padding: 12px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.08);
}

.completion-stats strong {
  display: block;
  font-size: 22px;
}

.completion-stats span {
  display: block;
  margin-top: 4px;
  color: rgba(247, 250, 243, 0.68);
  font-size: 12px;
}

.session-recap {
  padding: 14px;
  border: 1px solid rgba(16, 132, 92, 0.18);
  border-radius: var(--radius-card);
  background:
    linear-gradient(135deg, rgba(16, 132, 92, 0.1), transparent 60%),
    var(--surface);
}

.recap-route {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.recap-step {
  min-height: 36px;
  display: grid;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.recap-step.is-last {
  border-color: rgba(16, 132, 92, 0.25);
  background: rgba(16, 132, 92, 0.1);
  color: var(--jade-dark);
}

.session-recap p {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.membership-screen {
  padding-bottom: 0;
}

.membership-hero {
  margin-top: 12px;
  min-height: 214px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: #fffaf0;
  border: 1px solid #dcc99c;
  display: grid;
  align-content: space-between;
}

.account-hero {
  margin-top: 12px;
  min-height: 232px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: #fffaf0;
  border: 1px solid #dcc99c;
  display: grid;
  align-content: space-between;
}

.account-hero.is-active {
  background: var(--night);
  border-color: var(--night);
  color: #f7faf3;
}

.account-hero h1 {
  margin: 10px 0 8px;
  font-size: 30px;
  line-height: 1.06;
}

.account-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.account-hero.is-active p,
.account-hero.is-active .eyebrow {
  color: rgba(247, 250, 243, 0.7);
}

.account-hero.is-active .manifest-summary div {
  background: rgba(255, 255, 255, 0.08);
}

.account-hero.is-active .manifest-summary span {
  color: rgba(247, 250, 243, 0.64);
}

.membership-hero.is-active {
  background: var(--night);
  border-color: var(--night);
  color: #f7faf3;
}

.membership-hero h1 {
  margin: 10px 0 8px;
  font-size: 30px;
  line-height: 1.06;
}

.membership-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.membership-hero.is-active p,
.membership-hero.is-active .eyebrow {
  color: rgba(247, 250, 243, 0.7);
}

.membership-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(17, 23, 19, 0.12);
}

.membership-hero.is-active .membership-status {
  border-top-color: rgba(255, 255, 255, 0.14);
}

.membership-status span {
  color: var(--jade-dark);
  font-size: 13px;
  font-weight: 900;
}

.membership-hero.is-active .membership-status span {
  color: #a7d9c3;
}

.membership-status strong {
  font-size: 13px;
}

.benefit-list,
.tier-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.benefit-row,
.tier-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.benefit-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.benefit-row strong,
.tier-card strong {
  display: block;
  font-size: 15px;
}

.benefit-row small,
.tier-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.tier-card {
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  text-align: left;
  cursor: pointer;
}

.tier-card.is-current {
  border-color: rgba(16, 132, 92, 0.42);
  background: #eff8ef;
}

.tier-price {
  color: #6e501d;
  font-size: 20px;
  font-weight: 950;
  text-align: right;
}

.tier-price small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.order-list,
.setting-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.account-card {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  overflow: hidden;
}

.account-line {
  min-height: 58px;
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.account-line:last-child {
  border-bottom: 0;
}

.account-line span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.account-line strong {
  min-width: 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.account-form.is-error .form-field {
  border-color: var(--cinnabar);
  background: #fff6f2;
}

.compact-card {
  min-height: 126px;
}

.order-row,
.setting-row,
.form-field {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.order-row {
  min-height: 62px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.order-row strong,
.setting-row strong {
  display: block;
  font-size: 14px;
}

.order-row small,
.setting-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.order-row > span:last-child {
  color: #6e501d;
  font-weight: 950;
}

.settings-form {
  display: grid;
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.form-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.form-field input,
.form-field select,
.data-box {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.form-field input,
.form-field select {
  min-height: 32px;
  font-size: 16px;
  font-weight: 800;
}

.setting-row {
  min-height: 68px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.setting-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--jade);
}

.preference-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.preference-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.preference-chip {
  min-width: 0;
  cursor: pointer;
}

.preference-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.preference-chip span {
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.preference-chip input:checked + span {
  border-color: var(--jade);
  background: var(--jade);
  color: #f8fff9;
}

.data-box {
  min-height: 210px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  resize: vertical;
}

.data-box.is-error {
  border-color: var(--cinnabar);
  background: #fff6f2;
}

.sticky-cta.inline {
  position: static;
  margin: 12px 0 0;
  padding: 0;
  background: transparent;
}

.breakdown-screen {
  padding-bottom: 0;
}

.phase-grid {
  display: grid;
  gap: 12px;
  margin-top: 15px;
}

.phase-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  overflow: hidden;
}

.phase-visual {
  height: 188px;
  background:
    linear-gradient(90deg, rgba(16, 132, 92, 0.09) 1px, transparent 1px),
    linear-gradient(0deg, rgba(16, 132, 92, 0.08) 1px, transparent 1px),
    #f8faf4;
  background-size: 24px 24px;
}

.phase-figure {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 92px;
  height: 126px;
  transform: translate(-50%, -50%);
}

.phase-figure::before {
  content: "";
  position: absolute;
  left: 35px;
  top: 0;
  width: 23px;
  height: 23px;
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.phase-figure::after {
  content: "";
  position: absolute;
  left: 45px;
  top: 25px;
  width: 3px;
  height: 62px;
  background: var(--ink);
  border-radius: 3px;
  box-shadow:
    -30px 12px 0 -1px var(--ink),
    30px 12px 0 -1px var(--ink),
    -21px 72px 0 -1px var(--ink),
    22px 72px 0 -1px var(--ink);
}

.phase-copy {
  padding: 13px;
}

.phase-copy h3 {
  margin: 0 0 7px;
  font-size: 16px;
}

.phase-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.library-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 15px;
}

.library-card {
  min-height: 154px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: 13px;
  display: grid;
  align-content: space-between;
  cursor: pointer;
}

.library-card strong {
  font-size: 17px;
  line-height: 1.2;
}

.library-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.asset-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.asset-manifest-hero {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background:
    linear-gradient(135deg, rgba(16, 132, 92, 0.12), transparent 64%),
    var(--surface);
}

.asset-manifest-hero h1 {
  margin: 8px 0 8px;
  font-size: 29px;
  line-height: 1.08;
}

.asset-manifest-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.manifest-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.manifest-summary div {
  min-height: 64px;
  padding: 11px;
  border-radius: var(--radius-card);
  background: var(--surface-soft);
}

.manifest-summary strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.manifest-summary span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.manifest-list {
  display: grid;
  gap: 10px;
}

.asset-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.manifest-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.asset-row strong {
  display: block;
  font-size: 15px;
}

.asset-row small,
.manifest-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.manifest-row strong {
  display: block;
  font-size: 15px;
}

.manifest-box {
  min-height: 320px;
}

.status-pill.is-queued {
  background: rgba(155, 119, 56, 0.15);
  color: #6e501d;
}

.mini-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  color: var(--jade-dark);
  font-weight: 900;
}

.profile-hero {
  padding: 18px;
  border-radius: var(--radius-card);
  background: var(--night);
  color: #f7faf3;
}

.profile-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-user > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.profile-settings {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--jade);
  color: #f7faf3;
  font-weight: 950;
}

.profile-user h1 {
  margin: 0;
  font-size: 22px;
}

.profile-user p {
  margin: 4px 0 0;
  color: rgba(247, 250, 243, 0.68);
  font-size: 13px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.profile-stats div {
  padding: 11px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.08);
}

.profile-stats strong {
  display: block;
  font-size: 20px;
}

.profile-stats span {
  display: block;
  margin-top: 4px;
  color: rgba(247, 250, 243, 0.68);
  font-size: 12px;
}

.history-card {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
  margin-top: 14px;
}

.calendar-day {
  min-width: 0;
  min-height: 62px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background:
    linear-gradient(to top, rgba(16, 132, 92, 0.14) var(--progress, 0%), transparent var(--progress, 0%)),
    var(--surface);
}

.calendar-day.is-active {
  border-color: rgba(16, 132, 92, 0.35);
}

.calendar-day span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.calendar-day strong {
  font-size: 14px;
  line-height: 1;
}

.calendar-day small {
  min-height: 13px;
  color: var(--jade-dark);
  font-size: 10px;
  font-weight: 900;
}

.course-rank-list,
.history-detail-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.rank-row,
.history-detail-row {
  min-height: 70px;
  display: grid;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.rank-row {
  grid-template-columns: 34px 1fr auto;
  text-align: left;
  cursor: pointer;
}

.history-detail-row {
  grid-template-columns: 62px 1fr;
}

.rank-row strong,
.history-detail-row strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.rank-row small,
.history-detail-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.history-detail-row time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.history-line {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 10px;
  align-items: center;
}

.history-line time {
  color: var(--muted);
  font-size: 12px;
}

.history-line strong {
  font-size: 14px;
}

.history-line span {
  color: var(--jade);
  font-size: 12px;
  font-weight: 850;
}

.history-line.muted {
  opacity: 0.62;
}

.goal-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.goal-panel strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.goal-panel span {
  display: block;
  margin-top: 5px;
}

.trend-card {
  min-height: 138px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 8px;
  margin-top: 14px;
  padding: 14px 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.trend-day {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
}

.trend-bar {
  width: 100%;
  height: 66px;
  display: grid;
  align-items: end;
  border-radius: 999px;
  background: var(--surface-soft);
  overflow: hidden;
}

.trend-bar span {
  display: block;
  min-height: 4px;
  height: var(--progress, 0%);
  border-radius: inherit;
  background: var(--jade);
}

.trend-day strong {
  font-size: 11px;
  line-height: 1;
}

.trend-day small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.achievement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.achievement-card {
  min-height: 126px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  opacity: 0.56;
}

.achievement-card.is-unlocked {
  border-color: rgba(16, 132, 92, 0.28);
  background:
    linear-gradient(135deg, rgba(16, 132, 92, 0.10), transparent 66%),
    var(--surface);
  opacity: 1;
}

.achievement-card strong {
  font-size: 15px;
  line-height: 1.2;
}

.achievement-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.tabbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 8px 14px 11px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 30;
  max-width: min(360px, calc(100vw - 32px));
  transform: translate(-50%, 18px);
  opacity: 0;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  background: var(--night);
  color: #f7faf3;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 850;
  pointer-events: none;
  transition:
    opacity 180ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.app-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.tab-item {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #7a827d;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.tab-item.is-active {
  color: var(--ink);
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  position: relative;
  color: currentColor;
}

.nav-home::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 14px;
  height: 11px;
  border: 2px solid currentColor;
  border-top: 0;
}

.nav-home::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.nav-course::before,
.nav-course::after {
  content: "";
  position: absolute;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.nav-course::before {
  left: 3px;
  top: 3px;
  width: 6px;
  height: 6px;
}

.nav-course::after {
  right: 3px;
  bottom: 3px;
  width: 10px;
  height: 10px;
}

.nav-play::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.nav-play::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 8px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid currentColor;
}

.nav-user::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.nav-user::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 2px;
  width: 16px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 12px 12px 0 0;
  border-bottom: 0;
}

@media (min-width: 780px) {
  .phone-shell {
    border-radius: 34px;
    height: 900px;
  }
}

@media (max-width: 430px) {
  body {
    display: block;
    background: var(--bg);
  }

  .phone-shell {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    border: 0;
    box-shadow: none;
  }
}

@media (max-width: 374px) {
  .screen {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-title,
  .detail-media-copy h1 {
    font-size: 25px;
  }

  .course-card {
    grid-template-columns: 118px 1fr;
  }

  .daily-panel {
    grid-template-columns: 1fr;
  }

  .sticky-cta {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }
}
