:root {
  --red: #f11927;
  --red-dark: #dd121d;
  --ink: #15171c;
  --charcoal: #3f424b;
  --charcoal-2: #51545e;
  --muted: #8a8d96;
  --line: #e9e9ec;
  --panel: #f3f3f5;
  --white: #fff;
  --player: #000;
  --player-panel: #191919;
  --radius: 4px;
  --shadow: 0 18px 32px rgba(20, 20, 20, 0.14);
  --font: "Aptos Display", "Trebuchet MS", "Segoe UI", sans-serif;
  --display-tracking: -0.06em;
  --display-leading: 0.92;
  --display-leading-soft: 1;
}

* {
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
}

html {
  min-height: 100%;
  background: #e6e6e8;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.05), transparent 20%, transparent 80%, rgba(0, 0, 0, 0.05)),
    #e6e6e8;
  font-family: var(--font);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--white);
  box-shadow: 0 0 36px rgba(0, 0, 0, 0.08);
}

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  color: currentColor;
  background: transparent;
}

.icon-button.dark-disc {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.icon {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px 3px;
  color: var(--ink);
  background: var(--white);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.route {
  min-height: 100dvh;
  background: var(--white);
}

.route.has-sticky {
  padding-bottom: 116px;
}

.program-list {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 100dvh;
  padding: 22px 22px 112px;
  background: #fafafa;
}

.main-screen {
  position: relative;
}

.root-kicker {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 8px;
  color: var(--white);
  background: var(--ink);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-identity {
  display: grid;
  gap: 8px;
  margin: 2px 0 4px;
}

.home-logo {
  display: inline-block;
  color: var(--ink);
  font-size: clamp(58px, 17vw, 82px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.9;
}

.home-ideology {
  display: grid;
  gap: 8px;
  padding: 4px 2px 0;
  color: var(--ink);
  background: transparent;
}

.home-ideology span {
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.home-ideology h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1;
}

.home-ideology .home-ideology-motto {
  color: var(--ink);
  font-size: 18px;
  font-weight: 1000;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.home-ideology p {
  margin: 0;
  color: rgba(18, 19, 22, 0.58);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.38;
}

.home-ideology .home-ideology-note {
  color: rgba(18, 19, 22, 0.44);
  font-size: 12px;
  font-weight: 800;
}

.program-setup-section {
  display: grid;
  gap: 10px;
}

.program-setup-section h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.08;
}

.setup-icons {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
}

.setup-icon {
  width: 38px;
  height: 38px;
  padding: 8px;
  color: var(--white);
  background: var(--ink);
  border-radius: 999px;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

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

.program-card {
  position: relative;
  display: flex;
  aspect-ratio: 1 / 1;
  min-height: 0;
  overflow: hidden;
  padding: 18px;
  color: var(--white);
  background: #272a30;
  border-radius: var(--radius);
  text-align: left;
  isolation: isolate;
}

.program-card::before,
.program-card::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
}

.program-card::before {
  background:
    linear-gradient(120deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.15) 54%, rgba(0, 0, 0, 0.62)),
    var(--card-bg);
  background-size: cover;
  background-position: center;
  filter: saturate(0.9);
  transform: scale(1.03);
}

.program-card::after {
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.16), rgba(10, 10, 10, 0.56));
}

.program-card.beginner {
  --card-bg:
    url("./assets/programs/beginner-fitness-journey.jpg");
}

.program-content {
  display: flex;
  min-width: 0;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  position: relative;
  z-index: 2;
}

.program-title {
  max-width: 92%;
  margin: 14px 0 6px;
  color: var(--white);
  font-size: 34px;
  font-weight: 900;
  line-height: 0.96;
}

.program-subtitle {
  margin: 0;
  color: var(--white);
  font-size: 19px;
  line-height: 1.2;
}

.program-progress {
  display: grid;
  width: 100%;
  gap: 8px;
  margin-top: 18px;
}

.program-progress-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--white);
  font-weight: 900;
  text-transform: uppercase;
}

