/* Game page: the canvas takes the whole area the browser gives, whatever its shape. */
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #05060a; }
body { font: 14px/1.4 Georgia, 'Times New Roman', serif; color: #e8dcc0; overscroll-behavior: none; }
#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; background: #05060a; }
#game, #placeholder { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; outline: none; }
#game { visibility: hidden; }
body.running #game { visibility: visible; }
body.running #placeholder { display: none; }

#bar {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -100%); transition: transform .2s;
  display: flex; gap: 14px; align-items: center; padding: 6px 14px;
  background: rgba(10, 13, 26, .88); border: 1px solid #8a6d2f; border-top: 0; border-radius: 0 0 8px 8px; z-index: 5;
  white-space: nowrap;
}
#stage.showbar #bar, #bar:hover, #bar:focus-within { transform: translate(-50%, 0); }
#bar button, #bar a {
  font: inherit; color: #f3d98b; background: #1a2140; border: 1px solid #8a6d2f; border-radius: 4px;
  padding: 3px 10px; cursor: pointer; text-decoration: none;
}
#bar button:hover, #bar a:hover { background: #26305c; }
#who { color: #f3d98b; font-weight: bold; }
#sizeinfo { color: #9aa3c0; }

#notice {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 6;
  background: rgba(10, 13, 26, .92); border: 1px solid #8a6d2f; border-radius: 6px; padding: 10px 18px; color: #f3d98b;
}
/* 2026-11-20: plain info notices (no browser storage, #69 "try again in a moment", soft GL) sat over the login /
 * "enter world" buttons at the bottom and swallowed their clicks: now at the top and click-through */
#notice:not(.update) { pointer-events: none; top: 56px; bottom: auto; max-width: min(760px, 92vw); }
/* stale tab: a new version is on the server - the notice is a button that reloads the page */
#notice.update { cursor: pointer; top: 56px; bottom: auto; border-color: #f3d98b; box-shadow: 0 0 12px rgba(243, 217, 139, .45); }

/* download progress: big and centred before the game starts, a thin strip at the bottom once it runs */
#load { position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%); width: min(520px, 80vw); z-index: 6;
  background: rgba(10, 13, 26, .9); border: 1px solid #8a6d2f; border-radius: 8px; padding: 12px 16px; color: #f3d98b; text-align: center; }
#loadtrack { height: 10px; margin-top: 8px; background: #05060a; border: 1px solid #56658f; border-radius: 5px; overflow: hidden; }
#loadbar { height: 100%; width: 0; background: linear-gradient(#f6e2a0, #c9a24a); }
body.running #load { bottom: 6px; width: min(360px, 60vw); padding: 5px 10px; font-size: 12px; opacity: .88; }
body.running #loadtrack { height: 5px; margin-top: 4px; }
#bar select { font: inherit; color: #f3d98b; background: #1a2140; border: 1px solid #8a6d2f; border-radius: 4px; padding: 2px 6px; }

/* "still working" indicator: turns by CSS alone, so it lives even while the game code is busy */
#alive { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 7; display: flex; gap: 10px; align-items: center;
  background: rgba(10, 13, 26, .9); border: 1px solid #8a6d2f; border-radius: 18px; padding: 6px 16px 6px 10px; color: #f3d98b; white-space: nowrap; }
#alive[hidden] { display: none; }
#spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #56658f; border-top-color: #f3d98b; animation: lkspin .9s linear infinite; will-change: transform; }
@keyframes lkspin { to { transform: rotate(360deg); } }

/* maintenance board (play.js showBoard; web/tools/maintenance.py) */
#maint { position: absolute; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(5, 6, 10, .78); }
#maint[hidden] { display: none; }
#maint .box { max-width: 34em; margin: 0 16px; padding: 28px 32px; text-align: center; color: #f1e3c0;
  background: #1a1410; border: 2px solid #b8893a; border-radius: 8px; box-shadow: 0 0 40px rgba(0, 0, 0, .7);
  font: 16px/1.5 Georgia, serif; }
#maint h2 { margin: 0 0 10px; color: #f0c25a; font-size: 26px; letter-spacing: .04em; }
#maint p { margin: 0 0 18px; }
#maint button { padding: 8px 22px; color: #1a1410; background: #e2b54f; border: 0; border-radius: 4px; font: bold 15px Georgia, serif; cursor: pointer; }
#maint a { color: #f0c25a; }
