/* Manager-only styling. Loaded after style.css so the game's look is
   inherited, but this screen is for an adult checking data, not a child
   playing — denser, plainer, no play affordances. */

/* Same reason as the builder: the game header becomes a flex row below
   1000px to keep its buttons off the title, and this header is a title
   with a subtitle beneath it, which a row would put beside it instead. */
header { display: block; }
header h1 { text-align: center; }

.mgr-sub {
  margin: 0.35rem 0 0;
  color: #6a8199;
  font-size: 0.95rem;
}

.mgr-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 1.25rem 0;
}
.mgr-stats div { text-align: center; }
.mgr-stats dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #6a8199;
}
.mgr-stats dd {
  margin: 0.15rem 0 0;
  font-size: 1.5rem;
  font-weight: 800;
}

.mgr-warn {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--accent);
  background: #fff8e6;
  border-radius: 6px;
  font-size: 0.95rem;
}

/* Standing information, not a problem to fix — so blue rather than the
   amber .mgr-warn reserved for something actually wrong. */
.mgr-info {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--sea);
  background: #eef6fb;
  border-radius: 6px;
  font-size: 0.95rem;
}

.mgr-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 0.75rem;
}

#show-answers, .mgr-go {
  font-size: 1.1rem;
  font-weight: 800;
  padding: 0.65rem 2rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1.2;
}

#show-answers { background: var(--accent); color: var(--ink); }

/* The way back into the game, so a parent who came here to check an
   answer isn't stranded on a page that is deliberately not the game. */
.mgr-go {
  display: inline-block;
  background: var(--sea);
  color: #fff;
  text-decoration: none;
}

.mgr-note {
  max-width: 40rem;
  margin: 0.5rem auto 2rem;
  text-align: center;
  color: #6a8199;
  font-size: 0.95rem;
}

/* ---------- Answer key pop-up ---------- */

body.locked { overflow: hidden; }

/* `display: flex` would otherwise beat the `hidden` attribute, so the
   dialog would sit open on page load. */
#answers-overlay[hidden] { display: none; }

#answers-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 37, 64, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}

#answers-panel {
  background: #fff;
  border-radius: 16px;
  width: min(900px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(11, 37, 64, 0.35);
}

#answers-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  border-bottom: 2px solid var(--sea-light);
}
#answers-head h2 { margin: 0; font-size: 1.25rem; }

#answers-close {
  border: none;
  background: var(--sea-light);
  color: var(--ink);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
}

/* The table scrolls inside the panel, so a long topic never pushes the
   close button off screen. */
#answers-body { overflow: auto; padding: 0.5rem 1.1rem 1.1rem; }

.key-table { border-collapse: collapse; width: 100%; }
.key-table th {
  position: sticky;
  top: 0;
  background: #fff;
  padding: 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6a8199;
  border-bottom: 2px solid var(--sea-light);
}
.key-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid #eef2f5;
  text-align: center;
  vertical-align: middle;
}
.key-num { color: #9fb2c2; font-size: 0.85rem; width: 2rem; }
.key-text { font-weight: 700; }
.key-img { width: 100%; max-width: 150px; max-height: 58px; }

.key-foot {
  margin: 0.75rem 0 0;
  text-align: center;
  color: #6a8199;
  font-size: 0.9rem;
}