.program-progress-copy strong {
  font-size: 17px;
  font-style: normal;
}

.program-progress-copy em {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-style: normal;
}

.program-progress-bar {
  display: block;
  width: 100%;
  height: 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
}

.program-progress-bar span {
  display: block;
  height: 100%;
  background: var(--red);
  border-radius: inherit;
}

.program-card-meta {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: block;
  max-width: 42%;
  text-align: right;
  line-height: 1.05;
}

.program-card-meta em {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.program-detail {
  background: #fafafa;
}

.hero-title-shell {
  position: relative;
  display: block;
  padding: 0;
  background: #fafafa;
}

.hero-title-shell > .icon-button {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  left: 14px;
  z-index: 4;
  color: var(--white);
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.hero-title-shell .program-card {
  width: 100%;
  border-radius: 0;
}

.program-days {
  padding: 22px 20px 24px;
}

.program-days h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 900;
}

.program-day-list {
  display: grid;
  gap: 12px;
}

.program-day-card {
  position: relative;
  display: grid;
  min-height: 94px;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: #f0f0f2;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
}

.program-day-card.completed {
  padding-right: 58px;
}

.program-day-card:active {
  transform: translateY(1px);
}

.program-day-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.program-day-number,
.program-day-status {
  display: grid;
  place-items: center;
}

.program-day-number {
  width: 30px;
  height: 30px;
  color: var(--white);
  background: var(--ink);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
}

.program-day-copy strong,
.program-day-copy small,
.program-day-label {
  display: block;
}

.program-day-label {
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.program-day-label em {
  display: inline-flex;
  margin-left: 6px;
  padding: 3px 6px;
  color: var(--white);
  background: #8a8f98;
  border-radius: calc(var(--radius) * 0.5);
  font-style: normal;
  letter-spacing: 0.06em;
}

.program-day-copy strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

.program-day-copy small {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.program-day-status {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 30px;
  height: 30px;
  color: var(--white);
  background: var(--red);
  border-radius: 50%;
  transform: translateY(-50%);
}

.program-day-card.rest .program-day-number {
  background: #666b75;
}

.program-day-card.skipped .program-day-status,
.program-day-card.rest.completed .program-day-status {
  background: #8a8f98;
}

.program-day-card.optional:not(.completed) .program-day-number {
  background: #444b57;
}

.main-nav {
  position: fixed;
  right: max(0px, calc((100vw - 430px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 430px) / 2));
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 14px 22px calc(14px + env(safe-area-inset-bottom));
  background: rgba(250, 250, 250, 0.94);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(12px);
}

.main-nav button {
  min-height: 52px;
  color: var(--muted);
  background: #ececef;
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}

.main-nav button.active {
  color: var(--white);
  background: var(--ink);
}

.diary-screen {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 100dvh;
  padding: 18px 18px 112px;
  background:
    radial-gradient(circle at 8% 8%, rgba(241, 25, 39, 0.12), transparent 32%),
    #fafafa;
}

.diary-profile-header {
  display: grid;
  gap: 14px;
}

.diary-topbar {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.diary-topbar strong,
.diary-brand {
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
}

.diary-action-button {
  min-width: 58px;
  min-height: 30px;
  padding: 5px 9px;
  color: var(--white);
  border-radius: var(--radius);
  background: var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.raw-stats-button {
  min-width: 0;
  min-height: 20px;
  padding: 3px 6px;
  color: rgba(21, 23, 28, 0.34);
  background: rgba(21, 23, 28, 0.045);
  border: 1px solid rgba(21, 23, 28, 0.06);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.auth-screen {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 28px;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0, rgba(241, 25, 39, 0.18), transparent 34%),
    linear-gradient(160deg, #f7f7f8, #ffffff 58%, #eceef2);
}

.auth-card {
  display: grid;
  width: min(100%, 440px);
  gap: 16px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.auth-card.compact {
  text-align: center;
}

.auth-logo {
  color: var(--ink);
  font-size: clamp(64px, 18vw, 108px);
  font-weight: 950;
  letter-spacing: -0.12em;
  line-height: 0.78;
}

.auth-kicker {
  margin: 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.auth-card h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.auth-card p {
  margin: 0;
  color: var(--charcoal-2);
  font-size: 16px;
  line-height: 1.35;
}

.auth-form {
  display: grid;
  gap: 9px;
}

.auth-form label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
  padding: 15px 14px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 18px;
}

.auth-primary-button,
.auth-secondary-button,
.auth-option-button {
  min-height: 54px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 900;
}

.auth-primary-button {
  color: var(--white);
  background: var(--red);
}

.auth-primary-button:disabled,
.auth-option-button:disabled {
  opacity: 0.45;
}

.auth-secondary-button {
  color: var(--white);
  background: var(--ink);
}

.auth-options {
  display: grid;
  gap: 10px;
}

.auth-option-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(21, 23, 28, 0.12);
}

.auth-primary-button.auth-option-button {
  justify-content: center;
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
}

.auth-option-button span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-error {
  padding: 10px 12px;
  color: var(--red) !important;
  background: rgba(241, 25, 39, 0.08);
  border-radius: var(--radius);
  font-weight: 800;
}

.demo-code {
  display: grid;
  gap: 4px;
  padding: 14px;
  color: var(--white);
  background: var(--ink);
  border-radius: var(--radius);
}

.demo-code span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-code strong,
.paywall-price {
  font-size: 30px;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.paywall-price {
  padding: 18px;
  color: var(--white);
  background: var(--red);
  border-radius: var(--radius);
  text-align: center;
}

.paywall-account {
  color: var(--muted) !important;
  font-size: 13px !important;
}

.sync-status {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 40;
  padding: 8px 10px;
  color: var(--white);
  background: rgba(21, 23, 28, 0.86);
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.diary-profile-copy h1 {
  margin: 0;
  font-size: 42px;
}

.diary-highlight-row {
  display: flex;
  gap: 14px;
  padding: 6px 0 10px;
}

.diary-highlight {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 0;
  color: var(--ink);
  background: transparent;
}

.highlight-ring {
  display: grid;
  width: 110px;
  aspect-ratio: 1 / 1;
  place-items: center;
  padding: 6px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.92) 0 50%, transparent 51%),
    conic-gradient(from -40deg, var(--red), #ffb0b0, #2c2f38, var(--red));
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(21, 23, 28, 0.14);
}

.diary-highlight.ink .highlight-ring {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.92) 0 50%, transparent 51%),
    conic-gradient(from -40deg, var(--ink), #8d9098, var(--red), var(--ink));
}

.diary-highlight.silver .highlight-ring {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.95) 0 50%, transparent 51%),
    conic-gradient(from -40deg, #cfd1d7, var(--white), var(--red), #747884, #cfd1d7);
}

.diary-highlight.green .highlight-ring {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.92) 0 50%, transparent 51%),
    conic-gradient(from -40deg, #31d184, #dffbea, var(--ink), #31d184);
}

.highlight-core {
  display: grid;
  width: 100%;
  height: 100%;
  align-content: center;
  justify-items: center;
  gap: 2px;
  place-items: center;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 242, 245, 0.98)),
    var(--white);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(21, 23, 28, 0.06);
}

.highlight-core strong,
.highlight-core em,
.highlight-core small {
  display: block;
  max-width: 84px;
  overflow: hidden;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.highlight-core strong {
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.highlight-core em {
  color: var(--red);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.highlight-core small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.diary-highlight strong {
  max-width: 112px;
  overflow: hidden;
  color: var(--charcoal);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.diary-log-panel {
  display: grid;
  gap: 10px;
}

.diary-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
}

.diary-section-heading strong {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.diary-section-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.diary-log-list {
  display: grid;
  gap: 7px;
}

.diary-log-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px;
  width: 100%;
  align-items: center;
  padding: 9px;
  color: var(--ink);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(21, 23, 28, 0.07);
  text-align: left;
  cursor: default;
}

.diary-log-row.rest,
.diary-log-row.skipped {
  background: #f4f5f7;
}

.log-date {
  display: grid;
  min-width: 48px;
  min-height: 32px;
  place-items: center;
  padding: 4px 6px;
  color: var(--white);
  background: var(--ink);
  border-radius: var(--radius);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.diary-log-row.rest .log-date,
.diary-log-row.skipped .log-date {
  background: #8a8f98;
}

.log-copy {
  min-width: 0;
}

.log-copy strong,
.log-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-copy strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.log-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.log-value {
  min-width: 44px;
  padding: 6px 7px;
  color: var(--red);
  background: #fff1f2;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.diary-log-empty {
  display: grid;
  gap: 4px;
  padding: 16px;
  background: var(--white);
  border: 1px dashed #d8d8dd;
  border-radius: var(--radius);
}

.diary-log-empty strong {
  font-size: 16px;
  font-weight: 900;
}

.diary-log-empty span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.diary-story-screen {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  height: 100dvh;
  overflow: hidden;
  padding: calc(12px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
  color: var(--white);
  background: #050506;
}

.diary-story-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.24), transparent 28%),
    radial-gradient(circle at 80% 76%, rgba(0, 0, 0, 0.36), transparent 34%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 18px);
  opacity: 0.72;
}

.diary-story-screen.red {
  background: linear-gradient(155deg, #111216, #5b0b10 58%, #f11927);
}

.diary-story-screen.ink {
  background: linear-gradient(155deg, #050506, #292c35 62%, #111216);
}

.diary-story-screen.silver {
  background: linear-gradient(155deg, #f3f3f5, #cfd1d7 62%, #777b85);
}

.diary-story-screen.green {
  background: linear-gradient(155deg, #07140e, #175e3c 58%, #31d184);
}

.story-view-header {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 10px;
}

.story-view-header strong {
  color: var(--white);
  font-weight: 900;
}

.story-view-header strong {
  font-size: 22px;
  letter-spacing: -0.06em;
}

.diary-story-screen.silver .story-view-header strong {
  color: var(--ink);
}

.story-progress-rail {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(var(--story-count, 1), 1fr);
  gap: 5px;
}

.story-progress-rail span {
  height: 4px;
  background: rgba(255, 255, 255, 0.24);
  border-radius: 99px;
}

.story-progress-rail span.active {
  background: var(--white);
}

.story-presentation-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 18px;
  width: min(100%, 370px);
  height: auto;
  min-height: 0;
  max-height: 100%;
  align-self: center;
  justify-self: center;
  align-content: center;
  justify-items: center;
  padding: clamp(10px, 4vw, 22px) 4px;
  overflow: hidden;
  color: var(--white);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  text-align: center;
}

.story-presentation-card.ink {
  background: transparent;
}

.story-presentation-card.silver {
  color: var(--ink);
  background: transparent;
}

.story-presentation-card.green {
  background: transparent;
}

.story-kicker {
  display: inline-flex;
  width: fit-content;
}

.story-card-heading {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.story-kicker {
  min-height: 24px;
  align-items: center;
  padding: 0;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  border-radius: 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.story-presentation-card.silver .story-kicker {
  color: rgba(21, 23, 28, 0.56);
  background: transparent;
}

.story-presentation-card h1 {
  max-width: 330px;
  margin: 0;
  font-size: clamp(32px, 10vw, 45px);
}

.story-big-metric strong,
.story-big-metric span {
  display: block;
}

.story-big-metric {
  align-self: center;
  text-align: center;
}

.story-big-metric strong {
  font-size: clamp(68px, 24vw, 106px);
  font-weight: 900;
  letter-spacing: -0.1em;
  line-height: 0.78;
}

.story-big-metric span {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(13px, 4vw, 18px);
  font-weight: 900;
  text-transform: uppercase;
}

.story-presentation-card.silver .story-big-metric span {
  color: rgba(21, 23, 28, 0.62);
}

.story-fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  width: 100%;
}

.story-fact-grid div {
  min-height: 76px;
  padding: 12px 10px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
}

.story-presentation-card.silver .story-fact-grid div {
  background: rgba(21, 23, 28, 0.08);
}

.story-fact-grid strong,
.story-fact-grid span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-fact-grid strong {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.story-fact-grid span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.story-presentation-card.silver .story-fact-grid span {
  color: rgba(21, 23, 28, 0.58);
}

.story-tap-zone {
  position: absolute;
  top: calc(72px + env(safe-area-inset-top));
  bottom: 0;
  z-index: 6;
  width: 50%;
  padding: 0;
  background: transparent;
}

.story-tap-zone.previous {
  left: 0;
}

.story-tap-zone.next {
  right: 0;
}

@media (max-height: 720px) {
  .diary-story-screen {
    gap: 8px;
    padding: calc(10px + env(safe-area-inset-top)) 12px calc(10px + env(safe-area-inset-bottom));
  }

  .story-presentation-card {
    gap: 10px;
    padding: 16px;
  }

  .story-presentation-card h1 {
    font-size: clamp(29px, 9vw, 38px);
  }

  .story-big-metric strong {
    font-size: clamp(56px, 20vw, 84px);
  }

  .story-fact-grid div {
    min-height: 58px;
  }
}

.stats-screen {
  min-height: 100dvh;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));
  background: #050506;
  color: var(--white);
}

.stats-back-control {
  width: 44px;
  height: 44px;
  margin: 0 0 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.stats-back-control .icon {
  width: 24px;
  height: 24px;
}

.stats-plain-text {
  min-height: auto;
  overflow: auto;
  margin: 0;
  padding: 0;
  color: #e8e8ea;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  white-space: pre-wrap;
}

.stack-screen {
  min-height: 100dvh;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom));
  color: var(--white);
  background:
    radial-gradient(circle at 18% 8%, rgba(241, 25, 39, 0.28), transparent 32%),
    linear-gradient(160deg, #111216, #262932);
}

.stack-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.stack-header h1 {
  margin: 8px 0 4px;
  font-size: 52px;
}

.stack-header .diary-brand {
  display: block;
  margin-bottom: 8px;
  color: var(--white);
}

.stack-header p {
  max-width: 280px;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.stack-hero-card,
.stack-ribbon-card,
.stack-metrics div {
  border-radius: var(--radius);
}

.stack-hero-card {
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(241, 25, 39, 0.96), rgba(21, 23, 28, 0.96) 58%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0 3px, transparent 3px 20px);
  box-shadow: var(--shadow);
}

.stack-score {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.stack-score strong {
  font-size: 84px;
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.8;
}

.stack-score span {
  max-width: 110px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-align: right;
  text-transform: uppercase;
}

.stack-board {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 5px;
  align-items: end;
  min-height: 154px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: var(--radius);
}

.stack-day-column {
  display: grid;
  gap: 6px;
  align-items: end;
  justify-items: center;
  min-width: 0;
}

.stack-pile {
  display: flex;
  min-height: 118px;
  flex-direction: column-reverse;
  justify-content: flex-start;
  gap: 4px;
}

.stack-pile small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.stack-day-column strong {
  color: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  font-weight: 900;
}

.stack-square {
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  color: var(--ink);
  background: var(--white);
  border-radius: 2px;
  font-size: 8px;
  font-weight: 900;
}

.stack-square.rest {
  background: #31d184;
}

.stack-square.optional,
.stack-square.skipped {
  background: #8a8f98;
}

.stack-square.ghost {
  background: rgba(255, 255, 255, 0.16);
  outline: 1px solid rgba(255, 255, 255, 0.16);
}

.stack-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.stack-metrics div {
  min-height: 76px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.1);
}

.stack-metrics strong,
.stack-metrics span {
  display: block;
}

.stack-metrics strong {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.stack-metrics span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.stack-ribbon-card {
  padding: 16px;
  background: rgba(0, 0, 0, 0.32);
}

.stack-ribbon-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.stack-ribbon-title strong {
  font-size: 22px;
}

.stack-ribbon-title span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stack-ribbon {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 5px;
}

.stack-square.ribbon {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
}

.stack-back-button {
  width: 100%;
  margin-top: 18px;
}

.bottom-bar {
  position: fixed;
  right: max(0px, calc((100vw - 430px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 430px) / 2));
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 18px;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(10px);
}

.primary-button {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--red);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.secondary-button {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.secondary-button:disabled {
  color: rgba(255, 255, 255, 0.72);
  background: #8a8f98;
}

.primary-button:active {
  background: var(--red-dark);
}

.single-bottom {
  display: block;
}

.single-bottom .primary-button {
  width: 100%;
}

.optional-bottom {
  grid-template-columns: 0.82fr 1.35fr;
}

.optional-bottom .primary-button,
.optional-bottom .secondary-button {
  min-height: 76px;
}

.day-title-card .program-title {
  font-size: 31px;
}

.settings-card {
  position: relative;
  z-index: 5;
  margin: 0 20px 26px;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.difficulty-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.difficulty-heading {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  align-items: center;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.difficulty-heading span {
  color: var(--muted);
}

.difficulty-toggle {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  padding: 5px;
  background: #f1f1f4;
  border-radius: var(--radius);
}

.difficulty-option {
  display: grid;
  min-width: 0;
  min-height: 66px;
  align-items: center;
  align-content: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 7px;
  color: rgba(18, 19, 22, 0.58);
  background: transparent;
  border-radius: calc(var(--radius) - 2px);
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
}

.difficulty-option-label,
.difficulty-option-hint {
  display: block;
  min-width: 0;
}

.difficulty-option-label {
  font-size: clamp(15px, 4.4vw, 19px);
  font-weight: 900;
  line-height: 1;
}

.difficulty-option-hint {
  color: rgba(18, 19, 22, 0.42);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.05;
}

.difficulty-option.active {
  color: var(--white);
  background: var(--ink);
  box-shadow: 0 8px 18px rgba(17, 18, 22, 0.18);
}

.difficulty-option.active .difficulty-option-hint {
  color: rgba(255, 255, 255, 0.62);
}

.settings-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 21px;
  font-weight: 900;
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-row span:first-of-type {
  color: var(--muted);
}

.settings-row strong {
  min-width: 0;
}

.difficulty-button {
  display: inline-flex;
  min-width: 132px;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: var(--ink);
  background: transparent;
  font-size: 20px;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.difficulty-button .icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.workout-body {
  padding: 0 20px 24px;
}

.workout-route.no-settings .workout-body {
  padding-top: 22px;
}

.exercise-section {
  margin-bottom: 24px;
}

.exercise-section-title {
  display: flex;
  gap: 9px;
  align-items: baseline;
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
}

.exercise-section-title .dot {
  color: var(--muted);
}

.exercise-section-title .sets {
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
  text-transform: none;
}

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

.exercise-row {
  display: grid;
  min-height: 88px;
  grid-template-columns: 92px 1fr;
  gap: 20px;
  align-items: center;
}

.exercise-thumb {
  position: relative;
  width: 92px;
  aspect-ratio: 1 / 1;
  height: auto;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(235, 239, 241, 0.72)),
    linear-gradient(180deg, #f9fafa 0 64%, #c7c9c9 64% 100%);
}

.exercise-thumb::before {
  position: absolute;
  right: 0;
  bottom: 29%;
  left: 0;
  height: 1px;
  content: "";
  background: rgba(0, 0, 0, 0.08);
}

.exercise-thumb svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.exercise-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.exercise-title {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.12;
}

.exercise-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.2;
}

.amount-each {
  color: currentColor;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.18em;
}

.exercise-rest-row,
.rest-divider {
  display: grid;
  min-height: 36px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  background: #f4f4f6;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.exercise-rest-row {
  margin: -2px -20px 4px;
}

.exercise-rest-row span,
.rest-divider span {
  height: 1px;
  background: #dfe0e4;
}

.rest-divider {
  margin: 20px -20px 24px;
}

.rest-day-panel {
  display: grid;
  min-height: 280px;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.rest-day-panel h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.rest-day-panel p {
  max-width: 280px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.35;
}

.offline-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  overflow: hidden;
  place-items: center;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 32px;
  background:
    radial-gradient(circle at 50% 42%, rgba(241, 25, 39, 0.16), transparent 28%),
    linear-gradient(180deg, #08090b 0%, #000 100%);
  color: var(--white);
}

.offline-gate.ready {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #080b09 0%, #000 100%);
}

.offline-gate.error {
  background:
    radial-gradient(circle at 50% 42%, rgba(241, 25, 39, 0.22), transparent 28%),
    linear-gradient(180deg, #10090b 0%, #000 100%);
}

.offline-gate-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 26px;
  width: 100%;
  min-height: 360px;
  align-content: center;
  justify-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.offline-logo {
  color: var(--white);
  font-size: clamp(70px, 21vw, 94px);
  font-weight: 1000;
  letter-spacing: -0.14em;
  line-height: 0.78;
}

.offline-loader {
  position: relative;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: conic-gradient(from -90deg, var(--red) var(--offline-progress), rgba(255, 255, 255, 0.1) 0);
  box-shadow:
    0 0 42px rgba(241, 25, 39, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: offline-breathe 1.8s ease-in-out infinite;
}

.offline-loader::before {
  content: "";
  position: absolute;
  inset: 10px;
  background: #000;
  border-radius: inherit;
}

.offline-loader span {
  position: relative;
  width: 10px;
  height: 10px;
  background: var(--white);
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.58);
}

.offline-gate p {
  max-width: 220px;
  margin: -8px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
}

.offline-progress-text {
  margin-top: -18px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.offline-retry-button {
  min-height: 44px;
  padding: 0 22px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes offline-breathe {
  0%,
  100% {
    transform: scale(0.96);
  }
  50% {
    transform: scale(1.04);
  }
}

.player {
  position: relative;
  min-height: 100dvh;
  padding: calc(8px + env(safe-area-inset-top)) 32px calc(18px + env(safe-area-inset-bottom));
  color: var(--white);
  background: var(--player);
}

.player-top {
  display: grid;
  min-height: 28px;
  grid-template-columns: 30px 1fr 30px;
  gap: 4px;
  align-items: center;
}

.session-clock {
  text-align: center;
  color: var(--white);
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}

.player-top-spacer {
  width: 30px;
  height: 28px;
}

.player-close-button {
  width: 28px;
  height: 28px;
  justify-self: end;
}

.player-close-button .icon {
  width: 18px;
  height: 18px;
}

.segments {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(var(--segment-columns), minmax(0, 1fr));
  grid-template-rows: repeat(var(--segment-rows), auto);
  gap: 3px;
  margin: 8px 0 14px;
}

.segment {
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.56);
  border-radius: var(--radius);
}

.segment.done {
  background: var(--white);
}

.segment.active {
  background: var(--red);
}

.player-visual {
  display: grid;
  aspect-ratio: 1 / 1;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: #f7f8f8;
}

.player-visual .exercise-thumb {
  width: 100%;
  height: auto;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(235, 239, 242, 0.92)),
    linear-gradient(180deg, #fff 0 64%, #c8c9c8 64% 100%);
}

.player-visual .exercise-thumb img {
  object-fit: contain;
}

.player-status-bar {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.player-status-bar .timer-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--timer-left);
  background: var(--red);
  transition: width 0.25s linear;
}

.player-title-area {
  min-height: 128px;
  padding: 2px 0 18px;
  text-align: center;
}

.player-status-bar {
  display: grid;
  width: 100%;
  min-height: 68px;
  align-items: center;
  margin: 12px auto 0;
  background: rgba(255, 255, 255, 0.14);
}

.player-status-bar.static-status {
  background: rgba(255, 255, 255, 0.16);
}

.player-status-bar strong {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 0.28em;
  padding: 0 10px;
  color: var(--white);
  font-size: 26px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.player-name {
  margin-top: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 29px;
  line-height: 1.08;
}

.next-panel {
  position: fixed;
  right: max(0px, calc((100vw - 430px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 430px) / 2));
  z-index: 12;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 22px 32px calc(18px + env(safe-area-inset-bottom));
  background: var(--player-panel);
}

.player-action-panel {
  padding-top: 18px;
}

.next-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 17px;
  font-weight: 500;
  text-transform: uppercase;
}

.next-label .icon {
  width: 17px;
  height: 17px;
}

.next-exercise {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.next-exercise > div {
  min-width: 0;
}

.next-exercise.finish-next {
  display: block;
}

.next-exercise .exercise-thumb {
  width: 112px;
  height: auto;
  border-radius: var(--radius);
}

.next-name {
  display: -webkit-box;
  overflow: hidden;
  max-width: 100%;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--white);
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.next-meta {
  overflow: hidden;
  max-width: 100%;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 24px;
}

.player-action-panel .player-action-row {
  margin-top: 0;
}

.complete-button,
.skip-button {
  min-height: 64px;
  color: var(--white);
  background: var(--red);
  border-radius: var(--radius);
  font-size: 30px;
  font-weight: 500;
}

.player-action-row .complete-button,
.player-action-row .skip-button {
  min-height: 128px;
}

.finish-panel {
  display: grid;
  min-height: 70dvh;
  place-items: center;
  width: 100%;
  overflow: hidden;
  padding: 28px 18px;
  text-align: center;
}

.finish-summary {
  display: grid;
  width: min(100%, 330px);
  max-width: 100%;
  gap: 20px;
  justify-items: stretch;
  min-width: 0;
}

.finish-panel h1 {
  overflow-wrap: anywhere;
  margin: 0;
  font-size: clamp(38px, 12vw, 50px);
}

.finish-panel p {
  margin: -14px 0 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 20px;
}

.finish-time-card {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

.finish-time-card span {
  min-width: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
  white-space: normal;
}

.finish-time-card strong {
  min-width: 0;
  font-size: clamp(38px, 13vw, 46px);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.9;
  white-space: nowrap;
}

.finish-button {
  display: grid;
  width: 100%;
  min-height: 92px;
  place-items: center;
  gap: 4px;
  padding: 18px 24px;
  line-height: 1;
}

.finish-button small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.program-title,
.diary-profile-copy h1,
.story-presentation-card h1,
.stack-header h1,
.rest-day-panel h2,
.player-name,
.finish-panel h1 {
  font-weight: 900;
  letter-spacing: var(--display-tracking);
  line-height: var(--display-leading);
}

.program-days h2,
.exercise-section-title,
.exercise-title {
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: var(--display-leading-soft);
}

@media (max-width: 380px) {
  .program-title {
    font-size: 30px;
  }

  .exercise-row {
    grid-template-columns: 78px 1fr;
    gap: 14px;
  }

  .exercise-thumb {
    width: 78px;
    height: auto;
  }

  .exercise-title {
    font-size: 19px;
  }

  .exercise-meta {
    font-size: 17px;
  }

  .exercise-rest-row {
    font-size: 12px;
  }

  .primary-button {
    font-size: 18px;
  }

  .player {
    padding-right: 22px;
    padding-left: 22px;
  }

  .session-clock {
    font-size: 16px;
  }

  .player-name {
    font-size: 28px;
  }

  .next-panel {
    padding-right: 22px;
    padding-left: 22px;
  }

  .next-exercise {
    grid-template-columns: 96px 1fr;
    gap: 16px;
  }

  .next-exercise .exercise-thumb {
    width: 96px;
  }
}
