:root {
  --bg: #000000;
  --card: #1c1c1e;
  --card-border: rgba(255,255,255,0.08);
  --text: #ffffff;
  --text-sec: #8e8e93;
  --text-ter: #636366;
  --blue: #5ac8fa;
  --blue-deep: #0a84ff;
  --blue-soft: #64d2ff;
  --accent-grad: linear-gradient(90deg, #0a84ff 0%, #64d2ff 100%);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tab-h: 72px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
button { font-family: inherit; border: none; background: none; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

#app {
  min-height: 100%;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  background: var(--bg);
}

/* ===== Tabs shell ===== */
.tab-view { display: none; padding-bottom: calc(var(--tab-h) + var(--safe-b) + 12px); min-height: 100vh; }
.tab-view.active { display: block; animation: fadeIn .28s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===== Bottom tab bar ===== */
.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 430px;
  height: calc(var(--tab-h) + var(--safe-b));
  padding: 8px 24px var(--safe-b);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  background: rgba(0,0,0,0.72);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-top: 0.5px solid rgba(255,255,255,0.08);
  z-index: 50;
}
.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  color: var(--text-ter);
  transition: color .2s;
}
.tab-btn.active { color: #fff; }
.tab-btn svg { width: 26px; height: 26px; }
.tab-btn span { font-size: 10px; font-weight: 500; letter-spacing: 0.02em; }

/* ===== Practice (练习) ===== */
.practice-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}
.practice-hero .hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  z-index: 0;
}
.practice-hero .hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 28%, rgba(0,0,0,0.35) 48%, rgba(0,0,0,0.92) 72%, #000 100%);
}
.practice-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 56px 18px calc(var(--tab-h) + var(--safe-b) + 18px);
}

.week-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.week-msg {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  letter-spacing: -0.01em;
}
.week-view {
  font-size: 13px;
  color: #fff;
  background: rgba(28,28,30,0.85);
  border: 0.5px solid var(--card-border);
  padding: 6px 14px;
  border-radius: 999px;
}
.week-strip {
  display: flex;
  gap: 6px;
  margin: 14px 0 8px;
}
.day-cell {
  flex: 1;
  aspect-ratio: 1;
  border-radius: 10px;
  background: rgba(28,28,30,0.7);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sec);
  position: relative;
}
.day-cell.today { border-color: var(--blue); color: #fff; }
.day-cell.done {
  background: linear-gradient(160deg, #a8c7fa 0%, #7eb6f5 100%);
  color: #000;
  font-weight: 600;
}
.day-cell .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; margin-top: 3px; opacity: 0.7;
}

/* Duration ring */
.ring-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  margin: 8px 0 12px;
}
.ring {
  position: relative;
  width: min(72vw, 280px);
  height: min(72vw, 280px);
}
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: rgba(255,255,255,0.16); stroke-width: 1.8; }
.ring .prog { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; transition: stroke-dashoffset .15s linear; }
.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.ring-num {
  font-size: 76px;
  font-weight: 200;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
}
.ring-unit {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-sec);
}
.ring-handle {
  position: absolute;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(90,200,250,0.28), 0 2px 10px rgba(0,0,0,0.45);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.ring-handle::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #000;
}

