:root {
  --ink: #111827;
  --muted: #64748b;
  --paper: #f6f8fc;
  --cobalt: #2563eb;
  --navy: #0f172a;
  --coral: #ff6b57;
  --sky: #eaf3ff;
  --line: #dbe5f2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgb(37 99 235 / 8%), transparent 38%),
    linear-gradient(320deg, rgb(255 107 87 / 10%), transparent 36%),
    var(--paper);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
}

button {
  font: inherit;
  cursor: pointer;
}

.preview-stage {
  display: grid;
  grid-template-columns: minmax(280px, 460px) minmax(360px, 430px);
  gap: 56px;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px;
}

.preview-copy {
  max-width: 460px;
}

.brand-icon {
  width: 74px;
  height: 74px;
  margin-bottom: 26px;
}

.eyebrow,
.app-top p,
.month-head p,
.goal-card p,
.distance-card p,
.selected-run p,
.run-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.preview-copy h1 {
  margin: 0;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: 0;
}

.preview-copy > p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.copy-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.copy-pills span,
.session-chips button,
.segmented button,
.icon-button,
.wide-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: white;
}

.copy-pills span {
  padding: 9px 13px;
  color: var(--cobalt);
  font-weight: 900;
}

.phone {
  position: relative;
  width: min(430px, 100%);
  min-height: 840px;
  overflow: hidden;
  border: 1px solid rgb(15 23 42 / 10%);
  border-radius: 42px;
  background: #fbfdff;
  box-shadow: 0 34px 90px rgb(15 23 42 / 22%);
}

.phone-status {
  display: flex;
  justify-content: space-between;
  padding: 18px 24px 8px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.app-view {
  display: none;
  min-height: 754px;
  padding: 14px 20px 92px;
}

.app-view.active {
  display: block;
}

.app-top,
.month-head,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

h2,
h3 {
  margin: 2px 0 0;
  letter-spacing: 0;
}

h2 {
  font-size: 28px;
}

.icon-button,
.month-button {
  min-width: 48px;
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
}

.month-button {
  border: 0;
  border-radius: 16px;
  color: var(--cobalt);
  background: var(--sky);
  font-size: 28px;
  line-height: 1;
}

.run-hero {
  position: relative;
  min-height: 305px;
  margin-top: 18px;
  padding: 22px;
  overflow: hidden;
  border-radius: 34px;
  color: white;
  background:
    linear-gradient(180deg, rgb(15 23 42 / 4%), rgb(15 23 42 / 70%)),
    url("https://images.unsplash.com/photo-1502904550040-7534597429ae?auto=format&fit=crop&w=900&q=80") center / cover;
}

.run-hero p,
.share-preview p {
  color: rgb(255 255 255 / 78%);
}

.run-hero strong {
  display: block;
  margin-top: 88px;
  font-size: 68px;
  line-height: .9;
  letter-spacing: 0;
}

.hero-route,
.share-route {
  position: absolute;
  right: 22px;
  bottom: 94px;
  width: 128px;
  height: 78px;
  border-radius: 24px;
  background:
    linear-gradient(24deg, transparent 24%, rgb(255 255 255 / 82%) 25%, rgb(255 255 255 / 82%) 29%, transparent 30%),
    linear-gradient(152deg, transparent 34%, var(--coral) 35%, var(--coral) 40%, transparent 41%),
    rgb(255 255 255 / 13%);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 20px;
}

.metric-row span {
  padding: 11px 9px;
  border-radius: 17px;
  color: rgb(255 255 255 / 62%);
  background: rgb(255 255 255 / 14%);
  font-size: 11px;
}

.metric-row b {
  display: block;
  color: white;
  font-size: 17px;
}

.push-card,
.section-block,
.selected-run,
.goal-card,
.distance-card {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
}

.push-card {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: start;
}

.push-card p,
.goal-card small,
.distance-card small {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.push-card small {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--cobalt);
  background: var(--sky);
  font-weight: 900;
}

.app-dot {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 72% 26%, var(--coral) 0 5px, transparent 6px),
    var(--navy);
}

.section-head h3 {
  font-size: 20px;
}

