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

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

.slh-sheet {
  width: min(640px, 100%);
  margin: 8px auto 28px;
  padding: 22px 18px 20px;
  border-radius: 22px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(226, 177, 90, 0.16), transparent 42%),
    radial-gradient(90% 70% at 100% 0%, rgba(196, 59, 74, 0.22), transparent 46%),
    #4a1830;
  color: #fff7f4;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

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

.slh-rule {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1.1fr;
  gap: 6px;
  height: 8px;
  margin: 0 0 18px;
}

.slh-rule i {
  display: block;
  border-radius: 999px;
}

.slh-rule-slow { background: #e2b15a; }
.slh-rule-alt { background: #e0a07a; }
.slh-rule-hard { background: #e23b4a; }

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

.slh-title {
  font-size: clamp(1.7rem, 4.4vw, 2.35rem);
}

.slh-lead,
.slh-skip,
.slh-sentence,
.slh-safe,
.slh-clip {
  color: #fff7f4;
  font-size: 1.05rem;
  line-height: 1.55;
}

.slh-lead { margin: 12px 0 0; }

.slh-skip {
  margin: 8px 0 0;
  color: #f0d3c4;
}

.slh-gates {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.slh-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;
}

.slh-gate-row input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: #e2b15a;
}

.slh-miss {
  margin: 12px 0 0;
  color: #ffd0a8;
  font-size: 1.02rem;
  font-weight: 700;
}

.slh-start,
.slh-actions button,
#slh-download {
  min-height: 52px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 740;
  cursor: pointer;
}

.slh-start {
  width: 100%;
  margin-top: 16px;
  border: 0;
  background: #e2b15a;
  color: #2a1218;
}

.slh-start:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.slh-start:focus-visible,
.slh-actions button:focus-visible,
#slh-download:focus-visible,
.slh-choice:focus-visible,
.slh-gate-row:focus-within {
  outline: 3px solid #e2b15a;
  outline-offset: 2px;
}

.slh-count {
  margin: 0 0 12px;
  color: #e2b15a;
  font-size: 0.95rem;
  font-weight: 740;
  letter-spacing: 0.04em;
}

.slh-prompt {
  font-size: clamp(1.35rem, 3.4vw, 1.7rem);
}

.slh-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.slh-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: #2a1218;
  font-size: 1.08rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.slh-choice:hover {
  border-color: #e2b15a;
  background: #fffaf3;
}

.slh-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #4a1830;
  color: #fff7f4;
  font-weight: 760;
}

.slh-choice.is-on {
  border-color: #e2b15a;
  background: #2a1218;
  color: #fff7f4;
}

.slh-choice.is-on .slh-n {
  background: #e2b15a;
  color: #2a1218;
}

.slh-meter {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.slh-track-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  color: #fff7f4;
  font-weight: 740;
}

.slh-score {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.slh-rail {
  position: relative;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(20, 6, 12, 0.45);
}

.slh-tick {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 247, 244, 0.55);
}

.slh-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
}

.slh-fill-slow { background: #e2b15a; }
.slh-fill-alt { background: #e0a07a; }
.slh-fill-hard { background: #e23b4a; }

.slh-kicker {
  margin: 0;
  color: #e2b15a;
  font-size: 0.92rem;
  font-weight: 740;
}

.slh-type {
  margin-top: 4px;
  font-size: clamp(1.8rem, 4vw, 2.3rem);
}

.slh-sentence { margin: 10px 0 0; }

.slh-say,
.slh-hard {
  margin: 14px 0 0;
  color: #fff7f4;
  line-height: 1.5;
}

.slh-say {
  padding: 12px 14px;
  border-left: 4px solid #e2b15a;
  background: rgba(255, 247, 244, 0.08);
}

.slh-say-label,
.slh-hard-label {
  display: block;
  margin-bottom: 4px;
  color: #e2b15a;
  font-size: 0.82rem;
  font-weight: 740;
}

.slh-hard-label { color: #ffb4b8; }

.slh-clip {
  margin: 12px 0 0;
  color: #f0d3c4;
}

.slh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.slh-actions button,
#slh-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: #2a1218;
  text-decoration: none;
}

#slh-share {
  border: 0;
  background: #e2b15a;
  color: #2a1218;
}

.slh-safe {
  margin: 14px 0 0;
  color: #f0d3c4;
  font-size: 0.95rem;
}

#slh-canvas {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
  .slh-fill,
  .slh-choice { transition: none; }
}

@media (min-width: 720px) {
  .slh-sheet { padding: 28px 26px 24px; }
}
