:root {
  color-scheme: light;
  --ink: #122033;
  --muted: #66758a;
  --line: #d9e4ed;
  --paper: #f7fbfc;
  --white: #ffffff;
  --aqua: #12a8c8;
  --aqua-dark: #067993;
  --mint: #35c983;
  --lime: #a8d84f;
  --coral: #f05d5e;
  --amber: #f3aa3d;
  --navy: #17273d;
  --shadow: 0 24px 70px rgba(24, 51, 76, 0.24);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(18, 168, 200, 0.2), transparent 32%),
    radial-gradient(circle at 90% 80%, rgba(53, 201, 131, 0.2), transparent 30%),
    linear-gradient(135deg, #eef8f8 0%, #f9fbf8 48%, #edf5ff 100%);
}

button,
input,
select {
  font: inherit;
}

input::placeholder {
  color: #9aa9b7;
  opacity: 1;
}

select:invalid {
  color: #9aa9b7;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

.prototype-shell {
  width: min(1180px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 430px 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px 0;
}

.phone {
  position: relative;
  width: min(100%, 390px);
  height: 820px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  border: 12px solid #102033;
  border-radius: 46px;
  box-shadow: var(--shadow);
}

.phone::before {
  content: "";
  position: absolute;
  z-index: 20;
  top: 9px;
  left: 50%;
  width: 112px;
  height: 27px;
  transform: translateX(-50%);
  background: #102033;
  border-radius: 0 0 17px 17px;
}

.status-bar {
  position: relative;
  z-index: 10;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-icons span {
  display: block;
  width: 13px;
  height: 8px;
  border: 2px solid var(--ink);
  border-radius: 2px;
}

.status-icons span:first-child {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
}

.status-icons span:nth-child(2) {
  height: 11px;
}

.app-screen {
  position: absolute;
  inset: 44px 0 80px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.app-screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.screen-scroll {
  height: 100%;
  overflow-y: auto;
  padding: 14px 20px 26px;
  scrollbar-width: none;
}

.screen-scroll::-webkit-scrollbar {
  display: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 0 18px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.topbar-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  object-fit: contain;
  padding: 2px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(217, 228, 237, 0.95);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(20, 53, 70, 0.08);
}

.eyebrow,
.micro-label {
  margin: 0;
  color: var(--aqua-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 15px;
  letter-spacing: 0;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(20, 53, 70, 0.08);
}

.icon-button svg,
.tabbar svg,
.metric-icon svg,
.quest-badge svg,
.coin-pill svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.onboarding-overlay {
  position: absolute;
  z-index: 60;
  inset: 44px 0 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.22), transparent 32%),
    linear-gradient(135deg, #0d748d, #12a8c8 46%, #35c983);
  transition: opacity 200ms ease, transform 200ms ease;
}

.onboarding-overlay.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.onboarding-card {
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding: 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(12, 48, 62, 0.3);
}

.logo-image {
  display: block;
  object-fit: contain;
}

.brand-mini {
  width: 82px;
  height: 82px;
  margin-bottom: 18px;
  padding: 4px;
  background: #ffffff;
  border: 1px solid rgba(217, 228, 237, 0.95);
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(18, 48, 66, 0.1);
}

.onboarding-card h2 {
  margin: 7px 0 10px;
  font-size: 27px;
}

.setup-copy {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.onboarding-card label,
.league-form label {
  position: relative;
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.onboarding-card input,
.onboarding-card select,
.league-form input,
.league-form select {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 12px;
  color: var(--ink);
  background: #f2f7f9;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
}

.onboarding-card input[type="number"] {
  padding-right: 54px;
}

.onboarding-card label > span {
  position: absolute;
  right: 12px;
  bottom: 14px;
  color: var(--muted);
  font-size: 12px;
}

.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.weather-consent {
  display: flex !important;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 9px !important;
  padding: 12px;
  background: #eefbfc;
  border: 1px solid #cdeef3;
  border-radius: 16px;
}

.weather-consent input {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--aqua);
}

.weather-consent span {
  position: static !important;
  color: var(--ink) !important;
  font-size: 12px !important;
  line-height: 1.35;
}

.onboarding-card button,
.league-form button,
.weather-card button {
  width: 100%;
  min-height: 46px;
  color: #ffffff;
  font-weight: 900;
  background: var(--navy);
  border: 0;
  border-radius: 15px;
}

.onboarding-card small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #f8feff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 35%),
    linear-gradient(135deg, #0f88a4 0%, #12a8c8 46%, #35c983 100%);
  border-radius: 28px;
  box-shadow: 0 24px 50px rgba(18, 168, 200, 0.28);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -26px -44px auto;
  width: 190px;
  height: 190px;
  background: rgba(255, 255, 255, 0.13);
  border-radius: 50%;
}

.progress-orbit {
  position: relative;
  width: 165px;
  height: 165px;
  display: grid;
  place-items: center;
}

.progress-orbit::after {
  content: "";
  width: 104px;
  height: 104px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.progress-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg,
.ring-fill {
  fill: none;
  stroke-width: 13;
}

.ring-bg {
  stroke: rgba(255, 255, 255, 0.24);
}

.ring-fill {
  stroke: #ffffff;
  stroke-dasharray: 427;
  stroke-dashoffset: 165;
  transition: stroke-dashoffset 220ms ease;
}

.hero-logo {
  position: relative;
  z-index: 1;
  width: 116px;
  height: 116px;
  object-fit: contain;
  padding: 7px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 32px;
  box-shadow: inset 0 -12px 24px rgba(18, 168, 200, 0.12);
}

.drop-mark {
  width: 92px;
  height: 116px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.95);
  color: var(--aqua-dark);
  border-radius: 58% 58% 62% 62% / 66% 66% 42% 42%;
  transform: rotate(45deg);
  box-shadow: inset 0 -12px 24px rgba(18, 168, 200, 0.12);
}

.drop-mark span {
  transform: rotate(-45deg);
  font-size: 23px;
  font-weight: 900;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 14px;
  text-align: center;
}

.hero-copy .micro-label {
  color: rgba(255, 255, 255, 0.82);
}

.hero-copy h2 {
  margin: 6px 0 7px;
  font-size: 30px;
}

.hero-copy p {
  margin: 0 auto;
  max-width: 285px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  line-height: 1.45;
}

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

.quick-actions button,
.prompt-card button,
.modal-actions button {
  min-height: 44px;
  color: #ffffff;
  font-weight: 800;
  background: var(--navy);
  border: 0;
  border-radius: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.weather-card {
  display: grid;
  grid-template-columns: 1fr 88px;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #ffffff, #ecfbf8);
  border: 1px solid rgba(217, 228, 237, 0.9);
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(27, 52, 70, 0.08);
}

.workout-card {
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 228, 237, 0.9);
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(27, 52, 70, 0.08);
}

.workout-card .section-heading {
  margin-bottom: 11px;
}

.workout-card .section-heading span {
  color: #147c52;
  background: #def7ea;
  padding: 7px 9px;
  border-radius: 999px;
}

.workout-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 9px;
}

.workout-form input,
.workout-form select {
  min-width: 0;
  width: 100%;
  height: 44px;
  padding: 0 11px;
  color: var(--ink);
  background: #f2f7f9;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  font-size: 13px;
  font-weight: 700;
}

.workout-form #workout-type,
.workout-form button {
  grid-column: 1 / -1;
}

.workout-form button {
  min-height: 44px;
  color: #ffffff;
  font-weight: 900;
  background: var(--navy);
  border: 0;
  border-radius: 13px;
}

.workout-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.workout-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 12px;
  background: #f4fafb;
  border: 1px solid #dcebf0;
  border-radius: 14px;
}

.workout-list article > div {
  min-width: 0;
}

.workout-list strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.workout-list p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.workout-list span {
  white-space: nowrap;
  color: var(--aqua-dark);
  font-size: 12px;
  font-weight: 900;
}

.weather-card h3 {
  margin: 5px 0 5px;
}

.weather-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.weather-card button {
  min-height: 40px;
  font-size: 12px;
}

.metric-card,
.store-hero,
.level-card,
.panel,
.prompt-card,
.coach-card,
.team-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 228, 237, 0.9);
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(27, 52, 70, 0.08);
}

.metric-card {
  min-height: 130px;
  padding: 16px;
}

.metric-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 17px;
  border-radius: 13px;
}

