* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #071121, #0e1830);
  color: #f4f7ff;
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}
.phone-shell {
  width: 100%;
  max-width: 420px;
}
.screen-card {
  background: rgba(18, 31, 63, 0.96);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 12px 45px rgba(0,0,0,0.38);
}
.auth-card h1, .screen-card h2 {
  margin: 0 0 8px;
}
.subtle, .muted, .tiny {
  color: #a7b5d8;
}
.tiny { font-size: 13px; }
label {
  display: block;
  margin-top: 12px;
  margin-bottom: 6px;
  font-size: 14px;
}
input, select {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #2d3f72;
  background: #091326;
  color: white;
  margin-top: 4px;
}
.primary-btn, .secondary-btn {
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  border-radius: 12px;
  border: none;
  font-weight: bold;
  cursor: pointer;
}
.primary-btn {
  background: #2f6fff;
  color: white;
}
.secondary-btn {
  background: #87aefe;
  color: #061021;
}
.flash {
  background: #4f1b20;
  color: #ffd6da;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}
.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.version-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #243b6a;
  color: #dbe6ff;
  font-size: 11px;
  font-weight: bold;
}
.small-link {
  color: #8fb1ff;
  text-decoration: none;
}
.hero-card {
  margin-top: 16px;
  background: linear-gradient(135deg, #1d335f, #122547);
  border-radius: 18px;
  padding: 16px;
}
.hero-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.hero-label, .hero-badge {
  font-size: 12px;
  color: #cbd6f7;
}
.hero-badge {
  background: rgba(255,255,255,0.08);
  padding: 5px 9px;
  border-radius: 999px;
}
.hero-title {
  font-size: 20px;
  font-weight: bold;
}
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}
.choice-card {
  display: block;
  background: #172548;
  border-radius: 18px;
  padding: 18px 14px;
  text-decoration: none;
  color: white;
  min-height: 140px;
}
.choice-icon {
  font-size: 26px;
  margin-bottom: 14px;
}
.choice-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 6px;
}
.choice-text {
  color: #a7b5d8;
  font-size: 13px;
}
.group-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
  padding: 14px 0;
}
.group-chip {
  padding: 9px 14px;
  border-radius: 999px;
  background: #243b6a;
  white-space: nowrap;
  font-size: 12px;
  color: white;
  text-decoration: none;
}
.group-chip.active {
  background: #2f6fff;
}
.plan-form, .log-form {
  margin-top: 14px;
}
.exercise-list {
  margin-top: 18px;
}
.group-section {
  margin-bottom: 18px;
}
.group-title {
  font-size: 14px;
  color: #a7b5d8;
  margin-bottom: 10px;
}
.select-card {
  display: grid;
  grid-template-columns: 42px 92px 1fr;
  gap: 10px;
  align-items: center;
  background: #152542;
  padding: 12px;
  border-radius: 16px;
  margin-bottom: 12px;
  min-height: 116px;
  width: 100%;
}
.select-visual,
.exercise-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.exercise-image {
  width: 92px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
  background: #d9e4ff;
}
.toggle-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  background: #2e9f63;
  color: white;
}
.toggle-btn.is-active {
  background: #c73a4a;
}
.icon-visual {
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #d9e4ff;
  color: #081225;
  font-size: 36px;
}
.large-icon {
  width: 92px;
  height: 92px;
}
.select-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}
.select-card.is-selected {
  outline: 2px solid #53d07a;
  box-shadow: inset 0 0 0 1px rgba(83, 208, 122, 0.45);
}
.selected-pill {
  display: none;
  align-self: flex-start;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #1f7043;
  color: #dffde9;
  font-size: 11px;
  font-weight: bold;
}
.selected-pill.visible {
  display: inline-flex;
}
.select-body strong {
  display: block;
  line-height: 1.2;
}
.select-body small {
  color: #9fb0d9;
  margin-top: 4px;
}
.exercise-card {
  background: #152542;
  padding: 12px;
  border-radius: 16px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
}
.exercise-visual .exercise-image {
  width: 92px;
  height: 92px;
}
.session-card {
  margin-top: 14px;
}
.icon-badge {
  position: absolute;
  right: 4px;
  top: 4px;
  background: rgba(12, 20, 41, 0.82);
  border-radius: 999px;
  padding: 4px 6px;
  font-size: 12px;
}
.exercise-visual {
  position: relative;
}
.exercise-visual .icon-visual {
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #d9e4ff;
  color: #081225;
  font-size: 36px;
}
.exercise-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.badge {
  background: #2a4f88;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.last-run {
  margin-top: 8px;
  font-size: 13px;
  color: #9fb0d9;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.secondary-link {
  display: inline-block;
  margin-top: 12px;
  color: #8fb1ff;
  text-decoration: none;
  font-size: 14px;
}
.empty-item {
  color: #9fb0d9;
  font-size: 13px;
  margin-bottom: 12px;
}
@media (max-width: 480px) {
  body { padding: 10px; }
  .screen-card { border-radius: 18px; }
  .choice-grid { grid-template-columns: 1fr; }
}