.section-head span {
  color: var(--cobalt);
  font-weight: 900;
}

.week-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 9px;
  height: 120px;
  padding-top: 18px;
}

.week-bars i {
  min-height: 8px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, var(--cobalt), var(--coral));
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 18px 0 14px;
  padding: 5px;
  border-radius: 18px;
  background: #eef3fa;
}

.segmented button {
  min-height: 38px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.segmented button.active {
  color: white;
  background: var(--navy);
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}

.weekday-row {
  margin-bottom: 8px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.weekday-row .sun,
.calendar-day.sun {
  color: var(--coral);
}

.weekday-row .sat,
.calendar-day.sat {
  color: var(--cobalt);
}

.calendar-day {
  position: relative;
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  color: var(--ink);
  background: #f1f5f9;
  font-weight: 900;
}

.calendar-day.muted {
  opacity: 0;
  pointer-events: none;
}

.calendar-day.has-run {
  background: var(--sky);
}

.calendar-day.recovery::after,
.calendar-day.personal::after {
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: var(--cobalt);
  content: "";
  transform: translateX(-50%);
}

.calendar-day.recovery::after {
  background: var(--coral);
}

.calendar-day.selected {
  color: white;
  background: var(--navy);
}

.selected-run h3 {
  font-size: 24px;
}

.session-chips {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.session-chips button {
  padding: 7px 11px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.session-chips button.active {
  color: white;
  background: var(--cobalt);
}

.detail-row {
  display: grid;
  grid-template-columns: 58px 1fr 62px;
  gap: 10px;
  align-items: center;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-row i,
.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebf3;
}

.detail-row i b,
.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cobalt), var(--coral));
}

.goal-card strong,
.distance-card strong {
  display: block;
  margin-top: 6px;
  font-size: 34px;
  letter-spacing: 0;
}

.goal-card.primary {
  color: white;
  background: var(--navy);
}

.goal-card.primary p,
.goal-card.primary small {
  color: rgb(255 255 255 / 72%);
}

.goal-card.primary .progress {
  background: rgb(255 255 255 / 18%);
}

.progress {
  margin: 15px 0 10px;
}

.distance-card {
  background: linear-gradient(135deg, #eef6ff, #fff8f6);
}

.share-preview {
  position: relative;
  min-height: 575px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgb(15 23 42 / 4%), rgb(15 23 42 / 78%)),
    var(--photo) center / cover;
}

.share-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 24px;
  color: white;
}

.share-overlay > span {
  position: absolute;
  top: 22px;
  left: 24px;
  color: rgb(255 255 255 / 72%);
  font-weight: 900;
}

.share-overlay strong {
  font-size: 78px;
  line-height: .9;
  letter-spacing: 0;
}

.share-overlay small {
  color: rgb(255 255 255 / 72%);
}

.share-route {
  position: static;
  width: 100%;
  height: 82px;
  margin-top: 24px;
  background:
    linear-gradient(18deg, transparent 18%, rgb(255 255 255 / 80%) 19%, rgb(255 255 255 / 80%) 22%, transparent 23%),
    linear-gradient(156deg, transparent 42%, var(--coral) 43%, var(--coral) 47%, transparent 48%),
    rgb(255 255 255 / 13%);
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.photo-strip button {
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 18px;
  background: var(--photo) center / cover;
}

.photo-strip button.active {
  border-color: var(--coral);
}

.wide-button {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  color: white;
  background: var(--cobalt);
  font-weight: 900;
}

.tab-bar {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgb(255 255 255 / 90%);
  backdrop-filter: blur(16px);
}

.tab-bar button {
  min-height: 46px;
  border: 0;
  border-radius: 20px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
}

.tab-bar button.active {
  color: white;
  background: var(--navy);
}

@media (max-width: 920px) {
  .preview-stage {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 16px;
  }

  .preview-copy {
    max-width: 430px;
    margin: 0 auto;
  }

  .preview-copy h1 {
    font-size: 34px;
  }

  .phone {
    margin: 0 auto;
    min-height: 810px;
    border-radius: 34px;
  }
}
