body {
  font-family: monospace;
  font-size: 16px;
  color: #191919;
}

form > * {
  display: block;
}

form > * + * {
  margin-top: 1em;
}

input,
textarea {
  color: #191919;
}

.text {
  white-space: pre-wrap;
}

h3 {
  margin: 0;
}

* {
  font-weight: lighter;
  font-family: inherit;
}

.page {
  padding-top: 1em;
  max-width: 900px;
  margin: 0 auto;
}

input,
textarea {
  font-size: 16px;
  padding: 0;
  outline: none;
}

input {
  border: solid 1px;
}

a.button {
  display: inline-block;
}

button {
  color: black;
  border-color: black;
}

button,
a.button {
  padding: 1em;
  background: transparent;
  border: solid 1px;
  cursor: pointer;
  font-size: 11px;
}

button:hover,
button:focus,
a.button:hover,
a.button:focus {
  background: lightgray;
}

a.button,
a.button:hover,
a.button:focus,
a.button:visited {
  color: #191919;
  text-decoration: none;
}

.add-cowriters > * {
  display: block;
  width: 100%;
}

.add-cowriters > input {
  border-width: 0 0 1px 0;
}

.add-cowriters > * + * {
  display: block;
  width: 100%;
  margin-top: 0.5em;
}

.story {
  display: flex;
  flex-direction: column;
  min-height: 95vh;
}

.grow {
  flex-grow: 1;
}

.story__writer {
  flex-basis: 100%;
  border: none;
  min-height: 25em;
}

.story__details {
  display: flex;
  justify-content: space-between;
  border-width: 1px 0 0 0;
  border-style: solid;
  font-size: 0.75rem;
}

.writer {
  min-height: 10em;
  resize: vertical;
  margin-top: 1em;
}

.faded {
  color: gray;
}

.story__turnbuttons {
  display: flex;
  justify-content: center;
}

.story__turnbuttons > * {
  flex: 1 1 0px;
}

#new-story {
  height: 85vh;
}

.typewriter {
  display: flex;
  flex-direction: column;
}

.typewriter > input,
.typewriter > textarea {
  width: 100%;
  resize: none;
}

.typewriter > * + * {
  margin-top: 1em;
}

.title {
  margin: 0;
  font-size: 1.75rem;
  border-style: solid;
  border-width: 0 0 1px 0;
}

.typewriter > .body {
  flex-grow: 1;
  border: none;
}

.text-divider {
  background-image: url("/static/textdivider.svg");
  height: 2em;
  background-size: 5em;
  background-repeat: no-repeat;
  background-position: center;
  margin: 1em 0;
  border: none;
}

li.me-story:hover > .me-story-hover {
  opacity: 1;
}

.me-story-hover {
  opacity: 0;
}

.me-story-hover--mobile {
  opacity: 1;
}

.view-preferences {
  border-top: solid 1px;
  border-bottom: solid 1px;
  padding: 0.5em;
  display: flex;
  align-items: center;
}

.view-preferences > form > button {
  line-height: 1;
  vertical-align: middle;
}

.story-hide-form {
  display: inline-block;
}

.story-hide-form > button {
  border: none;
  padding: 0;
  font-size: inherit;
  text-decoration: underline;
}

/* Theme: Candlelit */
body.theme-candlelit {
  --candle-orange-inner: rgb(235, 178, 100);
  --candle-orange-outer: rgb(185, 87, 52);
  background-image: url("/static/candle.gif");
  background-color: black;
  background-repeat: repeat;
  color: lightyellow;
  min-height: 110vh;
}

@keyframes candlelit-pulse {
  0%, 100% {
    background-color: rgba(0, 0, 0, 1);
  }
  50% {
    background-color: rgba(0, 0, 0, 0.8);
  }
}

body.theme-candlelit h1,
body.theme-candlelit h2,
body.theme-candlelit h3,
body.theme-candlelit p,
body.theme-candlelit li,
body.theme-candlelit a:not(.button) {
  background-color: black;
  animation: candlelit-pulse 4s ease-in-out infinite;
}

body.theme-candlelit button,
body.theme-candlelit a.button {
  background-color: transparent;
  animation: none;
}

body.theme-candlelit input,
body.theme-candlelit textarea {
  color: lightyellow;
  background-color: transparent;
  border-color: lightyellow;
}

body.theme-candlelit button {
  color: lightyellow;
  border-color: lightyellow;
}

body.theme-candlelit button:hover,
body.theme-candlelit button:focus,
body.theme-candlelit a.button:hover,
body.theme-candlelit a.button:focus {
  background: rgba(255, 255, 224, 0.2);
}

body.theme-candlelit a.button,
body.theme-candlelit a.button:hover,
body.theme-candlelit a.button:focus,
body.theme-candlelit a.button:visited {
  color: lightyellow;
}

body.theme-candlelit .faded {
  color: rgba(255, 255, 224, 0.5);
}

body.theme-candlelit .story__details {
  border-color: lightyellow;
}

body.theme-candlelit .view-preferences {
  border-color: lightyellow;
}

body.theme-candlelit .title {
  border-color: lightyellow;
}

body.theme-candlelit .text-divider {
  background-color: lightyellow;
}

body.theme-candlelit a:not(.button) {
  color: var(--candle-orange-inner);
}

body.theme-candlelit a:not(.button):visited {
  color: var(--candle-orange-outer);
}

/* Theme: Stars */
body.theme-stars {
  --star-yellow: rgb(252, 190, 17);
  --star-dark-blue: rgba(10, 20, 40, 0.92);
  background-image: url("/static/stars.gif");
  background-color: black;
  background-repeat: repeat;
  color: var(--star-yellow);
  min-height: 110vh;
}

body.theme-stars h1,
body.theme-stars h2,
body.theme-stars h3,
body.theme-stars p,
body.theme-stars li,
body.theme-stars a:not(.button) {
  background-color: var(--star-dark-blue);
}

body.theme-stars button,
body.theme-stars a.button {
  background-color: transparent;
}

body.theme-stars input,
body.theme-stars textarea {
  color: var(--star-yellow);
  background-color: transparent;
  border-color: var(--star-yellow);
}

body.theme-stars button {
  color: var(--star-yellow);
  border-color: var(--star-yellow);
}

body.theme-stars button:hover,
body.theme-stars button:focus,
body.theme-stars a.button:hover,
body.theme-stars a.button:focus {
  background: rgba(252, 190, 17, 0.2);
}

body.theme-stars a.button,
body.theme-stars a.button:hover,
body.theme-stars a.button:focus,
body.theme-stars a.button:visited {
  color: var(--star-yellow);
}

body.theme-stars .faded {
  color: rgba(252, 190, 17, 0.5);
}

body.theme-stars .story__details {
  border-color: var(--star-yellow);
}

body.theme-stars .view-preferences {
  border-color: var(--star-yellow);
}

body.theme-stars .title {
  border-color: var(--star-yellow);
}

body.theme-stars a:not(.button) {
  color: var(--star-yellow);
}

body.theme-stars a:not(.button):visited {
  color: rgba(252, 190, 17, 0.8);
}

body.theme-stars .text-divider {
  position: relative;
  filter: brightness(0) saturate(100%) invert(100%) sepia(43%) saturate(583%) hue-rotate(359deg) brightness(110%) contrast(98%);
}
