:root {
  --blue: #2563eb;
  --blue-dark: #1e40af;
  --cyan: #0891b2;
  --green: #16a34a;
  --amber: #d97706;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #dbe7f5;
  --line-strong: #bfd1e7;
  --surface: #f7fbff;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --blue-soft: #e8f1ff;
  --cyan-soft: #e6faff;
  --green-soft: #ecfdf5;
  --amber-soft: #fffbeb;
  --shadow: 0 18px 42px rgba(15, 35, 60, 0.09);
  --shadow-strong: 0 22px 56px rgba(15, 35, 60, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f7fbff;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 18% 0%, rgba(8, 145, 178, 0.16), transparent 32%),
    linear-gradient(135deg, #f9fcff 0%, #edf6ff 46%, #f8fbff 100%);
  background-size: 28px 28px, 28px 28px, auto, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.04), transparent 22%, transparent 78%, rgba(15, 23, 42, 0.035));
}

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

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 10px;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.18;
  letter-spacing: 0;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 18px 18px 124px;
}

.view-section[hidden] {
  display: none !important;
}

.progress-detail[hidden] {
  display: none !important;
}

.trial-detail[hidden] {
  display: none !important;
}

.command-center,
.today-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.7fr);
  gap: 14px;
  align-items: stretch;
}

.hero-panel,
.today-panel,
.daily-win-panel,
.coach-panel,
.xp-card,
.rank-panel,
.panel,
.materials-panel,
.metric-card,
.actions,
.bottom-nav {
  border: 1px solid rgba(191, 209, 231, 0.88);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 198px;
  padding: 24px;
  color: white;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.88) 54%, rgba(8, 145, 178, 0.86)),
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
  box-shadow: 0 24px 64px rgba(30, 64, 175, 0.22);
}

.hero-panel::before {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 20px;
  width: 180px;
  height: 76px;
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.44) 0 12px, transparent 12px 20px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  opacity: 0.56;
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: 74px;
  top: 34px;
  width: 132px;
  height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: repeating-conic-gradient(from 20deg, rgba(255, 255, 255, 0.2) 0 7deg, transparent 7deg 16deg);
  opacity: 0.2;
}

.hero-copy,
.level-badge {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 0 0 12px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.muted {
  max-width: 440px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}

.level-badge {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 10px;
  align-items: baseline;
  margin-top: 20px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.level-badge span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.level-badge strong {
  font-size: 36px;
  line-height: 1;
}

.today-panel {
  grid-column: 1;
  margin-top: 14px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.94)),
    linear-gradient(90deg, rgba(37, 99, 235, 0.08), rgba(8, 145, 178, 0.08));
}

.daily-win-panel {
  grid-column: 1;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.94)),
    linear-gradient(90deg, rgba(37, 99, 235, 0.08), rgba(22, 163, 74, 0.08));
}

.daily-win-panel .section-title strong {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 999px;
  color: var(--green);
  font-size: 12px;
  background: var(--green-soft);
}

.daily-win-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.daily-step {
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 251, 255, 0.9);
}

.daily-step.is-done {
  border-color: rgba(22, 163, 74, 0.28);
  background: var(--green-soft);
}

.daily-step span,
.daily-step small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.daily-step strong {
  display: block;
  margin: 12px 0 7px;
  color: var(--blue-dark);
  font-size: 34px;
  line-height: 1;
}

.daily-win-track {
  overflow: hidden;
  height: 12px;
  margin-top: 14px;
  border-radius: 999px;
  background: #dbeafe;
}

.daily-win-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  transition: width 0.4s ease;
}

.status-rail {
  grid-column: 2;
  grid-row: 1 / span 4;
  display: grid;
  gap: 14px;
}

.coach-panel {
  grid-column: 1;
  padding: 18px;
  background: var(--panel);
}

.xp-card {
  min-height: 142px;
  padding: 18px;
  background: linear-gradient(180deg, var(--panel-strong), rgba(232, 241, 255, 0.86));
}