.cards { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.card-row { display: flex; gap: 10px; }
.card {
  background: rgba(28,28,30,0.92);
  border: 0.5px solid var(--card-border);
  border-radius: 16px;
  padding: 14px 16px;
  text-align: left;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .15s, background .15s;
}
.card:active { transform: scale(0.98); background: #2c2c2e; }
.card.grow { flex: 1; }
.card.icon-only {
  width: 56px; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.card-label { font-size: 12px; color: var(--text-sec); margin-bottom: 4px; font-weight: 400; }
.card-value { font-size: 17px; font-weight: 500; color: #fff; letter-spacing: -0.01em; }

.cta {
  margin-top: 14px;
  width: 100%;
  height: 54px;
  border-radius: 999px;
  background: var(--accent-grad);
  color: #000;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 24px rgba(10,132,255,0.35);
  transition: transform .15s, filter .15s;
}
.cta:active { transform: scale(0.98); filter: brightness(0.95); }

/* ===== Sheet (picker) ===== */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 80; display: none; align-items: flex-end; justify-content: center;
}
.sheet-backdrop.show { display: flex; animation: fadeIn .2s ease; }
.sheet {
  width: 100%; max-width: 430px;
  background: #1c1c1e;
  border-radius: 20px 20px 0 0;
  padding: 12px 20px calc(28px + var(--safe-b));
  border-top: 0.5px solid var(--card-border);
}
.sheet-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: #3a3a3c; margin: 0 auto 16px;
}
.sheet h3 { font-size: 17px; font-weight: 600; margin-bottom: 14px; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 10px 16px;
  border-radius: 999px;
  background: #2c2c2e;
  border: 1px solid transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}
.chip.on {
  background: rgba(10,132,255,0.18);
  border-color: var(--blue-deep);
  color: #fff;
}

/* ===== Activity (记录) ===== */
.page {
  padding: 56px 18px 24px;
}
.page-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.seg {
  display: flex;
  background: #1c1c1e;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 22px;
  border: 0.5px solid var(--card-border);
}
.seg button {
  flex: 1;
  padding: 9px 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sec);
}
.seg button.on {
  background: #fff;
  color: #000;
  font-weight: 600;
}
.section-label {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.stat-card {
  background: #1c1c1e;
  border: 0.5px solid var(--card-border);
  border-radius: 16px;
  padding: 16px;
  min-height: 110px;
}
.stat-card .ico { font-size: 18px; margin-bottom: 10px; opacity: 0.9; }
.stat-card .num { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.stat-card .lbl { font-size: 13px; color: var(--text-sec); margin-top: 6px; }

.cal-card {
  background: #1c1c1e;
  border: 0.5px solid var(--card-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 22px;
}
.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.cal-head .month { font-size: 16px; font-weight: 600; }
.cal-nav { display: flex; gap: 8px; }
.cal-nav button {
  width: 32px; height: 32px; border-radius: 50%;
  background: #2c2c2e; color: #fff; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-dow {
  text-align: center; font-size: 11px; color: var(--text-ter);
  padding: 4px 0 8px; font-weight: 500;
}
.cal-day {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500;
  color: var(--text-sec);
  position: relative;
}
.cal-day.muted { opacity: 0.25; }
.cal-day.done {
  background: linear-gradient(160deg, #a8c7fa, #7eb6f5);
  color: #000; font-weight: 600;
}
.cal-day.today:not(.done) { border: 1px solid var(--blue); color: #fff; }
.cal-day .dots {
  display: flex; gap: 2px; margin-top: 2px; height: 4px;
}
.cal-day .dots i {
  width: 3px; height: 3px; border-radius: 50%; background: #000; opacity: 0.55;
}

.hist-list { display: flex; flex-direction: column; gap: 8px; }
.hist-item {
  background: #1c1c1e;
  border: 0.5px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.hist-item .t { font-size: 15px; font-weight: 500; }
.hist-item .d { font-size: 12px; color: var(--text-ter); margin-top: 3px; }
.hist-item .m { font-size: 15px; font-weight: 600; color: var(--blue); }
.empty {
  text-align: center; color: var(--text-ter); padding: 40px 20px; font-size: 14px;
}

/* ===== Account (我的) ===== */
.acct-hi {
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 18px;
}
.acct-card {
  background: #1c1c1e;
  border: 0.5px solid var(--card-border);
  border-radius: 16px;
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px;
}
.acct-card .logo {
  width: 44px; height: 44px; border-radius: 12px;
  background: #2c2c2e;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.acct-card .logo img { width: 100%; height: 100%; object-fit: cover; }
.acct-card .meta { flex: 1; }
.acct-card .meta .a { font-size: 15px; font-weight: 600; color: var(--blue); }
.acct-card .meta .b { font-size: 12px; color: var(--text-sec); margin-top: 2px; }

.menu { display: flex; flex-direction: column; gap: 2px; }
.menu-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 4px;
  text-align: left;
  width: 100%;
}
.menu-ico {
  width: 36px; height: 36px; border-radius: 50%;
  background: #1c1c1e; border: 0.5px solid var(--card-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.menu-body { flex: 1; }
.menu-body .t { font-size: 16px; font-weight: 500; }
.menu-body .s { font-size: 12px; color: var(--text-sec); margin-top: 2px; }
.menu-chev { color: var(--text-ter); font-size: 18px; }
.foot-note {
  text-align: center; color: var(--text-ter); font-size: 12px;
  margin: 28px 0 8px;
}

.toggle {
  width: 48px; height: 28px; border-radius: 14px;
  background: #3a3a3c; position: relative; transition: background .2s;
  flex-shrink: 0;
}
.toggle.on { background: var(--blue-deep); }
.toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 24px; height: 24px; border-radius: 50%; background: #fff;
  transition: transform .2s;
}
.toggle.on::after { transform: translateX(20px); }

/* ===== Session ===== */
.session {
  position: fixed; inset: 0; z-index: 100;
  background: #000;
  display: none;
  max-width: 430px;
  margin: 0 auto;
}
.session.show { display: block; animation: fadeIn .3s ease; }
.session-bg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity .35s ease;
}
.session-shade {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.25) 55%, rgba(0,0,0,0.85) 100%);
}
.session-ui {
  position: relative; z-index: 3;
  height: 100%;
  display: flex; flex-direction: column;
  padding: 54px 20px calc(28px + var(--safe-b));
}
.sess-top {
  display: flex; justify-content: space-between; align-items: center;
}
.sess-meta { font-size: 13px; color: rgba(255,255,255,0.7); font-weight: 500; }
.sess-close {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(28,28,30,0.7); border: 0.5px solid var(--card-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
}
.sess-mid {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  padding-bottom: 20px;
  gap: 0;
}
.sess-name {
  font-size: 36px; font-weight: 600;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
  margin-bottom: 8px;
}
.sess-cue {
  font-size: 15px; color: rgba(255,255,255,0.78);
  text-align: center; max-width: 300px; line-height: 1.5;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
.sess-ring-wrap {
  width: 104px; height: 104px; position: relative;
  margin: 32px auto 8px;
}
.sess-ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sess-ring-wrap .track { fill: none; stroke: rgba(255,255,255,0.18); stroke-width: 2; }
.sess-ring-wrap .prog { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.sess-time {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 300; letter-spacing: -0.02em;
}
.sess-controls {
  display: flex; align-items: center; justify-content: center; gap: 28px;
  margin-top: 8px;
}
.sess-btn {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(28,28,30,0.85);
  border: 0.5px solid var(--card-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  backdrop-filter: blur(8px);
}
.sess-btn.primary {
  width: 68px; height: 68px;
  background: rgba(255,255,255,0.95);
  color: #000;
  font-size: 24px;
}
.sess-next-thumb {
  z-index: 4;
  position: absolute;
  right: 20px; bottom: calc(28px + var(--safe-b) + 90px);
  width: 56px; height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.35);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  opacity: 0.9;
}
.sess-next-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Done overlay */
.done-view {
  position: absolute; inset: 0; z-index: 3;
  background: rgba(0,0,0,0.88);
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 28px;
  text-align: center;
}
.done-view.show { display: flex; animation: fadeIn .35s ease; }
.done-view h2 { font-size: 32px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.02em; }
.done-view p { color: var(--text-sec); font-size: 15px; margin-bottom: 28px; line-height: 1.5; }
.done-view .cta { max-width: 280px; }

.hidden { display: none !important; }

/* extra polish */
.practice-hero .hero-img { filter: saturate(0.95) contrast(1.05); }
.cta { letter-spacing: 0.01em; }
.day-cell.done .dot { background: #000; opacity: 0.55; }
.menu-item + .menu-item { border-top: 0.5px solid rgba(255,255,255,0.04); }
.sess-cue { font-weight: 400; letter-spacing: 0.01em; }

/* music */
.music-list { display: flex; flex-direction: column; gap: 8px; }
.music-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px; border-radius: 14px;
  background: #2c2c2e; text-align: left; width: 100%;
  border: 1px solid transparent;
}
.music-item.on { border-color: var(--blue-deep); background: rgba(10,132,255,0.16); }
.music-item .mi-ico { font-size: 22px; width: 36px; text-align: center; }
.music-item .mi-body { flex: 1; }
.music-item .mi-body .t { font-size: 15px; font-weight: 560; }
.music-item .mi-body .s { font-size: 12px; color: var(--text-sec); margin-top: 2px; }
.music-item .mi-check { color: var(--blue); font-size: 16px; opacity: 0; }
.music-item.on .mi-check { opacity: 1; }
.vol-slider {
  width: 100%; margin: 10px 0 0 50px; accent-color: var(--blue-deep);
  height: 4px;
}
.session-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  z-index: 1; background: #000;
}
.session-video.hidden { display: none; }
.session-bg.dim-for-video { opacity: 0; pointer-events: none; }

.acct-tag{margin:-6px 0 18px;font-size:14px;color:rgba(235,235,245,0.55);letter-spacing:.02em;}
