:root {
  --width: min(400px, 100vw);
  --body-margin: max(20px, calc(calc(100vw - var(--width)) / 2));
  --default-margin: 1em;
  --half-margin: calc(var(--default-margin) / 2);
}

/* resets and defaults */
* {
  font-family: "Playwrite PE", cursive;
  font-weight: 400;
  font-style: normal;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

ul {
  list-style-position: inside;
}

input[type=text], textarea, button {
  display: block;
  padding: .3em 1em .3em 1em;
  min-width: 6em;
}
input[type=text] {
  width: 100%;
}
p[role=textbox] {
  border: 1px solid #DDD;
  padding: .3em 1em .3em 1em;
  min-height: 2em;
  width: 100%;
}

p[role=textbox] span {
  text-indent: -3em;
  padding-left: 3em;
  display: block;
}

/* layout */
body {
  margin: 0 var(--body-margin);
  counter-reset: section;
}
body, input, textarea, button {
  font-size: 16px;
}

h2 {
  text-align: center;
  font-size: 2em;
  border-bottom: 1px solid black;
}

/**************/
/**** form ****/
.registration > div {
  margin: 1em 0em;
  display: flex;
  flex-direction: column;
}
.helptext {
  font-size: .7em;
  font-style: italic;
  order: 4;
}
.helptext li {
  font-style: italic;
}

.errorlist {
  font-style: italic;
  font-size: .7em;
  color: #800;
  order: 3;
}

/**************/
/**** poem ****/
section {
  padding: var(--default-margin) 0;
  border-bottom: 1px solid black;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--default-margin);
  min-height: max-content;
  opacity: 1;
  transition: all 1s ease-in-out;
  overflow: hidden;
}

#wait {
  max-height: 64px;
}
#write {
  max-height: 445px;
}
#vote {
  min-height: max-content;
  max-height: 20000px;
}

#vote > div {
  width: 100%;
  display: flex;
  gap: var(--half-margin);
}

input[type=submit] {
  margin-top: 1em;
  font-size: .7em;
  padding: .1em;
}

/* behaviours */
.hidden {
  min-height: unset;
  max-height: 0 !important;
  padding: 0;
  margin: 0;
  opacity: 0;
  border: none;
  overflow: hidden;
}
