.sth-body {
  background: #1c1e22;
  color: #f4f0ea;
}

.sth-sheet {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 28px 22px 48px;
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(255, 122, 47, 0.08), transparent 42%),
    linear-gradient(270deg, rgba(142, 42, 34, 0.16), transparent 46%),
    #2a2c31;
  color: #f4f0ea;
  box-shadow: inset 0 0 0 1px rgba(232, 238, 245, 0.08);
}

main.shell-main.sth-main {
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: 32px;
}

.sth-title,
.sth-type {
  margin: 0;
  color: #f4f0ea;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.2;
}

.sth-lead,
.sth-skip,
.sth-safe,
.sth-read,
.sth-dim,
.sth-hard,
.sth-clip,
.sth-count {
  color: #f4f0ea;
  line-height: 1.65;
}

.sth-skip,
.sth-safe,
.sth-count {
  color: #c8c2b8;
}

.sth-idle {
  width: min(420px, 100%);
  height: auto;
  margin: 18px auto 8px;
  display: block;
}

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

.sth-gate-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #34373e;
  color: #f4f0ea;
}

.sth-gate-row input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex: 0 0 22px;
  accent-color: #e8eef5;
}

.sth-gate-row input:checked {
  accent-color: #ff7a2f;
}

.sth-start,
.sth-actions button,
#sth-download {
  min-height: 48px;
  margin-top: 16px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: #ff7a2f;
  color: #1a120c;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.sth-ghost {
  background: transparent;
  color: #f4f0ea;
  box-shadow: inset 0 0 0 1px #e8eef5;
}

.sth-frame {
  position: relative;
  height: 84px;
  margin: 8px 12px 18px;
  border: 1px solid rgba(232, 238, 245, 0.45);
  border-radius: 10px;
}

.sth-edge {
  position: absolute;
  display: flex;
  justify-content: space-between;
}

.sth-edge.top,
.sth-edge.bottom {
  left: 6px;
  right: 6px;
  height: 8px;
}

.sth-edge.top { top: -4px; }
.sth-edge.bottom { bottom: -4px; flex-direction: row-reverse; }

.sth-edge.left,
.sth-edge.right {
  top: 6px;
  bottom: 6px;
  width: 8px;
  flex-direction: column;
}

.sth-edge.right { right: -4px; }
.sth-edge.left { left: -4px; flex-direction: column-reverse; }

.sth-mark {
  width: 14px;
  height: 4px;
  border-radius: 2px;
  background: rgba(232, 238, 245, 0.28);
}

.sth-edge.left .sth-mark,
.sth-edge.right .sth-mark {
  width: 4px;
  height: 10px;
}

.sth-mark.is-in {
  background: #ff7a2f;
}

.sth-prompt {
  margin: 0 0 16px;
  color: #f4f0ea;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.35;
}

.sth-ruler {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sth-choice {
  flex: 1 1 0;
  min-width: 112px;
  min-height: 52px;
  padding: 8px 6px;
  border: 0;
  border-radius: 14px;
  background: #3a3d44;
  color: #f4f0ea;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.sth-choice:nth-child(2) { background: #4a4038; }
.sth-choice:nth-child(3) { background: #6a4630; }
.sth-choice:nth-child(4) { background: #a24e28; }
.sth-choice:nth-child(5) { background: #ff7a2f; color: #1a120c; }

.sth-choice.is-on {
  box-shadow: 0 0 0 3px #f4f0ea, 0 0 18px rgba(255, 122, 47, 0.55);
}

.sth-choice:focus-visible,
.sth-start:focus-visible,
.sth-actions button:focus-visible {
  outline: 3px solid #e8eef5;
  outline-offset: 2px;
}

.sth-stage {
  width: min(640px, 100%);
  height: auto;
  display: block;
  margin: 0 auto;
}

.sth-kicker {
  margin: 22px 0 6px;
  color: #ffb07a;
  font-size: 0.95rem;
}

.sth-open {
  margin: 0;
  padding-left: 1.2em;
  color: #f4f0ea;
}

.sth-open li + li { margin-top: 6px; }

.sth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sth-miss {
  color: #ffb07a;
}

#sth-download[hidden],
#sth-miss[hidden],
#sth-canvas[hidden],
#sth-gate[hidden],
#sth-ask[hidden],
#sth-result[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .sth-choice {
    flex: 1 1 42%;
    min-width: 0;
  }
}

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