.metric-icon.blue {
  color: var(--aqua-dark);
  background: #dff7fb;
}

.metric-icon.green {
  color: #147c52;
  background: #e2f8ed;
}

.metric-card p {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  font-size: 22px;
}

.panel {
  padding: 17px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

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

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 52px 1fr 56px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.timeline-row > div {
  height: 10px;
  overflow: hidden;
  background: #e8eff4;
  border-radius: 999px;
}

.timeline-row > div span {
  display: block;
  height: 100%;
  background: #c9d5dd;
  border-radius: inherit;
}

.timeline-row.complete > div span {
  background: var(--mint);
}

.timeline-row.current {
  color: var(--ink);
}

.timeline-row.current > div span {
  background: var(--aqua);
}

.tabbar {
  position: absolute;
  z-index: 12;
  inset: auto 0 0;
  height: 80px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 9px 10px 13px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.tabbar button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-width: 0;
  color: #7b8998;
  background: transparent;
  border: 0;
  border-radius: 16px;
  font-size: 10px;
  font-weight: 800;
}

.tabbar button.active {
  color: var(--aqua-dark);
  background: #e8f8fb;
}

.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 12px;
  color: #855411;
  background: #fff2d9;
  border: 1px solid #f7d9a5;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.level-card {
  padding: 18px;
  margin-bottom: 16px;
}

