html {
  background-image: url('../images/taustakuva.png');
  background-size: cover !important;
  background-position: center center !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
}

body {
  background: transparent;
}

.book-spread {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.08);
}

.book-page-left {
  background: #faf5ff;
  border-right: 1px solid var(--border);
}

.class-7 {
  background: var(--class-7);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.25);
}

.class-8 {
  background: var(--class-8);
  box-shadow: 0 4px 20px rgba(219, 39, 119, 0.25);
}

.class-9 {
  background: var(--class-9);
  box-shadow: 0 4px 20px rgba(13, 148, 136, 0.25);
}

.book-page-left a {
  color: #3b0764;
  font-weight: 500;
}

.book-page-left a:hover {
  color: #6d28d9;
  background: #ede9fe;
}

.book-page-left h2,
.book-page-left h3 {
  color: #3b0764;
}

.hero-bubble {
  background: #fef3c7;
  border: 1px solid #f0c040;
  backdrop-filter: blur(4px);
}

.course-card {
  border-color: var(--border);
}

.course-card:hover {
  border-color: #c4b5fd;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.1);
}

.header-search input {
  background: rgba(255, 255, 255, 0.9);
  border-color: #ddd6fe;
  color: var(--text);
}

.header-search input:focus {
  border-color: #a78bfa;
  outline: 2px solid #ddd6fe;
}

#searchResults {
  background: #ffffff;
  border-color: var(--border);
}

.result-item {
  border-color: var(--border);
}

.result-item:hover {
  background: #faf5ff;
}

.result-item.selected {
  background: #ede9fe;
}

.card-grid-fallback {
  display: none;
  padding: 20px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-light);
  font-size: 14px;
  text-align: center;
  margin-top: 20px;
}

#taskCards:empty + .card-grid-fallback {
  display: block;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.5px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.nav-logo span {
  color: #f0c040;
  font-style: italic;
}

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

.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  clip: auto;
  white-space: normal;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
}

/* Kirjan otsikko */
.book-title {
  margin: 0 0 4px;
}

.book-title-en {
  font-size: 14px;
  color: #7c3aed;
  font-style: italic;
  margin: 0 0 2px;
}

.book-subtitle {
  font-size: 12px;
  color: #9ca3af;
  margin: 0 0 20px;
  letter-spacing: 0.01em;
}

/* Maskotat */
.hero {
  position: relative;
  display: inline-block;
}

.hero-mascot {
  position: absolute;
}

.hero-mascot-robo {
  width: 90px;
  right: -50px;
  bottom: -5px;
  z-index: 2;
  transform-origin: bottom left;
  animation: peek-robo 3s ease-in-out infinite;
}

.hero-mascot-tikku {
  width: 100px;
  right: -50px;
  bottom: 250px;
  z-index: 1;
  transform-origin: bottom left;
  animation: peek-tikku 3.6s ease-in-out infinite 0.8s;
}

@keyframes peek-robo {
  0%,
  100% {
    transform: rotate(18deg) translateX(-10px);
  }
  50% {
    transform: rotate(18deg) translateX(-14px);
  }
}

@keyframes peek-tikku {
  0%,
  100% {
    transform: rotate(12deg) translateX(-8px);
  }
  50% {
    transform: rotate(12deg) translateX(-12px);
  }
}

@media (max-width: 768px) {
  .hero-mascot-robo {
    width: 60px;
    right: -4px;
    bottom: -4px;
  }
  .hero-mascot-tikku {
    width: 70px;
    right: -18px;
    bottom: 20px;
  }
}

/* Footer */
.site-footer {
  background: #1e1040;
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer-left p,
.site-footer-right p {
  margin: 0;
}

.site-footer-brand {
  font-size: 14px;
  font-weight: 600;
  color: #c4b5fd;
}

.site-footer-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 3px !important;
}

.site-footer-meta a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
}

.site-footer-meta a:hover {
  color: #c4b5fd;
}

.site-footer-right {
  text-align: right;
}

.site-footer-book {
  font-size: 14px;
  font-weight: 500;
  color: #c4b5fd;
  font-style: italic;
}

.site-footer-bookmeta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 3px !important;
}