:root {
  --academy-navy: #082f78;
  --academy-blue: #1268d6;
  --academy-cream: #fffaf0;
  --focus: #ffcc22;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Arial, Helvetica, sans-serif;
  background: #eef3fa;
  color: var(--academy-navy);
}
.homepage-shell { width: 100%; }
.academy-board {
  position: relative;
  width: min(100%, 1536px);
  margin: 0 auto;
  background: #fff;
  overflow: hidden;
}
.board-image { display: block; width: 100%; height: auto; }
.hotspot {
  position: absolute;
  display: block;
  border-radius: 18px;
  text-decoration: none;
  outline: none;
}
.hotspot:focus-visible {
  outline: 5px solid var(--focus);
  outline-offset: -3px;
  background: rgba(255,255,255,.12);
}
@media (hover:hover) and (pointer:fine) {
  .dept {
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
  }
  .dept:hover {
    transform: translateY(-1.2%) scale(1.015);
    box-shadow: 0 16px 28px rgba(0, 30, 80, .24);
    background: rgba(255,255,255,.05);
    z-index: 4;
  }
  .sign-in:hover, .membership:hover, .nav-home:hover, .nav-library:hover, .nav-progress:hover, .nav-achievements:hover {
    background: rgba(255,255,255,.13);
  }
}
/* Coordinates are percentages of the 1536×1024 artwork. */
.nav-home { left: 27.7%; top: 0.9%; width: 6.5%; height: 7.1%; }
.nav-library { left: 34.3%; top: 0.9%; width: 8.0%; height: 7.1%; }
.nav-progress { left: 42.4%; top: 0.9%; width: 7.3%; height: 7.1%; }
.nav-achievements { left: 49.8%; top: 0.9%; width: 10.4%; height: 7.1%; }
.sign-in { left: 67.5%; top: 1.0%; width: 12.7%; height: 6.2%; border-radius: 999px; }
.membership { left: 81.1%; top: 1.0%; width: 16.3%; height: 6.2%; border-radius: 999px; }

.dept-library { left: 21.7%; top: 24.0%; width: 25.4%; height: 29.8%; }
.dept-classroom { left: 47.7%; top: 24.0%; width: 25.7%; height: 29.8%; }
.dept-ask { left: 73.8%; top: 24.0%; width: 24.9%; height: 29.8%; }
.dept-game { left: 21.7%; top: 54.5%; width: 25.4%; height: 28.2%; }
.dept-teachers { left: 47.7%; top: 54.5%; width: 25.7%; height: 28.2%; }
.dept-bookstore { left: 73.8%; top: 54.5%; width: 24.9%; height: 28.2%; }

.search-overlay {
  position: absolute;
  left: 34.0%;
  top: 8.25%;
  width: 37.5%;
  height: 4.5%;
  z-index: 5;
  display: flex;
  align-items: center;
}
.search-overlay input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 12% 0 8%;
  color: #173b78;
  font-size: clamp(8px, 1vw, 16px);
}
.search-overlay input::placeholder { color: #607398; opacity: .95; }
.search-overlay button {
  position: absolute;
  right: 1%;
  width: 10%;
  height: 88%;
  opacity: 0;
  cursor: pointer;
  border: 0;
}
.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;
}
.mobile-departments { display: none; }

@media (max-width: 760px) {
  body { background: var(--academy-cream); }
  .academy-board { overflow: visible; }
  .dept, .nav-progress, .nav-achievements { display: none; }
  .search-overlay { display: none; }
  .mobile-departments {
    display: block;
    padding: 18px 16px 30px;
    max-width: 720px;
    margin: 0 auto;
  }
  .mobile-departments h1 { text-align: center; margin: 0 0 14px; font-size: 22px; }
  .mobile-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .mobile-grid a {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 72px;
    justify-content: center;
    padding: 13px 16px;
    border-radius: 16px;
    background: white;
    color: var(--academy-navy);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,40,100,.08);
    border: 1px solid rgba(8,47,120,.10);
  }
  .mobile-grid strong { font-size: 17px; }
  .mobile-grid span { font-size: 13px; color: #566783; }
}
@media (prefers-reduced-motion: reduce) {
  .dept { transition: none !important; }
}