.row-between,
.section-title,
.leader-row,
.weak-row,
.trial-row,
.lesson-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.row-between span,
.section-title span,
.leader-row small,
.weak-row small,
.trial-row small,
.focus-summary span,
.focus-summary small,
.trial-summary span,
.trial-summary small,
.focus-day small,
.rank-panel span,
.rank-panel small,
.metric-card span,
.metric-card small,
.materials-head span,
.lesson-card small,
.material-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.row-between strong {
  color: var(--blue-dark);
  font-size: 30px;
  line-height: 1;
}

.progress-track,
.rank-track {
  overflow: hidden;
  border-radius: 999px;
  background: #dbeafe;
}

.progress-track {
  height: 12px;
  margin-top: 18px;
}

.progress-fill,
.rank-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width 0.4s ease;
}

.rank-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.rank-panel > div {
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(219, 231, 245, 0.92);
  border-radius: 8px;
  background: var(--surface);
}

.rank-panel strong {
  display: block;
  margin: 9px 0 5px;
  color: var(--blue-dark);
  font-size: 34px;
  line-height: 1;
}

.rank-next {
  border-color: rgba(217, 119, 6, 0.28) !important;
  background: linear-gradient(180deg, #fff7ed, var(--amber-soft)) !important;
}

.rank-next strong {
  color: var(--amber);
  font-size: 28px;
}

.rank-track {
  height: 9px;
  margin: 12px 0 7px;
  background: #fed7aa;
}

.rank-fill {
  background: linear-gradient(90deg, var(--amber), var(--green));
}

.section-title {
  align-items: flex-start;
}

.section-title h2 {
  color: var(--ink);
}

.today-panel .section-title strong {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 999px;
  color: var(--green);
  font-size: 12px;
  background: var(--green-soft);
}

.mission-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.goal-list,
.coach-grid,
.activity-feed,
.review-grid,
.insight-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.coach-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.coach-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.goal-row,
.coach-card,
.activity-row,
.review-card,
.insight-card {
  min-width: 0;
  min-height: 54px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 251, 255, 0.88);
}

.goal-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.goal-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.goal-row.is-done {
  border-color: rgba(22, 163, 74, 0.28);
  background: var(--green-soft);
}

.goal-row strong,
.coach-card strong,
.activity-row strong,
.review-card strong,
.insight-card strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.goal-row small,
.coach-card small,
.activity-row small,
.review-card small,
.insight-card small,
.review-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.32;
}

.goal-row button,
.coach-card button,
.review-card button {
  min-height: 38px;
  padding: 7px 10px;
}

.coach-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.coach-card span {
  display: block;
  margin-bottom: 5px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.coach-card.is-review,
.insight-card.is-review {
  border-color: rgba(217, 119, 6, 0.28);
  background: var(--amber-soft);
}

.coach-card.is-focus,
.insight-card.is-good {
  border-color: rgba(22, 163, 74, 0.28);
  background: var(--green-soft);
}

.insight-card.is-warn {
  border-color: rgba(185, 28, 28, 0.2);
  background: #fff7f7;
}

.activity-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.activity-row > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: white;
  font-size: 10px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.activity-row time {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.review-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-card {
  display: grid;
  gap: 11px;
}

.review-card p {
  margin: 0;
}

.insight-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mission-list li {
  position: relative;
  min-height: 42px;
  padding: 10px 12px 10px 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  background: rgba(247, 251, 255, 0.9);
}

.mission-list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 15px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(8, 145, 178, 0.12);
}

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

.daily-win-panel .mission-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: white;
  font: inherit;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 13px 28px rgba(37, 99, 235, 0.2);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease, border-color 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.24);
  filter: saturate(1.04);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
}

button.ghost,
.mission-button.secondary {
  color: var(--blue-dark);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
}

button.danger {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.24);
  background: #fff5f5;
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.25);
  opacity: 0.52;
  transform: none;
  box-shadow: none;
}

.mission-button {
  min-height: 46px;
  padding: 9px 10px;
  font-size: 14px;
}

.mission-button[data-action="focus"] {
  background: linear-gradient(135deg, var(--ink), var(--blue-dark));
  box-shadow: 0 13px 28px rgba(15, 23, 42, 0.18);
}

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

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 124px;
  padding: 16px;
  background: var(--panel-strong);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--blue), var(--cyan));
}

.metric-streak::before {
  background: linear-gradient(180deg, var(--green), var(--cyan));
}