.level-card h2 {
  margin: 4px 0 16px;
}

.level-track,
.team-progress {
  height: 13px;
  overflow: hidden;
  background: #e8eff4;
  border-radius: 999px;
}

.level-track span,
.team-progress span {
  display: block;
  width: 63%;
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--amber), var(--mint));
  border-radius: inherit;
}

.quest-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.quest-dashboard article {
  min-height: 92px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 14px 8px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 28px rgba(27, 52, 70, 0.08);
}

.quest-dashboard span {
  color: var(--aqua-dark);
  font-size: 25px;
  font-weight: 900;
}

.quest-dashboard p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.daily-quests,
.badge-shelf,
.reward-shop {
  margin-bottom: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 228, 237, 0.95);
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(27, 52, 70, 0.08);
}

.store-hero {
  margin-bottom: 14px;
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #855411, #f3aa3d 58%, #35c983);
  border: 0;
}

.store-hero .micro-label {
  color: rgba(255, 255, 255, 0.82);
}

.store-hero h2 {
  margin: 7px 0;
  font-size: 54px;
  line-height: 0.95;
}

.store-hero p:last-child {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  line-height: 1.45;
}

.store-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 14px;
}

.store-filter button {
  min-height: 36px;
  color: var(--muted);
  background: #eef5f7;
  border: 1px solid var(--line);
  border-radius: 13px;
  font-size: 11px;
  font-weight: 900;
}

.store-filter button.active {
  color: var(--aqua-dark);
  background: #e8f8fb;
  border-color: #bdeaf0;
}

.store-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.store-grid article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 228, 237, 0.95);
  border-radius: 20px;
  box-shadow: 0 14px 28px rgba(27, 52, 70, 0.08);
}

.store-grid article > div {
  min-width: 0;
}

.store-grid h3 {
  margin: 4px 0 5px;
  overflow-wrap: anywhere;
}

.store-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.store-grid button {
  min-height: 38px;
  color: #ffffff;
  background: var(--navy);
  border: 0;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 900;
}

.store-note p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.quest-item {
  display: grid;
  grid-template-columns: 1fr 78px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f4fafb;
  border: 1px solid #dcebf0;
  border-radius: 17px;
}

.quest-item h4 {
  margin: 0 0 5px;
  font-size: 14px;
}

.quest-item p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.quest-meter {
  height: 8px;
  overflow: hidden;
  background: #e4edf1;
  border-radius: 999px;
}

.quest-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--aqua), var(--mint));
  border-radius: inherit;
}

.quest-item button,
.reward-shop button,
.league-delete {
  min-height: 38px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: var(--navy);
  border: 0;
  border-radius: 13px;
}

.quest-item button:disabled {
  cursor: default;
  color: #6f7f8f;
  background: #e1ebef;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.badge-grid article {
  min-height: 104px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 10px 6px;
  text-align: center;
  background: #f4fafb;
  border: 1px solid #dcebf0;
  border-radius: 16px;
}

.badge-grid b {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--aqua), var(--mint));
  border-radius: 13px;
  font-size: 11px;
}

