:root {
  --ink: #121511;
  --ink-deep: #0c0f0c;
  --paper: #f1eee6;
  --paper-soft: #e6e2d8;
  --paper-dim: #c3c7bd;
  --line: rgba(241, 238, 230, 0.14);
  --line-dark: rgba(18, 21, 17, 0.14);
  --lime: #c8ff63;
  --orange: #ff8e54;
  --sky: #8ad7ff;
  --violet: #c2b4ff;
  --display-font: Georgia, "Noto Serif SC", "Songti SC", serif;
  --body-font: "Trebuchet MS", "PingFang SC", "Microsoft YaHei", sans-serif;
  --accent: var(--lime);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ink-deep);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 78% 2%, rgba(200, 255, 99, 0.08), transparent 24rem),
    radial-gradient(circle at 0% 78%, rgba(138, 215, 255, 0.05), transparent 28rem),
    var(--ink-deep);
  font-family: var(--body-font);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  content: "";
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.app-shell {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--paper);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid var(--lime);
  color: var(--lime);
  font-family: var(--display-font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.08em;
  transform: rotate(-7deg);
}

.brand-mark span {
  color: var(--paper);
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-copy strong {
  font-size: 14px;
  letter-spacing: 0.22em;
}

.brand-copy small {
  color: var(--paper-dim);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--paper-dim);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(200, 255, 99, 0.09);
}

.text-button {
  padding: 8px 0;
  color: var(--paper-dim);
  background: transparent;
  border-bottom: 1px solid transparent;
  font-size: 11px;
  letter-spacing: 0.06em;
  transition: color 180ms ease, border-color 180ms ease;
}

.text-button:hover {
  color: var(--paper);
  border-color: var(--paper);
}

.page-grid {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 46px;
  padding: 42px 0 80px;
}

.scenario-rail {
  position: relative;
  min-width: 0;
}

.rail-heading {
  padding: 7px 0 25px;
}

.rail-kicker,
.section-kicker,
.eyebrow,
.timer-kicker {
  display: block;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.17em;
  line-height: 1.4;
  text-transform: uppercase;
}

