:root {
  font-family: 'Georgia', 'Times New Roman', serif;
  background-color: #f4efe6;
  color: #1f1b16;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f4efe6;
}

.book {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e1d8c8;
  padding-bottom: 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: #a37c27;
  margin: 0;
}

h1 {
  margin: 0.2rem 0 0.5rem;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
}

.tagline {
  margin: 0;
  color: #6b6458;
}

.hero-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}

button {
  padding: 0.65rem 1.5rem;
  font-size: 1rem;
  border-radius: 999px;
  border: 1px solid #d0c6b6;
  background: #f3d9a4;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

button:hover {
  background: #f1cb7e;
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.current-info {
  font-style: italic;
  color: #6b6458;
}

.quote-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.quote-item {
  padding: 1rem 0;
  margin: 0;
  border-bottom: 1px solid #e1d8c8;
  transition: background 0.3s ease, border-left 0.3s ease;
}

.quote-item:first-child {
  border-top: 1px solid #e1d8c8;
}

.quote-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #a37c27;
  letter-spacing: 0.08em;
}

.quote-text {
  margin: 0.4rem 0 0;
  line-height: 1.6;
  font-size: 1.1rem;
}

.quote-item.active {
  background: #fff3d4;
  border-left: 6px solid #b8860b;
  padding-left: 1rem;
  box-shadow: inset 0 0 0 1px rgba(184, 134, 11, 0.2);
}

.helper {
  color: #6b6458;
  font-size: 0.95rem;
  margin-top: 1.5rem;
}

.floating-controls {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: rgba(255, 250, 240, 0.9);
  padding: 0.75rem;
  border: 1px solid #e1d8c8;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 10;
}

.floating-controls button,
.floating-controls a {
  width: 100%;
}

.floating-controls a {
  text-align: center;
  text-decoration: none;
  font-size: 1rem;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  border: 1px solid #b577c0;
  background: linear-gradient(120deg, #c46bf5, #ff8a00);
  color: #1f1b16;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.floating-controls a:hover {
  animation: psychedelic 0.8s linear infinite;
  transform: translateY(-1px);
}

.floating-controls a:active {
  transform: translateY(0);
}

@keyframes psychedelic {
  0% {
    background: linear-gradient(120deg, #ff4e50, #f9d423);
    color: #fff;
  }
  25% {
    background: linear-gradient(120deg, #24c6dc, #514a9d);
    color: #fff8e7;
  }
  50% {
    background: linear-gradient(120deg, #fe8c00, #f83600);
    color: #1f1b16;
  }
  75% {
    background: linear-gradient(120deg, #00c9ff, #92fe9d);
    color: #0b3d3d;
  }
  100% {
    background: linear-gradient(120deg, #ff4e50, #f9d423);
    color: #fff;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 600px) {
  .book {
    padding: 1.5rem 1rem 3rem;
  }

  .hero {
    align-items: flex-start;
  }

  button {
    width: 100%;
  }

  .floating-controls {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    flex-direction: row;
    align-items: stretch;
    gap: 0.5rem;
  }

  .floating-controls button,
  .floating-controls a {
    width: auto;
    flex: 1;
  }
}
