:root {
  --bg: #0d0d0f;
  --panel: #17171b;
  --panel2: #222229;
  --text: #f5f5f6;
  --muted: #a7a7af;
  --line: rgba(255,255,255,.09);
  --accent: #d71920;
  --accent2: #9f1015;
  --green: #37c578;
  --shadow: 0 22px 50px rgba(0,0,0,.42);
  --radius: 22px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at 50% -12%, rgba(215,25,32,.25), transparent 40%),
    linear-gradient(180deg,#17171a,#070708);
}

a { color: inherit; }

.app {
  width: min(560px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.auth-screen {
  display: grid;
  align-content: center;
  gap: 14px;
}

.hidden { display: none !important; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

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

h1 {
  font-size: 36px;
  line-height: .98;
  letter-spacing: -.04em;
  margin-bottom: 0;
}

h2 {
  font-size: 21px;
  line-height: 1.1;
}

.eyebrow {
  display: block;
  color: #e4b2b5;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 7px;
}

.lead {
  color: #dedee3;
  line-height: 1.45;
  font-size: 16px;
  margin-bottom: 0;
}

.muted {
  color: var(--muted);
  line-height: 1.45;
}

.hero, .card, .work-card {
  border: 1px solid var(--line);
  background: rgba(23,23,27,.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  padding: 28px 20px;
  background: linear-gradient(135deg, rgba(215,25,32,.22), rgba(255,255,255,.045));
  margin-bottom: 14px;
}

.hero.compact h1 {
  font-size: 30px;
  margin-bottom: 10px;
}

.card {
  padding: 18px;
  margin: 14px 0;
}

.pill, .week-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.045);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 12px;
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}

.day-grid {
  display: grid;
  gap: 14px;
}

.day-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.exercise-list {
  display: grid;
  gap: 9px;
}

.exercise-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  border-radius: 17px;
}

.exercise-row strong {
  display: block;
  line-height: 1.2;
}

.exercise-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.num {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #2a2a31;
  color: #f0f0f2;
  font-weight: 900;
  font-size: 13px;
}

.btn {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 17px;
  text-decoration: none;
  color: #fff;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  box-shadow: 0 14px 30px rgba(215,25,32,.24);
}

.btn.secondary {
  background: #2a2a31;
  color: #efeff1;
  border: 1px solid var(--line);
}

.btn.ghost {
  background: transparent;
  color: #efeff1;
  border: 1px solid var(--line);
}

.sticky-bottom {
  position: sticky;
  bottom: 14px;
  margin-top: 14px;
}

.alert {
  background: rgba(215,25,32,.15);
  border: 1px solid rgba(215,25,32,.35);
  color: #ffcfd1;
  padding: 12px;
  border-radius: 14px;
  margin-bottom: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
  margin-bottom: 12px;
}

input {
  width: 100%;
  min-height: 52px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0d0d10;
  color: #fff;
  font-size: 18px;
  outline: none;
}

input:focus { border-color: rgba(215,25,32,.65); }

.timer-box {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg,#18181d,#101013);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(0,0,0,.44);
  padding: 13px;
  margin-bottom: 14px;
}

.timer-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 8px;
}

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

.timer-line strong {
  font-size: 44px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.mini-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.055);
  color: #fff;
  border-radius: 13px;
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer;
}

.progress {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #2c2c34;
  margin-top: 10px;
  overflow: hidden;
}

.progress > div {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg,var(--accent),#ef6469);
  transition: width .2s linear;
}

.work-card {
  overflow: hidden;
}

.work-head {
  display: flex;
  justify-content: space-between;
  gap: 13px;
  padding: 17px;
  border-bottom: 1px solid var(--line);
}

.work-head small {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 7px;
}

.work-head h2 {
  margin: 0;
  font-size: 28px;
}

.badge {
  flex: 0 0 auto;
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  border-radius: 14px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 950;
}

.work-body {
  padding: 17px;
}

.suggestion-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  border-radius: 17px;
  padding: 14px;
  margin-bottom: 13px;
}

.suggestion-box span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .09em;
  font-size: 11px;
  font-weight: 900;
}

.suggestion-box strong {
  font-size: 22px;
}

.explain {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: #e9e9ee;
  border-radius: 17px;
  padding: 14px;
  line-height: 1.45;
  margin-bottom: 13px;
}

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

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

.done {
  text-align: center;
  padding: 28px 18px;
}

.progression-box,
.technique-box {
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 14px;
  line-height: 1.45;
  margin-bottom: 13px;
  font-size: 14px;
}

.progression-box {
  background: rgba(55,197,120,.12);
  color: #d7ffe7;
  border-color: rgba(55,197,120,.28);
}

.technique-box {
  background: rgba(228,184,63,.12);
  color: #fff1c3;
  border-color: rgba(228,184,63,.28);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
}

.modal-card {
  width: min(460px, 100%);
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg,#202026,#111114);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(0,0,0,.7);
  padding: 20px;
}

.modal-card h2 {
  margin-bottom: 10px;
  font-size: 28px;
}

.modal-card p {
  color: #eeeef2;
  line-height: 1.45;
  margin-bottom: 18px;
}
