/*
 * Micro Workouts visual system.
 * The file is grouped by shared tokens, layout, views, and interactive widgets.
 */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;1,600&display=swap");

:root {
  /* Color tokens keep the warm paper/card palette consistent across views. */
  --ink: #20302d;
  --muted: #77817b;
  --paper: #f4f1ea;
  --card: #fffdf8;
  --sage: #b9cbb9;
  --deep-sage: #6f9178;
  --terracotta: #c77052;
  --line: #dedbd2;
  --shadow: 0 22px 46px rgba(68, 77, 64, 0.1);
}
/* Apply predictable sizing before individual components define their layout. */
* {
  box-sizing: border-box;
}
html {
  /* The outer color is visible only on wider screens around the mobile shell. */
  background: #dfe2dc;
}
body {
  /* The body stays neutral; the app shell owns the paper-colored surface. */
  margin: 0;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.app-shell {
  /* Constrain the static site to a phone-like reading width on desktop. */
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  position: relative;
  padding-bottom: 82px;
}
/* Brand header and settings affordance. */
.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  letter-spacing: -0.3px;
  font-weight: 700;
}
.brand-accent {
  color: var(--terracotta);
}
.brand-mark {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  display: flex;
  gap: 2px;
  align-items: flex-end;
  justify-content: center;
  padding: 6px 5px;
}
.brand-mark i {
  display: block;
  width: 3px;
  border-radius: 3px;
  background: var(--terracotta);
}
.brand-mark i:nth-child(1) {
  height: 7px;
}
.brand-mark i:nth-child(2) {
  height: 11px;
}
.brand-mark i:nth-child(3) {
  height: 15px;
}
.icon-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  width: 38px;
  height: 38px;
  padding: 8px;
  cursor: pointer;
}
.icon-button svg {
  /* Stroke-based icons inherit the button color for a small, dependency-free UI. */
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Primary app views. */
.home-view, .workout-view, .settings-view {
  /* Leave room for the fixed bottom navigation while keeping content compact. */
  padding: 18px 24px 38px;
}
.eyebrow-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--deep-sage);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  background: var(--terracotta);
  border-radius: 50%;
}
.hero-copy {
  padding: 29px 0 28px;
}
.hero-copy h1, .settings-heading h1, .workout-heading h1 {
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: 48px;
  line-height: 0.98;
  letter-spacing: -2.5px;
  margin: 0;
}
.hero-copy h1 em {
  color: var(--terracotta);
  font-style: italic;
}
.hero-copy p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 18px 0 0;
  max-width: 280px;
}
/* Primary next-workout widget. */
.next-card {
  background: var(--card);
  border: 1px solid rgba(212, 211, 200, 0.7);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.next-card-head,
.next-card-body,
.card-foot,
.today-heading,
.settings-row,
.library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pill {
  color: var(--deep-sage);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
}
.sequence {
  font-size: 11px;
  color: #b6b9af;
}
.next-card-body {
  align-items: flex-start;
  margin: 22px 0 22px;
}
.next-card h2 {
  font: 500 30px/1 "Playfair Display", serif;
  letter-spacing: -1px;
  margin: 0 0 9px;
}
.next-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
  max-width: 210px;
}
.next-icon {
  width: 53px;
  height: 53px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e7eee4;
  color: var(--deep-sage);
}
.next-icon svg {
  width: 31px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Shared call-to-action button used for generation and saving. */
.primary-button {
  width: 100%;
  border: 0;
  border-radius: 11px;
  background: var(--ink);
  color: #fffdf8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 600 13px "DM Sans", sans-serif;
  padding: 16px 17px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.primary-button:hover {
  background: #314943;
  transform: translateY(-1px);
}
.primary-button span {
  font-size: 19px;
  line-height: 0;
  font-weight: 400;
}
.card-foot {
  color: #a0a49b;
  font-size: 10px;
  margin-top: 16px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--terracotta);
  border-radius: 50%;
  margin-right: 6px;
}
.today-heading {
  margin: 37px 0 15px;
  align-items: flex-end;
}
.section-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--deep-sage);
  display: block;
  margin-bottom: 6px;
}
.today-heading h2 {
  font: 500 24px/1 "Playfair Display", serif;
  margin: 0;
  letter-spacing: -0.5px;
}
.date-chip {
  font-size: 10px;
  font-weight: 700;
  color: var(--terracotta);
  border: 1px solid #ddc5b9;
  border-radius: 20px;
  padding: 7px 10px;
}
/* Today session list; it grows with the configured daily limit. */
.rhythm-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.rhythm-item {
  background: rgba(255, 253, 248, 0.65);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 10px;
  min-height: 78px;
}
.rhythm-item .rhythm-number {
  font-size: 10px;
  color: #b8bdb5;
}
.rhythm-item .rhythm-type {
  font-size: 11px;
  font-weight: 600;
  margin-top: 17px;
}
.rhythm-item.done {
  background: #e7eee4;
  border-color: #d4e0d2;
}
.rhythm-item.done .rhythm-number {
  color: var(--deep-sage);
}
.rhythm-item.current {
  border-color: var(--terracotta);
  background: #fffaf5;
}
.rhythm-item.current .rhythm-type {
  color: var(--terracotta);
}
.tiny-note {
  text-align: center;
  font-size: 11px;
  color: #a1a79e;
  margin: 22px 0;
}
.tiny-note span {
  color: var(--terracotta);
  margin-right: 5px;
}
.hidden {
  display: none !important;
}
.back-button {
  border: 0;
  background: none;
  padding: 8px 0;
  color: var(--muted);
  font: 500 12px "DM Sans", sans-serif;
  cursor: pointer;
}
/* Workout detail header and exercise cards. */
.workout-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 34px 0 11px;
}
.workout-heading h1 {
  font-size: 40px;
}
.workout-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--terracotta);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.workout-intro {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 25px;
}
.exercise-list {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}
.exercise-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
}
.exercise-num {
  font-size: 12px;
  color: var(--terracotta);
  font-weight: 700;
}
.exercise-card h3 {
  font-size: 14px;
  margin: 0 0 5px;
}
.exercise-meta {
  font-size: 11px;
  color: var(--muted);
}
.reps-input {
  width: 66px;
  border: 1px solid var(--line);
  background: #f8f6f0;
  border-radius: 8px;
  padding: 10px 7px;
  text-align: center;
  color: var(--ink);
  font: 600 14px "DM Sans", sans-serif;
}
.reps-input::placeholder {
  font-size: 10px;
  font-weight: 500;
  color: #b2b4ac;
}
.full {
  margin-top: 4px;
}
.save-hint {
  text-align: center;
  font-size: 11px;
  color: #a1a79e;
  margin: 16px 0;
}
/* Settings page typography and library controls. */
.settings-heading {
  padding: 33px 0 27px;
}
.settings-heading h1 {
  font-size: 42px;
}
.settings-heading p {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 0;
}
.library-section {
  margin-bottom: 25px;
}
.library-header {
  margin-bottom: 9px;
}
.library-header h2 {
  font: 500 21px "Playfair Display", serif;
  margin: 0;
}
.count {
  font-size: 10px;
  color: var(--muted);
}
.library-list {
  background: rgba(255, 253, 248, 0.65);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.library-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 13px;
  border-bottom: 1px solid #e7e4dc;
  font-size: 12px;
}
.library-item:last-child {
  border-bottom: 0;
}
.delete-exercise {
  border: 0;
  background: none;
  color: #b5b6ae;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.add-row {
  display: flex;
  gap: 7px;
  margin-top: 8px;
}
.add-row input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 9px;
  padding: 11px 12px;
  font: 12px "DM Sans", sans-serif;
  color: var(--ink);
}
.add-row button, .text-button {
  border: 0;
  background: var(--deep-sage);
  border-radius: 9px;
  color: white;
  padding: 0 14px;
  font: 600 12px "DM Sans", sans-serif;
  cursor: pointer;
}
.text-button {
  background: transparent;
  color: var(--terracotta);
  padding: 6px 0;
  margin-top: 2px;
}
/* Fixed mobile navigation. */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 520px;
  width: 100%;
  height: 70px;
  border-top: 1px solid rgba(222, 219, 210, 0.95);
  background: rgba(244, 241, 234, 0.94);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-around;
  z-index: 5;
}
.nav-item {
  border: 0;
  background: none;
  color: #a7aca4;
  display: grid;
  place-items: center;
  gap: 2px;
  width: 80px;
  cursor: pointer;
}
.nav-item span {
  font-size: 21px;
  line-height: 20px;
}
.nav-item small {
  font-size: 10px;
}
.nav-item.active {
  color: var(--ink);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 86px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: white;
  padding: 11px 16px;
  border-radius: 22px;
  font-size: 12px;
  transition: 0.25s;
  z-index: 10;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 560px) {
  .app-shell {
    margin: 24px auto;
    min-height: calc(100vh - 48px);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 12px 50px rgba(52, 60, 50, 0.12);
  }
  .bottom-nav {
    position: absolute;
    bottom: 0;
    border-radius: 0 0 26px 26px;
  }
}
/* Calendar and history layouts. */
.calendar-view {
  padding: 18px 24px 38px;
}
.calendar-heading {
  padding: 33px 0 25px;
}
.calendar-heading h1 {
  font: 500 42px/1 "Playfair Display", serif;
  letter-spacing: -2px;
  margin: 0;
}
.calendar-heading p {
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0 0;
}
.calendar-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}
/* Month navigation and seven-column calendar grid. */
.calendar-month {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.calendar-month h2 {
  font: 500 21px "Playfair Display", serif;
  margin: 0;
}
.month-button {
  border: 0;
  background: #f1eee7;
  color: var(--ink);
  border-radius: 8px;
  width: 31px;
  height: 31px;
  font-size: 17px;
  cursor: pointer;
}
.weekday-row, .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.weekday-row {
  margin-bottom: 7px;
}
.weekday-row span {
  text-align: center;
  font-size: 8px;
  color: #a3aaa1;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.calendar-day {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 9px;
  min-height: 39px;
  font: 500 12px "DM Sans", sans-serif;
  cursor: pointer;
}
.calendar-day:hover {
  background: #f3f0e8;
}
.calendar-day.muted {
  color: #c5c7bf;
}
.calendar-day.today {
  border: 1px solid var(--terracotta);
}
.calendar-day.selected {
  background: var(--deep-sage);
  color: #fff;
}
.calendar-day .session-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--terracotta);
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
}
.calendar-day.selected .session-dot {
  background: #fff;
}
/* Selected-date history list. */
.history-heading {
  margin: 33px 0 13px;
}
.history-heading h2 {
  font: 500 24px "Playfair Display", serif;
  margin: 0;
  letter-spacing: -0.5px;
}
.day-history {
  display: grid;
  gap: 10px;
}
.history-empty {
  background: rgba(255, 253, 248, 0.65);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 20px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.history-session {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.history-session-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 11px;
}
.history-session-type {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--deep-sage);
}
.history-session-time {
  font-size: 10px;
  color: #a5aaa2;
}
.history-moves {
  display: grid;
  gap: 7px;
}
.history-move {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.history-move span:last-child {
  color: var(--terracotta);
  font-weight: 700;
}
/* Per-exercise note input. */
.note-input {
  width: 86px;
  border: 1px solid var(--line);
  background: #f8f6f0;
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  color: var(--ink);
  font: 500 11px "DM Sans", sans-serif;
}
.note-input::placeholder {
  font-size: 10px;
  color: #b2b4ac;
}
.rhythm-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}
.session-row {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.session-row:hover {
  border-color: var(--deep-sage);
}
.session-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.session-row-number {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: #e7eee4;
  color: var(--deep-sage);
  font-size: 11px;
  font-weight: 700;
}
.session-row-title {
  font-size: 13px;
  font-weight: 600;
}
.session-row-meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.session-row-arrow {
  font-size: 18px;
  color: #afb5ad;
}
.session-empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
/* Tappable session detail sheet. */
.session-modal {
  /* The backdrop covers the viewport while the card remains mobile-friendly. */
  position: fixed;
  inset: 0;
  background: rgba(32, 48, 45, 0.32);
  display: grid;
  place-items: end center;
  padding: 18px;
  z-index: 20;
}
.session-modal-card {
  /* A bottom sheet preserves context and is easier to reach with one thumb. */
  position: relative;
  width: min(100%, 472px);
  background: var(--card);
  border-radius: 20px;
  padding: 24px 18px 18px;
  box-shadow: 0 20px 60px rgba(32, 48, 45, 0.2);
  max-height: 80vh;
  overflow: auto;
}
.modal-close {
  position: absolute;
  top: 11px;
  right: 14px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 25px;
  cursor: pointer;
}
.session-detail-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--deep-sage);
}
.session-detail-title {
  font: 500 30px "Playfair Display", serif;
  margin: 7px 0 4px;
}
.session-detail-time {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 19px;
}
.session-detail-list {
  display: grid;
  gap: 8px;
}
.session-detail-item {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.session-detail-item span:last-child {
  color: var(--terracotta);
  font-weight: 600;
}
/* Settings and date-limit controls. */
.weekly-limit-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 15px;
  margin-bottom: 27px;
}
.setting-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--deep-sage);
}
.weekly-limit-card h2 {
  font: 500 20px "Playfair Display", serif;
  margin: 5px 0 4px;
}
.weekly-limit-card p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  margin: 0;
}
.weekly-limits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin-top: 15px;
}
.weekly-limits label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8f6f0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  color: var(--muted);
  font-size: 11px;
}
.weekly-limits input {
  width: 35px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 6px;
  padding: 6px 2px;
  text-align: center;
  color: var(--ink);
  font: 600 13px "DM Sans", sans-serif;
}
.setting-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 15px;
  margin-bottom: 27px;
}
.setting-card h2, .date-limit-card h2 {
  font: 500 20px "Playfair Display", serif;
  margin: 5px 0 4px;
}
.setting-card p, .date-limit-card p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  margin: 0;
  max-width: 205px;
}
.limit-control, .date-limit-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}
.limit-control input, .date-limit-controls input {
  width: 45px;
  border: 1px solid var(--line);
  background: #f8f6f0;
  border-radius: 8px;
  padding: 9px 5px;
  text-align: center;
  color: var(--ink);
  font: 600 16px "DM Sans", sans-serif;
}
.date-limit-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 15px;
  margin-top: 16px;
}
.date-limit-controls {
  align-items: stretch;
}
.date-limit-controls button {
  border: 0;
  background: var(--deep-sage);
  color: #fff;
  border-radius: 8px;
  padding: 0 11px;
  font: 600 11px "DM Sans", sans-serif;
  cursor: pointer;
}
/* Import/export keeps each stored data family independently portable. */
.transfer-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 15px;
  margin: 24px 0 12px;
}
.transfer-heading h2 {
  font: 500 20px "Playfair Display", serif;
  margin: 5px 0 4px;
}
.transfer-heading p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  margin: 0;
}
.transfer-options {
  display: grid;
  gap: 7px;
  margin: 15px 0;
}
.transfer-options label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 12px;
}
.transfer-options input {
  accent-color: var(--deep-sage);
  width: 16px;
  height: 16px;
  margin: 0;
}
.transfer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.secondary-button {
  border: 1px solid var(--deep-sage);
  background: transparent;
  color: var(--deep-sage);
  border-radius: 9px;
  padding: 10px 8px;
  font: 600 11px "DM Sans", sans-serif;
  cursor: pointer;
}
.secondary-button:hover {
  background: #edf3ed;
}
.transfer-mode {
  display: grid;
  gap: 6px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 11px;
}
.transfer-mode select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f6f0;
  color: var(--ink);
  padding: 9px 10px;
  font: 12px "DM Sans", sans-serif;
}
