:root {
  --night: #0B0A07; --panel: #14120C; --line: #4A4429; --sand: #D9C79F; --fg: #EDE3CB;
  --gold: #F2C35A; --gold-2: #D89B2C; --signal: #C8452F;
}
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--night); color: var(--fg); }
body { font: 15px/1.5 "Segoe UI", Roboto, Tahoma, sans-serif; }
#unity-canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; background: var(--night); outline: none; }

#loading {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 16px; background: var(--night);
}
#loading img { width: min(420px, 80vw); height: auto; mix-blend-mode: lighten; }
#loading .bar { width: min(360px, 76vw); height: 6px; background: var(--panel); border: 1px solid var(--line); }
#progress { width: 0; height: 100%; background: linear-gradient(90deg, var(--gold-2), var(--gold)); transition: width .2s; }
#loading p { margin: 0; color: var(--sand); letter-spacing: .08em; }

#update {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px; max-width: calc(100vw - 32px);
  padding: 10px 14px; background: var(--panel); border: 1px solid var(--gold-2);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
}
#update[hidden] { display: none; }
#update button {
  font: inherit; font-weight: 600; cursor: pointer; padding: 6px 12px; border: 1px solid var(--line);
  background: transparent; color: var(--sand);
}
#update #update-reload { background: var(--gold); border-color: var(--gold); color: #1A1206; }
#update button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

#messages { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 20; display: grid; gap: 8px; max-width: calc(100vw - 32px); }
#messages div { padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); }
#messages .error { border-color: var(--signal); }
#loading #loading-detail, #loading #loading-hint { margin-top: -12px; font-size: 13px; letter-spacing: .02em; font-variant-numeric: tabular-nums; min-height: 1.5em; }
#loading #loading-hint { color: var(--fg); opacity: .6; text-align: center; max-width: 76vw; }
#loading #loading-hint[hidden] { display: none; }
