:root {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #eef2e9;
  background: #101514;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100dvh; margin: 0; overflow: hidden; }
body { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, auto) auto;
  align-items: center;
  gap: 8px 18px;
  min-height: 52px;
  padding: 6px 18px;
  background: #111716;
  border-bottom: 1px solid #343c36;
}
.bar strong { font-size: 15px; }
.library {
  color: #ffd0a5;
  text-decoration: none;
  min-height: 40px;
  display: flex;
  align-items: center;
}
#sync { color: #cbd4c8; font-size: 12px; }
button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: #ff936c;
  color: #241a16;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
button:disabled { opacity: .6; cursor: wait; }
button:focus-visible, a:focus-visible { outline: 3px solid #d8ffae; outline-offset: 3px; }
#academy, #loading, #conflict { grid-row: 2; grid-column: 1; min-height: 0; }
#academy { display: block; width: 100%; height: 100%; border: 0; background: #0c1222; }
#loading, #conflict {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  overflow: auto;
  text-align: center;
  background: #101514;
}
#loading h1, #conflict h1 { font-size: clamp(23px, 4vw, 34px); margin: 0 0 8px; }
#loading p, #conflict p { color: #cbd4c8; line-height: 1.5; margin: 0 0 20px; }
#conflict button { margin: 6px; }
#recovery { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 680px; }
#recovery-copy { flex-basis: 100%; }
#restore-account, #play-session { background: #d9e8d6; }
[hidden] { display: none !important; }
@media (max-width: 620px) {
  .bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 7px 12px; gap: 4px 12px; }
  .bar strong { text-align: right; font-size: 13px; }
  #sync { font-size: 11px; }
  #account { padding: 8px 12px; font-size: 12px; }
  #loading, #conflict { padding: 20px; }
}
/* While the game loads, a glimpse of it behind the message. */
#loading {
  background: linear-gradient(rgba(16, 21, 20, .84), rgba(16, 21, 20, .93)),
    url('../../assets/electrical-academy/wind-poster.webp') center/cover no-repeat, #101514;
}
