/* Color theme variables */
:root {
  --main-bg-color: white;
  --header-bg-color: hsl(221, 49%, 33%);
  --header-text-color: hsl(194, 49%, 73%);
  --text-color: hsl(212, 56%, 16%);
  --box-bg-color: hsl(210, 38%, 97%);
  --aside-bg-color: hsl(210, 32%, 93%);
  --aside-heading-color: hsl(210, 50%, 50%);
}

/* General body styles */
body {
  background-color: var(--main-bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 400;
  font-size: 1.2rem;
}

/* Header styles */
header {
  background-color: var(--header-bg-color);
  color: var(--header-text-color);
  margin: 0;
  padding: 15px;
  text-align: center;
}

/* Heading margins */
h1, h2, h3, h4 { margin: 0; padding: 0; }
h2 { margin-top: 5px; }

h4 {
  border-bottom: 1px solid var(--header-bg-color);
  margin: 15px 0 5px 0;
}

/* Form control styles */
select, input {
  height: 30px;
  display: block;
  margin-top: 10px;
}

/* Layout using CSS Grid */
main {
  display: grid;
  grid-template-columns: 3fr 9fr;
  grid-gap: 5px;
}

/* Sidebar (aside) styles */
aside {
  background-color: var(--aside-bg-color);
  color: var(--aside-heading-color);
  padding: 5px;
}

/* Main content section */
section {
  padding: 20px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  overflow: auto;
  height: 700px;
}

/* Scene elements */
p.title { font-weight: 600; margin: 0; }

p.direction {
  margin: 0;
  font-style: italic;
  font-weight: 500;
}

/* Speaker name styling */
.speech span {
  display: block;
  margin-top: 12px;
  font-weight: 700;
}

/* Speech paragraph styles */
.speech p { margin: 0; }
/* Highlighted text */
.speech p b { background-color: yellow; }

/* Stage direction italicized */
.speech em {
  font-style: italic;
  display: block;
  margin-top: 12px;
}

/* Button styling */
button {
  margin-top: 10px;
  background-color: var(--aside-heading-color);
  border-radius: 5px;
  border-color: var(--aside-heading-color);
  padding: 8px 24px;
  color: var(--aside-bg-color);
  display: block;
  font-size: 19px;
  text-align: center;
}

/* Fieldset border */
fieldset {
  margin-top: 5px;
  border: 1px solid var(--header-text-color);
}

/* Responsive design for mobile devices */
@media (max-width: 768px) {
  main { grid-template-columns: 1fr; }
  input { height: 24px; }
  button { padding: 6px 20px; }
  
  select, input {
    display: inline;
    margin-bottom: 10px;
  }
}