.badge-grid strong {
  font-size: 11px;
  line-height: 1.2;
}

.badge-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.reward-shop {
  display: grid;
  grid-template-columns: 1fr 82px;
  align-items: center;
  gap: 12px;
}

.reward-shop h3 {
  margin: 4px 0 5px;
}

.reward-shop p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.coach-card,
.team-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  margin-bottom: 16px;
}

.coach-card {
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(135deg, #17273d, #236a7d 58%, #35c983);
}

.coach-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: var(--navy);
  background: #ffffff;
  border-radius: 17px;
  font-weight: 900;
}

.coach-card h2 {
  margin-bottom: 10px;
}

.coach-card p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  line-height: 1.5;
}

.insight-list {
  display: grid;
  gap: 14px;
}

.insight-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

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

.dot {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.dot.blue {
  background: var(--aqua);
}

.dot.orange {
  background: var(--amber);
}

.dot.green {
  background: var(--mint);
}

.prompt-card {
  margin-top: 16px;
  padding: 16px;
}

.prompt-card label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 900;
}

.prompt-card div {
  display: grid;
  grid-template-columns: 1fr 66px;
  gap: 8px;
}

.prompt-card input {
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: #f1f6f8;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
}

.league-actions {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.league-form {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 228, 237, 0.95);
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(27, 52, 70, 0.08);
}

.league-form h3 {
  margin-bottom: 0;
}

.league-form input,
.league-form select {
  height: 42px;
}

.league-form button {
  min-height: 42px;
}

.my-leagues {
  margin-bottom: 14px;
}

#league-list {
  display: grid;
  gap: 10px;
}

#league-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f3f9fa;
  border: 1px solid #e0edf1;
  border-radius: 16px;
}

#league-list article:not(.league-empty) {
  cursor: pointer;
}

#league-list article.selected {
  background: #e8f8fb;
  border-color: #bdeaf0;
}

#league-list article > div {
  min-width: 0;
}

#league-list strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
}

#league-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.league-status {
  padding: 7px 9px;
  color: #147c52;
  background: #def7ea;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.league-delete {
  min-height: 34px;
  padding: 0 9px;
  color: #a83334;
  background: #ffe7e5;
}

.league-empty {
  grid-template-columns: 1fr !important;
}

.league-detail {
  display: grid;
  gap: 12px;
}

.league-empty-detail {
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 228, 237, 0.95);
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(27, 52, 70, 0.08);
}

.league-empty-detail h3 {
  margin: 5px 0 8px;
}

