main.shell-main.mlv-main {
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

.mlv-sheet,
.mlv-choice,
.mlv-start,
.mlv-gate-row,
.mlv-actions button,
#mlv-download {
  box-sizing: border-box;
}

.mlv-sheet {
  width: min(640px, 100%);
  margin: 8px auto 28px;
  padding: 22px 18px 20px;
  border-radius: 22px;
  background:
    radial-gradient(90% 48% at 0% 0%, rgba(142, 36, 48, 0.35), transparent 50%),
    radial-gradient(80% 40% at 100% 0%, rgba(212, 137, 106, 0.2), transparent 46%),
    #1a1014;
  color: #fff7f4;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.mlv-sheet [hidden] { display: none !important; }

.mlv-rule {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 6px;
  height: 8px;
  margin: 0 0 18px;
}

.mlv-rule i { display: block; border-radius: 999px; }
.mlv-c-pain { background: #8e2430; }
.mlv-c-shame { background: #a35a62; }
.mlv-c-control { background: #d4896a; }

.mlv-title,
.mlv-prompt,
.mlv-type {
  margin: 0;
  color: #fff7f4;
  font-weight: 760;
  line-height: 1.28;
}

.mlv-title { font-size: clamp(1.65rem, 4.2vw, 2.2rem); }
.mlv-lead,
.mlv-skip,
.mlv-sentence,
.mlv-safe,
.mlv-clip,
.mlv-mainline { color: #fff7f4; font-size: 1.05rem; line-height: 1.55; }
.mlv-lead { margin: 12px 0 0; }
.mlv-skip { margin: 8px 0 0; color: #f0d3c4; }

.mlv-gates { display: grid; gap: 10px; margin-top: 18px; }
.mlv-gate-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(255, 247, 244, 0.28);
  border-radius: 14px;
  background: rgba(255, 247, 244, 0.08);
  color: #fff7f4;
  font-size: 1.05rem;
  cursor: pointer;
}
.mlv-gate-row input { width: 22px; height: 22px; margin: 0; accent-color: #d4896a; }
.mlv-miss { margin: 12px 0 0; color: #ffd0a8; font-size: 1.02rem; font-weight: 700; }

.mlv-start,
.mlv-actions button,
#mlv-download {
  min-height: 52px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 740;
  cursor: pointer;
}
.mlv-start {
  width: 100%;
  margin-top: 16px;
  border: 0;
  background: #d4896a;
  color: #1a1014;
}
.mlv-start:disabled { opacity: 0.42; cursor: not-allowed; }
.mlv-start:focus-visible,
.mlv-actions button:focus-visible,
#mlv-download:focus-visible,
.mlv-choice:focus-visible,
.mlv-gate-row:focus-within {
  outline: 3px solid #d4896a;
  outline-offset: 2px;
}

.mlv-count { margin: 0 0 12px; color: #d4896a; font-size: 0.95rem; font-weight: 740; }
.mlv-prompt { font-size: clamp(1.35rem, 3.4vw, 1.7rem); }
.mlv-choices { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.mlv-choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 12px 14px;
  border: 1px solid #eadfce;
  border-radius: 14px;
  background: #f6efe6;
  color: #1a1014;
  font-size: 1.08rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.mlv-choice:hover { border-color: #d4896a; background: #fffaf3; }
.mlv-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #1a1014;
  color: #fff7f4;
  font-weight: 760;
}
.mlv-choice.is-on { border-color: #d4896a; background: #2a1820; color: #fff7f4; }
.mlv-choice.is-on .mlv-n { background: #d4896a; color: #1a1014; }

.mlv-ruler { margin: 0 0 18px; }
.mlv-ruler-track {
  position: relative;
  height: 28px;
  border-radius: 999px;
  background: rgba(8, 4, 6, 0.55);
  overflow: hidden;
}
.mlv-ruler-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #8e2430, #d4896a);
}
.mlv-ruler-marks {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 6px;
  color: #f0d3c4;
  font-size: 0.82rem;
  font-weight: 740;
  text-align: center;
}
.mlv-meter { display: grid; gap: 12px; margin-bottom: 16px; }
.mlv-track-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  color: #fff7f4;
  font-weight: 740;
}
.mlv-score { margin-left: auto; font-variant-numeric: tabular-nums; }
.mlv-rail {
  position: relative;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(8, 4, 6, 0.45);
}
.mlv-fill { display: block; height: 100%; width: 0; border-radius: inherit; }
.mlv-fill-pain { background: #8e2430; }
.mlv-fill-shame { background: #a35a62; }
.mlv-fill-control { background: #d4896a; }

.mlv-kicker { margin: 0; color: #d4896a; font-size: 0.92rem; font-weight: 740; }
.mlv-type { margin-top: 4px; font-size: clamp(1.8rem, 4vw, 2.3rem); }
.mlv-mainline { margin: 8px 0 0; font-weight: 740; }
.mlv-sentence { margin: 10px 0 0; }
.mlv-say,
.mlv-hardline { margin: 14px 0 0; color: #fff7f4; line-height: 1.5; }
.mlv-say {
  padding: 12px 14px;
  border-left: 4px solid #d4896a;
  background: rgba(255, 247, 244, 0.08);
}
.mlv-say-label,
.mlv-hard-label {
  display: block;
  margin-bottom: 4px;
  color: #d4896a;
  font-size: 0.82rem;
  font-weight: 740;
}
.mlv-hard-label { color: #ffb4b8; }
.mlv-clip { margin: 12px 0 0; color: #f0d3c4; }
.mlv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.mlv-actions button,
#mlv-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 247, 244, 0.28);
  background: #f6efe6;
  color: #1a1014;
  text-decoration: none;
}
#mlv-share { border: 0; background: #d4896a; color: #1a1014; }
.mlv-safe { margin: 14px 0 0; color: #f0d3c4; font-size: 0.95rem; }
#mlv-canvas {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
@media (prefers-reduced-motion: reduce) {
  .mlv-fill, .mlv-ruler-fill, .mlv-choice { transition: none; }
}
@media (min-width: 720px) {
  .mlv-sheet { padding: 28px 26px 24px; }
}