.metric-daily::before {
  background: linear-gradient(180deg, var(--amber), var(--green));
}

.metric-focus::before {
  background: linear-gradient(180deg, var(--cyan), var(--blue-dark));
}

.metric-card strong {
  display: block;
  margin: 10px 0 5px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.panel {
  margin-top: 14px;
  padding: 18px;
  background: var(--panel);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

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

.focus-control {
  display: grid;
  grid-template-columns: minmax(240px, 0.86fr) minmax(0, 1.4fr);
  gap: 12px;
  margin-top: 14px;
}

.focus-state-card {
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 241, 255, 0.74)),
    var(--surface);
}

.focus-state-card span,
.focus-state-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.focus-state-card strong {
  display: block;
  margin: 10px 0 6px;
  color: var(--blue-dark);
  font-size: 28px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.focus-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.focus-buttons button {
  min-height: 54px;
  padding: 8px;
  font-size: 14px;
  line-height: 1.12;
  white-space: nowrap;
}

.focus-summary article,
.trial-summary article {
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.focus-summary strong,
.trial-summary strong {
  display: block;
  margin-top: 9px;
  color: var(--blue-dark);
  font-size: 23px;
  line-height: 1.08;
}

.trial-trend-card.is-good {
  border-color: rgba(22, 163, 74, 0.28);
  background: var(--green-soft);
}

.trial-trend-card.is-good strong {
  color: var(--green);
}

.trial-trend-card.is-warn {
  border-color: rgba(217, 119, 6, 0.32);
  background: var(--amber-soft);
}

.trial-trend-card.is-warn strong {
  color: var(--amber);
}

.focus-week-scale,
.trial-chart {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(37, 99, 235, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px),
    var(--surface);
  background-size: 22px 22px, 22px 22px, auto;
}

.focus-week-scale {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.focus-day {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.focus-bar {
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 78px;
  overflow: hidden;
  border-radius: 8px;
  background: #dbeafe;
}

.focus-bar span {
  display: block;
  width: 100%;
  min-height: 4px;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.trial-chart {
  display: grid;
  grid-template-columns: repeat(8, minmax(32px, 1fr));
  gap: 8px;
  min-height: 160px;
}

.trial-chart .empty {
  grid-column: 1 / -1;
  align-self: center;
}

.trial-bar {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.trial-bar-fill {
  align-self: end;
  display: block;
  min-height: 8px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--green), var(--cyan));
  box-shadow: 0 10px 20px rgba(8, 145, 178, 0.16);
}

.trial-bar strong,
.trial-bar small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trial-bar strong {
  font-size: 13px;
}

.trial-bar small {
  color: var(--muted);
  font-size: 11px;
}

.stack-list,
.leader-list,
.materials-list,
.growth-grid,
.bookmark-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.growth-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.weak-row,
.trial-row,
.leader-row,
.bookmark-row,
.growth-card,
.lesson-card {
  min-height: 52px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 251, 255, 0.88);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.weak-row:hover,
.trial-row:hover,
.leader-row:hover,
.bookmark-row:hover,
.growth-card:hover,
.progress-node:hover,
.lesson-card:hover,
.metric-card:hover,
.panel:hover,
.materials-panel:hover,
.rank-panel:hover,
.today-panel:hover,
.daily-win-panel:hover,
.xp-card:hover {
  border-color: var(--line-strong);
  background-color: white;
  box-shadow: var(--shadow-strong);
  transform: translateY(-1px);
}

.leader-row strong,
.weak-row strong,
.trial-row strong,
.bookmark-row strong,
.growth-card strong,
.lesson-card strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 14px;
}

.growth-card {
  display: grid;
  gap: 11px;
  align-content: start;
}

.growth-card.is-danger {
  border-color: rgba(185, 28, 28, 0.22);
  background: #fff7f7;
}

.growth-card.is-review {
  border-color: rgba(217, 119, 6, 0.24);
  background: #fffaf0;
}

.growth-card.is-easy {
  border-color: rgba(22, 163, 74, 0.22);
  background: #f2fff8;
}

.growth-card-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

.growth-card-head div {
  min-width: 0;
}

.growth-card-head span,
.growth-card p,
.growth-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.32;
}

.growth-card p {
  margin: 0;
}

.growth-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.growth-metrics span {
  min-height: 34px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.14;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
}

.growth-card button {
  min-height: 40px;
}

.progress-map {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.progress-node {
  display: grid;
  place-items: center;
  min-height: 74px;
  min-width: 0;
  padding: 8px 4px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--surface);
  box-shadow: none;
}

.progress-node span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: white;
  font-size: 12px;
  font-weight: 900;
  background: var(--muted);
}

.progress-node strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
}

