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

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

.dtk-sheet {
  width: min(640px, 100%);
  margin: 8px auto 28px;
  padding: 22px 18px 20px;
  border-radius: 22px;
  background:
    radial-gradient(90% 50% at 0% 0%, rgba(226, 177, 90, 0.16), transparent 46%),
    radial-gradient(80% 46% at 100% 0%, rgba(214, 69, 69, 0.18), transparent 42%),
    #1c141c;
  color: #fff7f4;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

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

.dtk-rule {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  height: 8px;
  margin: 0 0 18px;
}

.dtk-rule i { display: block; border-radius: 999px; }
.dtk-c-praise { background: #e2b15a; }
.dtk-c-command { background: #d64545; }
.dtk-c-fantasy { background: #d4896a; }
.dtk-c-degrade { background: #a35a62; }
.dtk-c-feedback { background: #f3e6d0; }

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

.dtk-title { font-size: clamp(1.65rem, 4.2vw, 2.2rem); }

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

.dtk-lead { margin: 12px 0 0; }
.dtk-skip { margin: 8px 0 0; color: #f0d3c4; }

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

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

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

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

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

.dtk-start {
  width: 100%;
  margin-top: 16px;
  border: 0;
  background: #e2b15a;
  color: #1c1218;
}

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

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

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

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

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

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

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

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

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

.dtk-choice.is-on .dtk-n { background: #e2b15a; color: #1c1218; }

.dtk-meter {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

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

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

.dtk-rail {
  position: relative;
  height: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(8, 4, 8, 0.45);
}

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

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

.dtk-fill-praise { background: #e2b15a; }
.dtk-fill-command { background: #d64545; }
.dtk-fill-fantasy { background: #d4896a; }
.dtk-fill-degrade { background: #a35a62; }
.dtk-fill-feedback { background: #f3e6d0; }

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

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

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

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

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

.dtk-hard-label { color: #ffb4b8; }
.dtk-clip { margin: 12px 0 0; color: #f0d3c4; }

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

.dtk-actions button,
#dtk-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: #1c1218;
  text-decoration: none;
}

#dtk-share { border: 0; background: #e2b15a; color: #1c1218; }
.dtk-safe { margin: 14px 0 0; color: #f0d3c4; font-size: 0.95rem; }

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

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

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