.rail-heading h2 {
  margin: 16px 0 0;
  color: var(--paper);
  font-family: var(--display-font);
  font-size: clamp(28px, 3vw, 39px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.rail-heading em {
  color: var(--lime);
  font-style: italic;
}

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

.scenario-button {
  position: relative;
  display: grid;
  grid-template-columns: 35px 1fr 16px;
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 11px 12px;
  color: var(--paper-dim);
  background: rgba(241, 238, 230, 0.035);
  border: 1px solid rgba(241, 238, 230, 0.1);
  border-radius: 7px;
  text-align: left;
  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.scenario-button:hover {
  color: var(--paper);
  border-color: rgba(241, 238, 230, 0.28);
  transform: translateX(3px);
}

.scenario-button.is-active {
  color: var(--ink);
  background: var(--button-accent, var(--accent));
  border-color: var(--button-accent, var(--accent));
  box-shadow: 7px 7px 0 rgba(200, 255, 99, 0.14);
  transform: translateX(7px);
}

.scenario-number {
  align-self: start;
  padding-top: 2px;
  font-family: var(--display-font);
  font-size: 20px;
  line-height: 1;
}

.scenario-button.is-active .scenario-number {
  color: var(--ink);
}

.scenario-body {
  display: grid;
  gap: 4px;
}

.scenario-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.scenario-time {
  opacity: 0.68;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.scenario-arrow {
  font-size: 19px;
  text-align: right;
  transition: transform 180ms ease;
}

.scenario-button:hover .scenario-arrow,
.scenario-button.is-active .scenario-arrow {
  transform: translate(2px, -2px);
}

.rail-note {
  display: flex;
  gap: 12px;
  margin-top: 42px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.note-mark {
  flex: 0 0 auto;
  color: var(--orange);
  font-size: 20px;
  line-height: 1;
}

.rail-note p {
  margin: 0;
  color: #929990;
  font-size: 11px;
  line-height: 1.65;
}

.main-column {
  min-width: 0;
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  min-height: 425px;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  border-radius: 20px;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-panel::after {
  position: absolute;
  z-index: -1;
  right: 22%;
  bottom: -120px;
  width: 320px;
  height: 230px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.28;
  filter: blur(6px);
  transform: rotate(-17deg);
  content: "";
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(31px, 4vw, 58px);
}

.hero-copy .eyebrow {
  color: #6c7368;
}

.hero-title-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-top: 20px;
}

.hero-index {
  color: var(--accent);
  font-family: var(--display-font);
  font-size: 30px;
  font-style: italic;
  line-height: 1;
}

.hero-title-row h1 {
  max-width: 550px;
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(38px, 5vw, 74px);
  font-weight: 400;
  letter-spacing: -0.085em;
  line-height: 0.94;
}

.hero-description {
  max-width: 510px;
  margin: 25px 0 0;
  color: #5d655b;
  font-size: 14px;
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  margin-top: auto;
  padding-top: 35px;
}

.hero-meta > div {
  display: grid;
  gap: 4px;
}

.meta-label {
  color: #8c9289;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-meta strong {
  color: var(--ink);
  font-family: var(--display-font);
  font-size: 20px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 27px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 43px;
  padding: 0 17px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  color: var(--ink);
  background: var(--accent);
  box-shadow: 4px 4px 0 rgba(18, 21, 17, 0.13);
}

.primary-button:hover {
  box-shadow: 7px 7px 0 rgba(18, 21, 17, 0.15);
  transform: translate(-2px, -2px);
}

.button-arrow {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.ghost-button {
  color: #596159;
  background: transparent;
  border: 1px solid rgba(18, 21, 17, 0.2);
}

.ghost-button:hover,
.ghost-button.is-active {
  color: var(--ink);
  background: rgba(18, 21, 17, 0.07);
}

.hero-art {
  position: relative;
  min-height: 425px;
  overflow: hidden;
  background: var(--ink);
}

.hero-art::before {
  position: absolute;
  top: -17%;
  right: -13%;
  width: 76%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(200, 255, 99, 0.95), rgba(200, 255, 99, 0.03) 63%),
    repeating-radial-gradient(circle at center, transparent 0 17px, rgba(241, 238, 230, 0.08) 18px 19px);
  opacity: 0.92;
}

.hero-art::after {
  position: absolute;
  right: 21%;
  bottom: -18%;
  width: 55%;
  aspect-ratio: 1;
  border: 1px solid rgba(241, 238, 230, 0.22);
  border-radius: 50%;
  transform: rotate(32deg);
  content: "";
}

.art-orbit {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(241, 238, 230, 0.23);
  border-radius: 50%;
  transform: rotate(-24deg);
}

.orbit-one {
  top: 18%;
  left: 13%;
  width: 71%;
  height: 32%;
}

.orbit-two {
  top: 33%;
  left: 1%;
  width: 90%;
  height: 23%;
  border-color: rgba(200, 255, 99, 0.48);
  transform: rotate(17deg);
}

.art-label {
  position: absolute;
  z-index: 2;
  top: 30px;
  right: 30px;
  max-width: 120px;
  color: rgba(241, 238, 230, 0.7);
  font-size: 9px;
  letter-spacing: 0.17em;
  line-height: 1.5;
  text-align: right;
}

.art-number {
  position: absolute;
  z-index: 2;
  right: 31px;
  bottom: 18px;
  color: transparent;
  font-family: var(--display-font);
  font-size: clamp(140px, 17vw, 245px);
  font-style: italic;
  font-weight: 700;
  line-height: 0.8;
  -webkit-text-stroke: 1px rgba(241, 238, 230, 0.36);
}

.art-cross {
  position: absolute;
  z-index: 2;
  width: 13px;
  height: 13px;
}

.art-cross::before,
.art-cross::after {
  position: absolute;
  background: var(--paper);
  content: "";
}

.art-cross::before {
  top: 6px;
  left: 0;
  width: 13px;
  height: 1px;
}

.art-cross::after {
  top: 0;
  left: 6px;
  width: 1px;
  height: 13px;
}

.cross-one {
  top: 22%;
  left: 22%;
}

.cross-two {
  right: 33%;
  bottom: 22%;
  transform: scale(0.65);
}

.flow-section {
  padding: 64px 0 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 25px;
}

.section-heading h2 {
  margin: 13px 0 0;
  color: var(--paper);
  font-family: var(--display-font);
  font-size: clamp(28px, 4vw, 43px);
  font-weight: 400;
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.progress-cluster {
  display: grid;
  min-width: 190px;
  gap: 10px;
}

.progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #899087;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.progress-copy strong {
  color: var(--paper);
  font-family: var(--display-font);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.progress-track {
  width: 100%;
  height: 5px;
  overflow: hidden;
  background: rgba(241, 238, 230, 0.14);
  border-radius: 99px;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  transition: width 320ms cubic-bezier(0.23, 1, 0.32, 1);
}

.cue-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 30px 0 22px;
  padding: 14px 17px;
  color: #c5cac0;
  background: rgba(241, 238, 230, 0.045);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.45;
}

.cue-strip::before {
  color: var(--accent);
  font-size: 16px;
  content: "↳";
}

.cue-strip strong {
  color: var(--paper);
  font-weight: 700;
}

.workout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.exercise-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 10px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  animation: card-in 520ms both;
  animation-delay: calc(var(--card-index) * 55ms);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.exercise-card:hover {
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
  transform: translateY(-4px);
}

.exercise-card.is-complete {
  background: #d7ded0;
}

.exercise-card.is-complete .exercise-name {
  color: #5d655b;
  text-decoration: line-through;
  text-decoration-color: var(--accent);
}

.card-media {
  position: relative;
  display: grid;
  min-height: 205px;
  overflow: hidden;
  place-items: center;
  background: #dedbd3;
  border-radius: 7px;
}

.card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 400ms ease;
}

.exercise-card:hover .card-media img {
  transform: scale(1.035);
}

.card-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: 100%;
  gap: 2px;
}

.card-options figure {
  position: relative;
  display: grid;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  place-items: center;
  background: #dedbd3;
}

.card-options img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-options figcaption {
  position: absolute;
  right: 8px;
  bottom: 7px;
  padding: 4px 6px;
  color: var(--paper);
  background: rgba(18, 21, 17, 0.78);
  border-radius: 2px;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.media-tag {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 5px 7px;
  color: var(--paper);
  background: rgba(18, 21, 17, 0.78);
  border-radius: 2px;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 7px 7px;
}

.card-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.card-index {
  color: #9ca197;
  font-family: var(--display-font);
  font-size: 17px;
  font-style: italic;
}

.complete-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #6c7469;
  background: transparent;
  font-size: 10px;
  white-space: nowrap;
}

.complete-box {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  color: var(--ink);
  border: 1px solid #aab0a6;
  border-radius: 50%;
  font-size: 11px;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.complete-toggle:hover .complete-box {
  border-color: var(--ink);
}

.exercise-card.is-complete .complete-box {
  color: var(--ink);
  background: var(--accent);
  border-color: var(--accent);
}

.exercise-name {
  margin: 12px 0 0;
  color: var(--ink);
  font-family: var(--display-font);
  font-size: clamp(21px, 2.2vw, 27px);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 1.03;
  transition: color 180ms ease;
}

.exercise-english {
  margin: 6px 0 0;
  color: #8b9189;
  font-size: 9px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 15px;
}

.tag {
  padding: 5px 7px;
  color: #5b6559;
  background: #e0e4dc;
  border-radius: 2px;
  font-size: 9px;
  line-height: 1;
}

.card-prescription {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid var(--line-dark);
}

.prescription-value {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.optional-label {
  color: #8c9189;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-cue {
  display: grid;
  gap: 5px;
  margin-top: 15px;
  padding: 11px;
  color: #626a61;
  background: rgba(18, 21, 17, 0.045);
  border-left: 2px solid var(--accent);
  font-size: 11px;
  line-height: 1.55;
}

.card-cue strong {
  color: #899087;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-actions {
  display: flex;
  gap: 7px;
  margin-top: auto;
  padding-top: 15px;
}

.empty-state {
  display: grid;
  min-height: 240px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 35px;
  color: var(--paper-dim);
  background: rgba(241, 238, 230, 0.045);
  border: 1px dashed rgba(241, 238, 230, 0.2);
  border-radius: 12px;
  text-align: center;
}

.empty-state > span {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  color: var(--ink);
  background: var(--accent);
  border-radius: 50%;
  font-size: 18px;
}

.empty-state strong {
  color: var(--paper);
  font-family: var(--display-font);
  font-size: 25px;
  font-weight: 400;
}

.empty-state p {
  margin: 0;
  color: #8e978d;
  font-size: 11px;
}

.card-action {
  flex: 1;
  min-height: 34px;
  padding: 0 8px;
  color: #5d665b;
  background: transparent;
  border: 1px solid rgba(18, 21, 17, 0.15);
  border-radius: 2px;
  font-size: 10px;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.card-action:hover {
  color: var(--ink);
  background: var(--accent);
  border-color: var(--accent);
}

.safety-panel {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 80px;
  gap: 18px;
  align-items: start;
  margin-top: 70px;
  padding: 27px 30px;
  overflow: hidden;
  color: var(--paper);
  background: #1d221d;
  border: 1px solid rgba(241, 238, 230, 0.12);
  border-radius: 12px;
}

.safety-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--ink);
  background: var(--orange);
  border-radius: 50%;
  font-family: var(--display-font);
  font-size: 21px;
  font-style: italic;
}

.safety-panel h2 {
  margin: 7px 0 9px;
  color: var(--paper);
  font-family: var(--display-font);
  font-size: clamp(22px, 3vw, 31px);
  font-weight: 400;
  letter-spacing: -0.05em;
}

.safety-panel p {
  max-width: 620px;
  margin: 0;
  color: #9ba298;
  font-size: 11px;
  line-height: 1.7;
}

.safety-line {
  width: 80px;
  height: 80px;
  border: 1px solid var(--orange);
  border-radius: 50%;
  opacity: 0.55;
  transform: translate(18px, -8px);
}

.timer-dock {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  left: 50%;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: center;
  width: min(700px, calc(100% - 32px));
  padding: 14px 15px 14px 21px;
  color: var(--paper);
  background: rgba(22, 26, 21, 0.94);
  border: 1px solid rgba(241, 238, 230, 0.18);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
  transition: opacity 220ms ease, transform 220ms ease;
}

.timer-dock.is-hidden {
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 16px);
}

.timer-dock-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.timer-kicker {
  color: var(--accent);
  font-size: 8px;
}

.timer-dock-info strong {
  overflow: hidden;
  color: var(--paper);
  font-family: var(--display-font);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timer-display {
  min-width: 82px;
  color: var(--accent);
  font-family: var(--display-font);
  font-size: 29px;
  line-height: 1;
  text-align: center;
}

.timer-actions {
  display: flex;
  gap: 6px;
}

.timer-button {
  min-height: 32px;
  padding: 0 11px;
  color: var(--paper-dim);
  background: transparent;
  border: 1px solid rgba(241, 238, 230, 0.17);
  border-radius: 2px;
  font-size: 10px;
}

.timer-button:hover {
  color: var(--paper);
  border-color: var(--paper);
}

.timer-button-primary {
  color: var(--ink);
  background: var(--accent);
  border-color: var(--accent);
}

.timer-button-primary:hover {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
}

.timer-close {
  min-width: 32px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.modal-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 10, 8, 0.78);
  backdrop-filter: blur(10px);
  transition: opacity 200ms ease;
}

.modal-backdrop.is-hidden {
  pointer-events: none;
  opacity: 0;
}

.detail-modal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(280px, 1.05fr);
  width: min(830px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  color: var(--ink);
  background: var(--paper);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transform: translateY(0);
}

.modal-backdrop.is-hidden .detail-modal {
  transform: translateY(12px);
}

.modal-close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--paper);
  background: rgba(18, 21, 17, 0.78);
  border-radius: 50%;
  font-size: 21px;
  line-height: 1;
}

.modal-media {
  display: grid;
  min-height: 430px;
  place-items: center;
  background: #dad7cf;
}

.modal-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 600px;
  object-fit: contain;
}