.league-empty-detail p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.team-card {
  background: linear-gradient(135deg, #ffffff, #eaf8fb);
}

.team-card h2 {
  margin: 4px 0 16px;
}

.team-card p:last-child {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.leaderboard {
  display: grid;
  gap: 10px;
}

.leaderboard article {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.leaderboard article.me {
  border-color: rgba(18, 168, 200, 0.5);
  background: #eefbfc;
}

.rank {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--aqua-dark);
  background: #ddf6f9;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
}

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

.leaderboard b {
  color: var(--aqua-dark);
  font-size: 14px;
}

.school-bars {
  height: 180px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 12px;
  padding-top: 10px;
}

.school-bars div {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 8px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.school-bars b {
  width: 100%;
  min-height: 18px;
  display: block;
  background: linear-gradient(180deg, var(--lime), var(--mint));
  border-radius: 14px 14px 6px 6px;
}

.design-notes {
  max-width: 590px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 26px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(217, 228, 237, 0.9);
  border-radius: 20px;
  box-shadow: 0 14px 36px rgba(18, 48, 66, 0.08);
}

.brand-logo {
  width: 58px;
  height: 58px;
  padding: 3px;
  background: #ffffff;
  border: 1px solid rgba(217, 228, 237, 0.95);
  border-radius: 17px;
}

.brand-lockup p {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.brand-lockup strong {
  font-size: 18px;
}

.design-notes h2 {
  margin-bottom: 14px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 0.96;
  letter-spacing: 0;
}

.design-notes > p {
  max-width: 560px;
  color: #4d6075;
  font-size: 18px;
  line-height: 1.6;
}

.share-card {
  display: grid;
  grid-template-columns: 104px 1fr;
  align-items: center;
  gap: 16px;
  max-width: 430px;
  margin-top: 24px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(217, 228, 237, 0.95);
  border-radius: 22px;
  box-shadow: 0 14px 36px rgba(18, 48, 66, 0.08);
}

.share-card img {
  width: 104px;
  height: 104px;
  display: block;
  object-fit: contain;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.share-card strong {
  display: block;
  margin: 4px 0 6px;
  font-size: 16px;
}

.share-card span {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.note-grid article {
  min-height: 168px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(217, 228, 237, 0.95);
  border-radius: 22px;
}

.note-grid span {
  display: block;
  margin-bottom: 28px;
  color: var(--aqua-dark);
  font-size: 12px;
  font-weight: 900;
}

.note-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.note-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.toast {
  position: absolute;
  z-index: 40;
  left: 18px;
  right: 18px;
  bottom: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  color: #ffffff;
  background: rgba(23, 39, 61, 0.95);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(23, 39, 61, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast strong {
  font-size: 13px;
}

.toast span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
}

.modal-backdrop {
  position: absolute;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(16, 32, 51, 0.36);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  padding: 18px;
  background: var(--white);
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(13, 31, 48, 0.24);
  transform: translateY(18px);
  transition: transform 160ms ease;
}

.modal-backdrop.show .modal-card {
  transform: translateY(0);
}

.modal-card h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.modal-card p {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal-actions button.secondary {
  color: var(--ink);
  background: #eff5f7;
}

@media (max-width: 900px) {
  .prototype-shell {
    width: min(100vw - 24px, 430px);
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 20px 0 30px;
  }

  .phone {
    height: min(820px, calc(100vh - 28px));
  }

  .design-notes {
    order: -1;
  }

  .design-notes h2 {
    font-size: 36px;
  }

  .design-notes > p {
    font-size: 15px;
  }

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

@media (max-width: 420px) {
  .prototype-shell {
    width: 100%;
    padding: 0;
  }

  .phone {
    width: 100%;
    height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .phone::before {
    display: none;
  }

  .design-notes {
    display: none;
  }
}

/* AI Coach contrast fix and focused interaction refresh */
.coach-card {
  padding: 18px;
  color: var(--ink);
  background: #ffffff;
}

.coach-card-heading {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.coach-card-heading > div:last-child {
  min-width: 0;
}

.coach-avatar {
  position: relative;
  width: 46px;
  height: 46px;
  margin: 0;
  color: #ffffff;
  background: var(--aqua);
  border-radius: 8px;
  font-size: 13px;
}

.coach-avatar::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  background: var(--mint);
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.coach-card .micro-label {
  margin: 1px 0 5px;
}

.coach-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 21px;
  line-height: 1.15;
}

.coach-card > p {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.coach-plan {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.coach-plan article {
  min-width: 0;
  padding: 0 9px;
  border-right: 1px solid var(--line);
}

.coach-plan article:first-child {
  padding-left: 0;
}

.coach-plan article:last-child {
  padding-right: 0;
  border-right: 0;
}

.coach-plan span,
.coach-context span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
}

.coach-plan strong {
  display: block;
  color: var(--navy);
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.coach-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
  background: #edf5ff;
  border: 1px solid #d8e8f8;
  border-radius: 8px;
}

.coach-context article {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid #d8e8f8;
}

.coach-context article:last-child {
  border-right: 0;
}

.coach-context strong {
  display: block;
  color: var(--aqua-dark);
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.coach-conversation {
  margin-top: 14px;
  padding: 15px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.coach-conversation.active {
  border-color: #b9d8f7;
  box-shadow: inset 3px 0 0 var(--aqua);
}

.coach-answer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.coach-answer-heading > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.coach-answer-heading strong {
  color: var(--navy);
  font-size: 12px;
}

.coach-answer-heading > span {
  color: var(--aqua-dark);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.coach-live-dot {
  width: 8px;
  height: 8px;
  background: var(--mint);
  border-radius: 50%;
}

.coach-answer-prompt {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

#coach-answer-text {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
}

#save-coach-tip {
  margin-top: 12px;
  padding: 8px 11px;
  color: var(--aqua-dark);
  background: #edf5ff;
  border: 1px solid #cfe3f8;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
}

.coach-suggestions {
  display: flex;
  gap: 7px;
  margin: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.coach-suggestions::-webkit-scrollbar {
  display: none;
}

.coach-suggestions button {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 0 11px;
  color: var(--navy);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 10px;
  font-weight: 700;
}

.coach-suggestions button:hover {
  color: var(--aqua-dark);
  border-color: #b9d8f7;
}

#coach-screen .prompt-card {
  margin-top: 0;
}

@media (max-width: 360px) {
  .coach-plan article,
  .coach-context article {
    padding-left: 7px;
    padding-right: 7px;
  }
}

/* Sleek athletic UI refresh */
:root {
  --ink: #0b1d36;
  --muted: #607087;
  --line: #dce6ef;
  --paper: #f5f8fb;
  --white: #ffffff;
  --aqua: #1683ff;
  --aqua-dark: #0d5fc2;
  --mint: #35cf8d;
  --lime: #a3e635;
  --coral: #ff655b;
  --amber: #f4b740;
  --navy: #071d41;
  --surface-soft: #eef5fb;
  --shadow: 0 28px 80px rgba(7, 29, 65, 0.18);
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eaf0f6;
}

h1,
h2,
h3,
strong,
button {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.prototype-shell {
  width: min(1160px, calc(100vw - 32px));
  grid-template-columns: 410px minmax(0, 1fr);
  gap: 56px;
  padding: 32px 0;
}

.phone {
  height: 820px;
  background: var(--paper);
  border: 8px solid var(--navy);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.phone::before {
  top: 7px;
  width: 86px;
  height: 22px;
  background: var(--navy);
  border-radius: 0 0 12px 12px;
}

.status-bar {
  height: 40px;
  padding: 0 22px;
  font-size: 12px;
}

.app-screen {
  inset: 40px 0 72px;
  transform: translateX(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.screen-scroll {
  padding: 12px 18px 24px;
}

.topbar {
  margin: 0 0 16px;
}

.topbar-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  box-shadow: none;
}

h1 {
  font-size: 28px;
  line-height: 1.05;
}

h2 {
  font-size: 23px;
}

.eyebrow,
.micro-label {
  color: var(--aqua-dark);
  font-size: 10px;
  font-weight: 800;
}

.icon-button {
  width: 40px;
  height: 40px;
  color: var(--navy);
  border-radius: 8px;
  box-shadow: none;
}

.onboarding-overlay {
  inset: 40px 0 0;
  padding: 18px;
  background: #0b6fb8;
}

.onboarding-card {
  padding: 20px;
  background: #ffffff;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(7, 29, 65, 0.24);
}

.brand-mini {
  width: 68px;
  height: 68px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: none;
}

.onboarding-card h2 {
  margin: 6px 0 8px;
  font-size: 25px;
  line-height: 1.12;
}

.setup-copy {
  margin-bottom: 16px;
}

.onboarding-card input,
.onboarding-card select,
.league-form input,
.league-form select,
.workout-form input,
.workout-form select,
.prompt-card input {
  color: var(--ink);
  background: #f6f8fb;
  border-color: #d8e2ec;
  border-radius: 7px;
}

.onboarding-card input:focus,
.onboarding-card select:focus,
.league-form input:focus,
.league-form select:focus,
.workout-form input:focus,
.workout-form select:focus,
.prompt-card input:focus {
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px rgba(22, 131, 255, 0.12);
  outline: 0;
}

input::placeholder {
  color: #93a1b2;
}

.weather-consent {
  background: #edf7ff;
  border-color: #cfe6fb;
  border-radius: 7px;
}

.onboarding-card button,
.league-form button,
.weather-card button,
.workout-form button,
.quick-actions button,
.prompt-card button,
.modal-actions button {
  min-height: 44px;
  background: var(--navy);
  border-radius: 7px;
  box-shadow: none;
  transition: transform 140ms ease, background 140ms ease;
}

.onboarding-card button:hover,
.league-form button:hover,
.weather-card button:hover,
.workout-form button:hover,
.quick-actions button:hover,
.prompt-card button:hover,
.modal-actions button:hover {
  background: #0c2b5f;
}

.hero-card {
  min-height: 248px;
  padding: 20px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.hero-card::after {
  display: none;
}

.progress-orbit {
  width: 150px;
  height: 150px;
}

.progress-orbit::after {
  width: 96px;
  height: 96px;
  background: #f4f8fc;
  border-color: #e6edf4;
}

.ring-bg {
  stroke: #e4ebf2;
}

.ring-fill {
  stroke: var(--aqua);
}

.hero-copy {
  margin-top: 10px;
}

.hero-copy .micro-label {
  color: var(--aqua-dark);
}

.hero-copy h2 {
  margin: 5px 0 5px;
  color: var(--navy);
  font-size: 28px;
}

.hero-copy p {
  max-width: 300px;
  color: var(--muted);
}

.quick-actions {
  gap: 8px;
  margin: 12px 0;
}

.quick-actions button:first-child,
.quick-actions button:nth-child(2) {
  color: var(--navy);
  background: #ffffff;
  border: 1px solid var(--line);
}

.quick-actions button:last-child {
  background: var(--aqua);
}

.metric-card,
.store-hero,
.level-card,
.panel,
.prompt-card,
.coach-card,
.team-card,
.workout-card,
.weather-card,
.daily-quests,
.badge-shelf,
.reward-shop,
.league-form,
.league-detail,
.store-grid article {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.workout-card,
.weather-card,
.panel,
.daily-quests,
.badge-shelf,
.reward-shop {
  padding: 15px;
}

.workout-card .section-heading span {
  color: #08724a;
  background: #e8f8f0;
  border-radius: 6px;
}

.workout-list article {
  background: #f7f9fc;
  border-color: #e2e9f0;
  border-radius: 7px;
}

.weather-card {
  grid-template-columns: minmax(0, 1fr) 82px;
}

.metric-card {
  min-height: 112px;
  padding: 14px;
}

.metric-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 7px;
}

.metric-icon.blue {
  color: var(--aqua-dark);
  background: #e8f3ff;
}

.metric-icon.green {
  color: #08724a;
  background: #e8f8f0;
}

.timeline-row > div,
.level-track,
.team-progress,
.quest-meter {
  background: #e8eef4;
}

.level-track span,
.team-progress span {
  background: var(--aqua);
}

.tabbar {
  height: 72px;
  padding: 7px 8px 10px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

.tabbar button {
  gap: 3px;
  border-radius: 7px;
  font-size: 9px;
}

.tabbar button.active {
  color: var(--aqua-dark);
  background: #e9f3ff;
}

.coin-pill {
  height: 36px;
  color: #76510c;
  background: #fff8e8;
  border-color: #f0ddb0;
  border-radius: 7px;
}

.level-card,
.store-hero {
  padding: 18px;
}

.quest-dashboard {
  gap: 8px;
}

.quest-dashboard article {
  min-height: 84px;
  border-radius: 8px;
  box-shadow: none;
}

.quest-dashboard span {
  color: var(--navy);
  font-size: 22px;
}

.quest-item,
.badge-grid article,
.store-grid article,
.league-list article,
#league-list article,
.leaderboard article {
  border-radius: 7px;
  box-shadow: none;
}

.coach-avatar {
  color: #ffffff;
  background: var(--aqua);
  border-radius: 8px;
}

.dot.orange {
  background: var(--coral);
}

.store-hero {
  color: #ffffff;
  background: var(--navy);
  border-color: var(--navy);
}

.store-filter button {
  border-radius: 7px;
}

.store-filter button.active {
  color: #ffffff;
  background: var(--aqua);
}

.store-grid article button,
.reward-shop button,
.quest-item button,
.league-delete {
  border-radius: 7px;
}

.modal-backdrop {
  background: rgba(7, 29, 65, 0.5);
  backdrop-filter: blur(5px);
}

.modal-card {
  border-radius: 9px;
  box-shadow: 0 24px 60px rgba(7, 29, 65, 0.22);
}

.toast {
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(7, 29, 65, 0.2);
}

.design-notes {
  max-width: 620px;
}

.brand-lockup,
.share-card,
.note-grid article {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.design-notes h2 {
  max-width: 540px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--navy);
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 0.98;
}

.design-notes > p {
  color: #52657d;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(22, 131, 255, 0.28);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .prototype-shell {
    width: min(100%, 430px);
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .phone {
    height: min(820px, calc(100dvh - 40px));
  }
}

@media (max-width: 420px) {
  body {
    background: var(--paper);
  }

  .prototype-shell {
    width: 100%;
    padding: 0;
  }

  .phone {
    width: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .phone::before {
    display: none;
  }
}
