.sb { color: #1c1712; }
.sb-bar, .sb-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.8rem;
  align-items: center;
  margin: 0.4rem 0;
}
.sb label { display: inline-flex; align-items: center; gap: 0.4rem; color: #f4efe4; }
.sb select, .sb button {
  font: inherit;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid #8d7964;
  background: transparent;
  color: #f4efe4;
  padding: 0.35rem 0.85rem;
}
.sb select { background: #f4efe4; color: #1c1712; }
.sb button[data-ai] {
  background: #8a5612;
  color: #fff8ee;
  border-color: #8a5612;
}
.sb-note, .sb-help, .sb-foot { color: #f0e6d6; }
.sb-help, .sb-note { margin: 0.25rem 0 0.6rem; max-width: 42rem; }
.sb-paper {
  background: #f4efe4;
  color: #1c1712;
  border-radius: 2px;
  min-height: 28rem;
  padding: 1.6rem 1.1rem 2rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
.sb-line { margin: 0 0 0.85rem; }
.sb-text {
  outline: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "Courier New", Courier, monospace;
  font-size: 1rem;
  line-height: 1.45;
  min-height: 1.45em;
}
.sb-text:focus { background: rgba(138, 86, 18, 0.12); }
.sb-scene .sb-text { text-transform: uppercase; font-weight: 700; }
.sb-action .sb-text { max-width: 38rem; }
.sb-character .sb-text { text-transform: uppercase; text-align: center; font-weight: 700; }
.sb-paren .sb-text { text-align: center; font-style: italic; }
.sb-dialogue .sb-text { width: min(100%, 24rem); margin-inline: auto; }
.sb-transition .sb-text { text-transform: uppercase; text-align: right; }
@media (max-width: 640px) {
  .sb-paper { padding: 1rem 0.75rem 1.4rem; min-height: 22rem; }
  .sb-dialogue .sb-text { width: 100%; }
}