.progress-node small {
  max-width: 100%;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-node.is-done span {
  background: var(--green);
}

.progress-node.is-current {
  border-color: rgba(37, 99, 235, 0.3);
  background: var(--blue-soft);
}

.progress-node.is-current span {
  background: var(--blue);
}

.progress-node.is-needs_review {
  border-color: rgba(217, 119, 6, 0.34);
  background: var(--amber-soft);
}

.progress-node.is-needs_review span {
  background: var(--amber);
}

.progress-node.is-locked {
  opacity: 0.72;
}

.progress-node.is-selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.progress-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.progress-detail .lesson-note-box {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  gap: 8px;
}

.lesson-note-box textarea {
  width: 100%;
  min-height: 86px;
  padding: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  resize: vertical;
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}

.lesson-note-box textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.progress-detail-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.progress-detail strong {
  display: block;
  margin: 4px 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.progress-detail span,
.progress-detail small {
  color: var(--muted);
  font-size: 12px;
}

.progress-detail-actions {
  display: grid;
  grid-template-columns: repeat(1, minmax(120px, 1fr));
  gap: 8px;
}

.progress-detail-actions button {
  min-height: 42px;
  padding: 8px;
}

.trial-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.trial-detail strong {
  display: block;
  margin: 4px 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.trial-detail span,
.trial-detail small,
.trial-detail p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.trial-detail p {
  grid-column: 1 / -1;
  margin: 0;
}

.trial-detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  gap: 7px;
}

.trial-detail-metrics span {
  display: grid;
  place-items: center;
  min-height: 34px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  font-weight: 800;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
}

.bookmark-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.materials-view {
  display: grid;
  gap: 14px;
}

.materials-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
  gap: 12px;
  align-items: end;
  padding: 18px;
  border: 1px solid rgba(191, 209, 231, 0.88);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.materials-head h2 {
  margin-top: 4px;
  font-size: 28px;
}

.materials-head input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}

.materials-head input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.materials-panel {
  padding: 18px;
  background: var(--panel);
}

.material-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.quick-link,
.material-link {
  display: flex;
  align-items: center;
  min-height: 42px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.22;
  text-decoration: none;
  overflow-wrap: anywhere;
  background: var(--surface);
}

.quick-link:hover,
.material-link:hover {
  border-color: var(--line-strong);
  background: white;
}

.lesson-card {
  padding: 0;
}

.lesson-card summary {
  min-height: 58px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.lesson-card summary::-webkit-details-marker {
  display: none;
}

.lesson-title-wrap {
  min-width: 0;
}

.lesson-card strong,
.lesson-card small {
  overflow-wrap: anywhere;
}

.lesson-materials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.lesson-card-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 12px 12px;
}

.lesson-card-actions button {
  min-height: 38px;
  padding: 7px 12px;
}

.material-group {
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(219, 231, 245, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.material-group h3 {
  margin: 0 0 9px;
  color: var(--ink-soft);
  font-size: 13px;
}

.material-links {
  display: grid;
  gap: 7px;
}

.leader-row.rank-1 {
  border-color: rgba(217, 119, 6, 0.28);
  background: linear-gradient(90deg, #fff7ed, rgba(247, 251, 255, 0.88));
}

.leader-row.rank-2 {
  border-color: rgba(37, 99, 235, 0.18);
  background: linear-gradient(90deg, var(--blue-soft), rgba(247, 251, 255, 0.88));
}

.leader-row.rank-3 {
  border-color: rgba(8, 145, 178, 0.2);
  background: linear-gradient(90deg, var(--cyan-soft), rgba(247, 251, 255, 0.88));
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  min-width: 58px;
  padding: 4px 9px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 999px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  background: var(--blue-soft);
}

.empty {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: center;
  min-height: 78px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(247, 251, 255, 0.78);
}

.empty-mark {
  grid-row: span 2;
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.18);
}

.empty strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.empty small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 54px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.status-text {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--muted);
  text-align: center;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  width: min(720px, calc(100% - 24px));
  padding: 6px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 44px rgba(15, 35, 60, 0.18);
  transform: translateX(-50%);
}

.nav-button {
  position: relative;
  display: grid;
  grid-template-rows: 18px auto;
  gap: 3px;
  place-items: center;
  min-height: 50px;
  padding: 7px 4px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  background: transparent;
  box-shadow: none;
}

.nav-button::before {
  content: attr(data-icon);
  display: grid;
  place-items: center;
  width: 24px;
  height: 18px;
  border-radius: 6px;
  color: currentColor;
  font-size: 9px;
  letter-spacing: 0;
  background: rgba(100, 116, 139, 0.09);
}

.nav-button:hover {
  box-shadow: none;
}

.nav-button.is-active {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.nav-button.is-active::before {
  background: rgba(255, 255, 255, 0.18);
}

.is-loading [data-skeleton] {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  color: transparent !important;
}

.is-loading [data-skeleton]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.68), transparent),
    rgba(214, 229, 248, 0.78);
  background-size: 180% 100%, auto;
  animation: skeleton-sweep 1.05s ease-in-out infinite;
}