.modal-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 51px 43px 43px;
}

.modal-content .section-kicker {
  color: #6a7267;
}

.modal-content h2 {
  margin: 16px 0 0;
  font-family: var(--display-font);
  font-size: clamp(31px, 4vw, 49px);
  font-weight: 400;
  letter-spacing: -0.08em;
  line-height: 0.98;
}

.modal-english {
  margin: 8px 0 0;
  color: #8b9189;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.modal-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 25px;
}

.modal-meta-row span {
  padding: 7px 8px;
  color: #596259;
  background: #e0e4dc;
  border-radius: 2px;
  font-size: 10px;
}

.modal-cue {
  width: 100%;
  margin-top: 26px;
  padding: 15px;
  background: rgba(18, 21, 17, 0.055);
  border-left: 3px solid var(--accent);
}

.modal-cue span {
  color: #858d82;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-cue p {
  margin: 8px 0 0;
  color: #626a61;
  font-size: 12px;
  line-height: 1.7;
}

.modal-action {
  margin-top: auto;
  padding: 0 18px;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .app-shell {
    width: min(100% - 32px, 900px);
  }

  .page-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 25px;
  }

  .scenario-rail {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 24px;
    align-items: end;
  }

  .rail-heading {
    padding: 0;
  }

  .rail-heading h2 {
    font-size: 30px;
  }

  .scenario-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 5px 5px 10px 0;
  }

  .scenario-button {
    flex: 0 0 170px;
    min-height: 65px;
  }

  .rail-note {
    display: none;
  }
}

