img.header-image {
  display: block;
  margin: 0 auto 1.5em auto;
  max-width: 25%;
  height: auto;
}

.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #444;
  color: #fff;
  font-family: 'EB Garamond', serif;
  font-size: 0.95em;
  padding: 0.6em 0.8em;
  border-radius: 4px;
  white-space: pre-wrap;
  width: max-content;
  max-width: 320px;
  z-index: 1000;
  transition: opacity 0.5s ease-in-out;
  pointer-events: none;
  text-align: left;
  font-style: normal;
}

.tooltip-wrapper:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

body {
  font-family: 'EB Garamond', serif;
  background-color: #FCFAFD;
  color: #111;
  line-height: 1.7;
  max-width: 720px;
  margin: 60px auto;
  padding: 0 20px;
  font-size: 1.2em;
  overflow-x: hidden;
  position: relative;
}
h1 {
  text-align: center;
  font-size: 2em;
  letter-spacing: 0.05em;
  line-height: 1em;
  margin-bottom: 1em;
}
.section-title {
  font-size: 1.5em;
  margin-top: 2em;
  text-align: center;
  font-weight: bold;
  letter-spacing: 0.03em;
}
.introduction, .interlude {
  font-style: italic;
  margin: 1em 0;
  text-align: center;
  padding: 1em 2em;
  border-top: 2px dotted darkred;
  border-bottom: 2px dotted darkred;
}
.interviewer,
.ai-poet {
  margin: 2em 0;
  position: relative;
}
.interviewer::before {
  content: "INTERVIEWER";
  display: block;
  text-align: center;
  text-transform: uppercase;
  font-size: 0.9em;
  letter-spacing: 0.05em;
  margin-bottom: 0.6em;
}
.ai-poet::before {
  content: "AI POET";
  display: block;
  text-align: center;
  text-transform: uppercase;
  font-size: 0.9em;
  letter-spacing: 0.05em;
  margin-bottom: 0.6em;
}
.highlight {
  background-color: #fff3cd;
  transition: background-color 0.3s ease;
}
#playButton {
  display: block;
  margin: 0 auto 2em auto;
  padding: 0.5em 1.5em;
  font-family: 'EB Garamond', serif;
  font-size: 1.1em;
  background-color: #fff;
  border: 2px solid #111;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#playButton:hover {
  background-color: #111;
  color: #fff;
}

#poemcontrols {
  margin: 0em 0 1em 0;
  display: inline-block;
  justify-content: center;
  gap: 1.5rem;
  width:100%;
  text-align: center;
}

#poemcontrols button {
  font-family: 'EB Garamond', serif;
  font-size: 1.1rem;
  background: transparent;
  color: #111;
  border: 1px solid #111;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: all 0.3s ease;
  border-radius: 0;
  box-shadow: none;
  margin:10px;
  display: inline-block;
} 

#poemcontrols button:hover {
  background-color: #111;
  color: #fff;
}

#poemcontrols button:hover a {
  color: #fff !important;
}

#controls {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1000;
  padding: 0.5em 0;
  border-bottom: 1px solid #ccc;
  gap: 0.5em;
}

#controls button, #controls select {
  margin: 0.25em;
  padding: 0.4em 0.8em;
  font-size: 1em;
  font-family: 'EB Garamond', serif;
  background-color: #fff;
  border: 1px solid #111;
  border-radius: 4px;
  cursor: pointer;
  min-width: 80px;
  box-sizing: border-box;
}

#controls button:hover, #controls select:hover {
  background-color: #111;
  color: #fff;
}

.speed-button {
  margin: 0 0.25em;
  padding: 0.4em 0.8em;
  font-size: 1em;
  font-family: 'EB Garamond', serif;
  background-color: #fff;
  border: 1px solid #111;
  border-radius: 4px;
  cursor: pointer;
}

.speed-button:hover {
  background-color: #111;
  color: #fff;
}

.speed-button.active {
  background-color: #888 !important;
  color: #fff;
}

footer {
  text-align: center;
  font-size: 0.85rem;
  color: #999;
  padding: 4rem 2rem;
}

.canvas-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 400px;
}
canvas {
  display: block;
  height:800px;
}

footer {
  font-family: 'EB Garamond', serif;
  background-color: #FCFAFD;
  color: #111;
  line-height: 1.7;
  width:100%;
  margin: 60px auto;
  padding: 0 20px;
  font-size: 1.2em;
}

    #poem-container {
      float:left;
      white-space: pre-wrap;
      color: #111;
      font-family: monospace;
      font-size: 1rem;
      width:80%;
      padding: 2% 5%;
      margin: 0rem 5% 2rem 5%;
      min-height: 2rem;
      background-color: #fff;
      border-radius: 10px;
      border: 1px solid #ddd;
    }
    .poem-line {
      line-height: 1.5;
    }
    .glitch-char {
      color: darkred;
    }
    .system-line {
      color: #d55;
      text-align: right;
      width:100%;
    }
  #poem-container::after {
    content: ">";
    animation: blink 1s step-start infinite;
    color: #a11;
    font-family: monospace;
    margin-left: 0px;
  }

  @keyframes blink {
    50% { opacity: 0.1; }
  }

/* Two-column interview and annotation sidebar layout */
  
.interviewer,
.ai-poet {
  position: relative;
}

.annotation {
  width:150px;
  font-family: 'Caveat', cursive;
  font-size: 0.8em;
  color: #a44;
  background-color: none;
  padding: 0.5em;
  margin: 0;
  z-index: 10;
}

/* Randomized tilt for annotation using data-tilt attribute */
.annotation[data-tilt="-2"] { transform: rotate(-3deg); }
.annotation[data-tilt="-1"] { transform: rotate(-2deg); }
.annotation[data-tilt="0"]  { transform: rotate(1deg); }
.annotation[data-tilt="1"]  { transform: rotate(2deg); }
.annotation[data-tilt="2"]  { transform: rotate(3deg); }

@media (max-width: 1024px) {
  .annotation {
   display:none;
  }
}