.is-loading .hero-panel [data-skeleton]::after {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent),
    rgba(255, 255, 255, 0.22);
}

@keyframes skeleton-sweep {
  from {
    background-position: 160% 0, 0 0;
  }

  to {
    background-position: -60% 0, 0 0;
  }
}

@media (max-width: 820px) {
  .command-center,
  .today-layout {
    grid-template-columns: 1fr;
  }

  .status-rail {
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: 1fr 1fr;
  }

  .today-panel,
  .daily-win-panel,
  .coach-panel {
    grid-column: auto;
  }

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

@media (max-width: 720px) {
  .app-shell {
    padding: 12px 12px 96px;
  }

  .hero-panel {
    min-height: 190px;
    padding: 20px;
  }

  .hero-panel::before {
    right: 12px;
    bottom: 12px;
    width: 116px;
    height: 54px;
  }

  .hero-panel::after {
    right: 22px;
    top: 28px;
    width: 96px;
    height: 96px;
  }

  .metric-grid,
  .daily-win-grid,
  .focus-summary,
  .trial-summary,
  .focus-control,
  .lesson-materials,
  .mission-actions,
  .growth-grid,
  .coach-grid,
  .coach-grid.compact,
  .review-grid,
  .insight-grid {
    grid-template-columns: 1fr 1fr;
  }

  .progress-map {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .actions {
    margin-bottom: 48px;
  }
}

@media (max-width: 520px) {
  .status-rail,
  .metric-grid,
  .daily-win-grid,
  .focus-summary,
  .trial-summary,
  .focus-control,
  .materials-head,
  .material-link-grid,
  .lesson-materials,
  .mission-actions,
  .growth-grid,
  .coach-grid,
  .coach-grid.compact,
  .review-grid,
  .insight-grid,
  .progress-detail,
  .trial-detail,
  .progress-detail .lesson-note-box,
  .progress-detail-actions,
  .actions {
    grid-template-columns: 1fr;
  }

  .goal-row,
  .coach-card,
  .activity-row {
    grid-template-columns: 1fr;
  }

  .trial-detail-metrics {
    grid-template-columns: 1fr;
  }

  .today-panel,
  .daily-win-panel,
  .panel {
    padding: 15px;
  }

  .section-title {
    display: grid;
  }

  .trial-chart {
    grid-template-columns: repeat(4, minmax(34px, 1fr));
  }

  .progress-map {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .growth-metrics {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    bottom: 8px;
    width: calc(100% - 16px);
  }

  .nav-button {
    min-height: 48px;
    padding-inline: 2px;
    font-size: 10px;
  }

  .focus-buttons {
    gap: 7px;
  }

  .focus-buttons button {
    min-height: 50px;
    padding: 7px 2px;
    font-size: 10px;
  }
}