@media (max-width: 700px) {
  .app-shell {
    width: min(100% - 24px, 560px);
  }

  .topbar {
    min-height: 72px;
  }

  .brand-copy small,
  .topbar-status {
    display: none;
  }

  .brand-mark {
    width: 37px;
    height: 37px;
  }

  .text-button {
    font-size: 10px;
  }

  .page-grid {
    padding-top: 18px;
    padding-bottom: 50px;
  }

  .scenario-rail {
    display: block;
  }

  .rail-heading {
    padding-bottom: 15px;
  }

  .rail-heading h2 {
    font-size: 28px;
  }

  .scenario-button {
    flex-basis: 162px;
  }

  .hero-panel {
    display: block;
    min-height: auto;
  }

  .hero-copy {
    min-height: 390px;
    padding: 29px 25px 25px;
  }

  .hero-title-row {
    gap: 10px;
    margin-top: 16px;
  }

  .hero-index {
    font-size: 23px;
  }

  .hero-title-row h1 {
    font-size: clamp(37px, 13vw, 58px);
  }

  .hero-description {
    margin-top: 19px;
    font-size: 12px;
  }

  .hero-meta {
    gap: 16px;
    padding-top: 25px;
  }

  .hero-meta strong {
    font-size: 17px;
  }

  .hero-art {
    min-height: 190px;
  }

  .hero-art::before {
    top: -72%;
    right: -2%;
    width: 58%;
  }

  .art-number {
    right: 20px;
    bottom: 9px;
    font-size: 145px;
  }

  .art-label {
    top: 20px;
    right: 20px;
    font-size: 8px;
  }

  .flow-section {
    padding-top: 45px;
  }

  .section-heading {
    display: block;
  }

  .progress-cluster {
    min-width: 0;
    margin-top: 19px;
  }

  .workout-grid {
    grid-template-columns: 1fr;
  }

  .card-media {
    min-height: 225px;
  }

  .safety-panel {
    grid-template-columns: 38px 1fr;
    gap: 13px;
    margin-top: 48px;
    padding: 22px 18px;
  }

  .safety-line {
    display: none;
  }

  .timer-dock {
    grid-template-columns: 1fr auto;
    gap: 9px 15px;
    padding: 12px 13px 12px 16px;
  }

  .timer-display {
    grid-column: 2;
    grid-row: 1;
    min-width: 70px;
    font-size: 24px;
  }

  .timer-actions {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .timer-button {
    flex: 1;
  }

  .detail-modal {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 24px);
  }

  .modal-media {
    min-height: 270px;
    max-height: 330px;
  }

  .modal-content {
    padding: 27px 22px 22px;
  }

  .modal-action {
    margin-top: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
